Windows Service Check - event handler
Posted: Sun Nov 08, 2015 6:39 pm
Hi,
I want to set up an event handler to restart a stopped Windows service but I'm not sure exactly how the process works. Currently, I'm using one service definition to check the status of multiple Windows services, via https://www.itefix.net/check_winservice.
I've read over the documentation below but I cannot find anything which describes how the service name is passed to the event_handler script. From what I can see none of the arguments ($SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$) specify the service name?
https://assets.nagios.com/downloads/nag ... dlers.html
http://songwf100.blogspot.co.uk/2013/03 ... ndows.html
Thanks for any help.
I want to set up an event handler to restart a stopped Windows service but I'm not sure exactly how the process works. Currently, I'm using one service definition to check the status of multiple Windows services, via https://www.itefix.net/check_winservice.
Code: Select all
define service {
use generic_passive_service
service_description Server Services
hostgroup_name servergroup1
check_command winsrv_check_stopped_services!Spooler,MSSQLSERVER!auto
}https://assets.nagios.com/downloads/nag ... dlers.html
http://songwf100.blogspot.co.uk/2013/03 ... ndows.html
Thanks for any help.