CMK version: 2.3.0p10 OS version: ubuntu 24.04 Output of “cmk --debug -vvn hostname”: Success
I create a custom notification script, copying the foobar example in the documentation ( 11.3. A simple sample script).
I can execute the script with the site user, it works, i added a rule to launch the script in notifications, but when testing the notification, in notify.log i see:
would notify USERNAME via foobar, parameters: 1, 2, 3, bulk: no
would notify USERNAME via mail, parameters: from, disable_multiplexing, graphs_per_notification, notifications_with_graphs, bulk: no
i get the mail but in site home /tmp folder there’s no output (the script dump env vars to /tmp/foobar.txt)
I have the same issue as @barsigor under RedHat 9.4, Checkmk EE 2.3.0p13.
There are no messages in web.log, cmc.log, and notify.log. Also checked the file permissions and tested Python and Bash scripts. Also turned off SELinux for testing purposes.
When I use this function it does NOT run the scripts, despite the fact that notify.log says, it did. So when I configure a rule that matches some “real-life” notification, the custom scripts run as intended.
Hi all, ran into similar needs to execute notification script.
This can be done as documented in Commands
Use the Fake Check Results command (thanks Anders for this) and you’re good to go (you need to show all commands in the UI - it’s not displayed by default) - the notification script will be triggered.
Following your fake result execution, just do a service recheck to bring back the status et voilà!
One think to keep in mind however: Checkmk will report the service as flapping if you “play” around with it for too many times in a short time internval and you will not see any notifications
Not really unless you want to change config around it and do it in production
I generally just switch between two services or two host if I need the same service.
in our dev/stage environments this is not a problem