Page 1 of 3
check_npre UNKNOWN: No handler for that command”
Posted: Wed Dec 16, 2015 2:56 pm
by bdm0917
Good Afternoon,
I am having difficulty with the ./check_nrpe -H <Remote Windows IP address> -t 120 -p 5666 -c check_updates for the plugin - Check Windows Updates Powershell. Powershell execution works great, aw well as, command line from inside the remote windows machine; however, when I login into the Nagios server and switch dir to
cd /usr/local/nagios/libexec
And run the following:
./check_nrpe -H <Remote Windows IP address> -t 120 -p 5666 -c check_updates
I receive the following error:
UNKNOWN: No handler for that command” error
Can someone please let me know what I am doing wrong, I have checked the nsc.ini file and everything seems right.
Thanks in advance.
Re: check_npre UNKNOWN: No handler for that command”
Posted: Wed Dec 16, 2015 3:01 pm
by hsmith
Can you post your nsc.ini here with any sensitive information edited out?
Re: check_npre UNKNOWN: No handler for that command”
Posted: Wed Dec 16, 2015 3:10 pm
by bdm0917
Please see text file attached! Thanks
Re: check_npre UNKNOWN: No handler for that command”
Posted: Wed Dec 16, 2015 3:34 pm
by hsmith
Do any check_nrpe checks work against this machine? It looks like you have a lot of stuff commented out, including ;check_updates=check_updates.vbs
Re: check_npre UNKNOWN: No handler for that command”
Posted: Wed Dec 16, 2015 3:39 pm
by bdm0917
Honestly, I am not too sure. All I know is that the remote windows server is reporting metrics back to Nagios Server XI...see attached!
Also, I thought commented line items might be the issue...
Re: check_npre UNKNOWN: No handler for that command”
Posted: Wed Dec 16, 2015 3:57 pm
by rkennedy
Can you update your nsc.ini and uncomment the line specified above?
Restart the NSClient++ service, and then run a check manually on Nagios for that service. What did the Status Information change to?
Re: check_npre UNKNOWN: No handler for that command”
Posted: Wed Dec 16, 2015 4:05 pm
by bdm0917
So I uncommented the line that you specified and restarted the NSC client from the command line...and I get the same status:
UNKNOWN: No handler for that command
The ./check_nrpe -H <Remote Windows IP address> -t 120 -p 5666 -c check_updates -> is commented out using the ;...does that matter?
Re: check_npre UNKNOWN: No handler for that command”
Posted: Thu Dec 17, 2015 10:52 am
by rkennedy
I noticed another check_updates in your config -
Code: Select all
;check_updates=cmd /c echo scripts\Check-Updates.ps1; exit $LastExitCode | powershell.exe -command -
Which script were you using to check this prior? Do you know if both the .vbs and .ps1 files are working?
Re: check_npre UNKNOWN: No handler for that command”
Posted: Thu Dec 17, 2015 11:24 am
by bdm0917
I have uncommented both lines mentioned in this post and I still receive the same error. I am using this doc...
https://assets.nagios.com/downloads/nag ... ios-XI.pdf and I haven't tried the *.vbs script this is the only one that I was aware of.
Re: check_npre UNKNOWN: No handler for that command”
Posted: Thu Dec 17, 2015 1:40 pm
by rkennedy
It actually looks the .pdf you posted is for the .ps1 script. Can you comment out the check_updates=check_updates.vbs line and then try again?