Fake Check Result not creating notification

When I debug notifications, I usually set up a passive check with the “Integrate Nagios plugins” rule.

I just give it a Service description of “test notification” and as condition use the folder I want to test.

After activating the config every host matched by the condition
now also has a passive check called “test notification” which is in state pending (PEND).

Now you can easily fake check results on that “test notification” service.

It will become stale but if you set up a rule “Normal check interval for service checks”: Service name begins with “test notification” 9999 days it won’t.

Then I create a ~/local/share/check_mk/notifications/debug.sh in the site:

#!/bin/bash
# debug
logger "$0 $*"
printenv > /tmp/debug.$$.env
exec > /tmp/debug.$$.log 2>&1
echo hello

Now you can use the debug script as notification method in your notification rule and watch the files in /tmp

BTW: There is also a sidebar element called “Master control”
where notifications can be disabled globally, is this enabled ?

1 Like