NCPA service event handler not working
Posted: Mon Feb 22, 2021 6:48 am
All,
I am currently using Nagios XI 5.7.5 and am trying to set up a service (RLM) to restart when it is not available. I believe I have configured it correctly, and am able to execute the ./check_ncpa.py -H 10.25.14.3 -P 5693 -t Str0ngT0k3n -M 'plugins/restart_service.bat' -a RLM and /usr/local/nagios/libexec/restart_service.sh CRITICAL 10.25.14.3 Str0ngT0k3n RLM from the command line. I added Service Restart - WIndows to Commands as a Misc command type, and checked Active. On the Check Settings tab of the Service I set the Event Handler dropdown as Service Restart - Windows, and set Event handler enabled to On. On the Manage Free Variables window I ser _xwizart to ncpa, and _service to RLM. I turned off the RLM service on the Windows server, and Nagios reports that the service is down. However, the service fails to restart. Am I doing something wrong? I pretty much tried for 6 hours last Friday to get it to work.
I am currently using Nagios XI 5.7.5 and am trying to set up a service (RLM) to restart when it is not available. I believe I have configured it correctly, and am able to execute the ./check_ncpa.py -H 10.25.14.3 -P 5693 -t Str0ngT0k3n -M 'plugins/restart_service.bat' -a RLM and /usr/local/nagios/libexec/restart_service.sh CRITICAL 10.25.14.3 Str0ngT0k3n RLM from the command line. I added Service Restart - WIndows to Commands as a Misc command type, and checked Active. On the Check Settings tab of the Service I set the Event Handler dropdown as Service Restart - Windows, and set Event handler enabled to On. On the Manage Free Variables window I ser _xwizart to ncpa, and _service to RLM. I turned off the RLM service on the Windows server, and Nagios reports that the service is down. However, the service fails to restart. Am I doing something wrong? I pretty much tried for 6 hours last Friday to get it to work.