Code: Select all
https://assets.nagios.com/downloads/nagiosxi/docs/Restarting-Windows-Services-With-NRPE-in-Nagios-XI.pdf?_ga=2.63505319.964425772.1493815062-68545757.1490190270 Code: Select all
https://assets.nagios.com/downloads/nagiosxi/docs/Restarting-Windows-Services-With-NRPE-in-Nagios-XI.pdf?_ga=2.63505319.964425772.1493815062-68545757.1490190270 Take a look at this document for more details.Event handlers are called whenever a state change occurs. This includes HARD and SOFT state types, as
well as OK, WARNING, CRITICAL, and UNKNOWN states. The logic for what actions to take, if any, when a
state change occurs is performed by the script or executable that is called by Nagios XI at the moment of the
state change. The script can parse these states through macros passed to it by the event handler.
For example, an event handler can be created that restarts a service if and only if that service has entered a
HARD CRITICAL state. This is possible passing the script the $SERVICESTATE$ (OK, WARNING,
UNKNOWN, CRITICAL) macro and the $SERVICESTATETYPE$ (HARD, SOFT) macro. It is the responsibility
of the person writing the script to make sure the script logic handles the passed macros appropriately