System profile attached. Nagios installed manually on a minimal CentOS 6 VM. Everything is vanilla.
I am trying to follow the guide here here for automatically restarting a windows service via NRPE when it enters a critical state, but I cannot get it to work.
1. The first point of confusion is the "Test The Command From The Nagios Server" step on page 2. I don't understand how this is supposed to work at this point in the guide. No commands have been defined yet in Nagios. What am I missing?
2. My windows servers already have NSClient++ installed and are configured to only use NRPE checks (nsclient.ini contains NRPEServer=1, no NSClientServer entry). Several checks are already up and running on each. The guide has you set up a host with the windows server config wizard and add the monitored service (spooler) in the process. That will use check_nt by default, which requires NSClientServer=1 in the nsclient.ini config, which I don't have, as I would prefer to use NRPE. Does this require the use of NSClientServer? Here's my current nsclient.ini. There are probably some unnecessary entries that I've added while troubleshooting, please advise on necessary edits.
Code: Select all
[/settings/default]
allowed hosts=<nagios server IP>
[/modules]
CheckSystem=1
CheckDisk=1
NRPEServer=1
CheckExternalScripts=enabled
[/settings/NRPE/server]
allowed ciphers=ADH
allow nasty characters=1
allow arguments=1
[/settings/external scripts]
allow arguments=1
[/settings/external scripts/scripts]
restart_service=scripts\restart_service.bat “$ARG1$”
allow_arguments=1Code: Select all
./check_nrpe -H <hostname or IP> -p 5666 -c restart_service -a spoolerCode: Select all
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
The service name is invalid.
More help is available by typing NET HELPMSG 2185.|Code: Select all
./servicerestart.sh CRITICAL <hostname or IP> spoolerNeedless to say, the service does not restart automatically once it's stopped.
I'm pretty new to Nagios so I hope I'm overlooking something really simple. I've been banging my head against this one for a while. Let me know if further info is needed.
Thanks!