Check_MK/OMD - Howto centralize notifications using mknotifyd

mknotifyd is a notification spooler to be used by check_mk. mknotifyd enables you to centralize the notification in a distributed environment. This article shows howto enable mknotifyd in Check_MK Multisite (OMD) environments.

Setup mknotifyd

The Check_MK (documentation)[] lists mknotifyd as an addon. Sadly, this config option seems to be missing in recent OMD releases (1.20 & 1.21 nightly builds).

You need to enable mknotify support manually by creating the config file $OMD_ROOT/etc/check_mk/multisite.d/ with the following content:

mknotifyd_enabled = True

This will enable you to configure mknotifyd using wato. The runlevel scripts to start and stop mknotifyd are missing. As a workaround you could use OMD‘s init hooks. Since there is a bug in nagios’s init script the hooks are not correctly run. The following scripts have been extended to mitigate this issue:

  • create a symlink
OMD[site]:~$ ln -s "nagios-restart-pre" "$OMD_ROOT/etc/init-hooks.d/nagios-reload-pre"
  • $OMD_ROOT/etc/init-hooks.d/nagios-restart-pre

HOOKDIR=`dirname "$0"`


# remember restart (buggy init-hook)
if [ "$2" != 'reload' ]; then
    touch "$RUNDIR/restart"
  • $OMD_ROOT/etc/init-hooks.d/nagios-start-pre

echo "Starting mknotifyd..."
exec ~/version/share/doc/check_mk/treasures/mknotifyd
  • $OMD_ROOT/etc/init-hooks.d/nagios-stop-pre


# don't stop mknotifyd twice while restarting
if [ -f "$RUNDIR/restart" ]; then
    rm -f "$RUNDIR/restart"
    exit 0

# stop mknotifyd if pidfile is available
if [ -f "$RUNDIR/pid" ]; then
    echo -n "Stopping mknotifyd..."
    p=`cat "$RUNDIR/pid"`
    kill "$p"
    for i in `seq 1 10`; do
    ps -p "$p" > /dev/null || break
    echo -n '.'
    sleep 1
    ps -p "$p" > /dev/null && echo " FAILED" || echo " OK"

These scripts will start/stop/restart mknotifyd with nagios. Remember to make these scripts executable!

Configure mknotifyd

Configuring mknotifyd can be done using wato. You need to have two different configurations for

Debugging mknotifyd

Comments !