I want to execute a script if a host goes into down state.
I know there is a event console that do this kind of stuff.
But I don’t see how I can detect via Event-Console if a host is down.
I am using check_mk raw edition.
I also found a tutorial for check_mk using nagios event handler but I am uncertain how to apply this for my problem.
I do not understand what you mean to onest.
I don’t want to collect information with this script, I want to fix a problem that occurs from time to time and only check mk notice it.
Ok,
the idea is not to delete for example all logfiles using a scripted restart etc. that may help you to analyse why for a system crashed.
Sometime hints are shown on the screen of a frozen system.
Ralf
You can use notifications to trigger a script. I use RHEL so the path is: /opt/omd/sites/<sitename>/local/share/check_mk/notifications
Any script in the dir can be addressed via a notification. The second line of the script needs to be the name of the script that shows.
#!/bin/bash
# <name here>
That shows up in the “WATO → Notifications → Rule” Notification method (dropdown)
And in that rule you can pass variables from a check, to the script, like “NOTIFY_HOSTNAME”
Then you can use that to kick off a host restart, service restart, or a multitude of other stuff like generate a ticket via another system.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.