check_npre UNKNOWN: No handler for that command”

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bdm0917
Posts: 12
Joined: Wed Dec 16, 2015 2:32 pm

check_npre UNKNOWN: No handler for that command”

Post 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.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_npre UNKNOWN: No handler for that command”

Post by hsmith »

Can you post your nsc.ini here with any sensitive information edited out?
Former Nagios Employee.
me.
bdm0917
Posts: 12
Joined: Wed Dec 16, 2015 2:32 pm

Re: check_npre UNKNOWN: No handler for that command”

Post by bdm0917 »

Please see text file attached! Thanks
You do not have the required permissions to view the files attached to this post.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_npre UNKNOWN: No handler for that command”

Post 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
Former Nagios Employee.
me.
bdm0917
Posts: 12
Joined: Wed Dec 16, 2015 2:32 pm

Re: check_npre UNKNOWN: No handler for that command”

Post 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...
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_npre UNKNOWN: No handler for that command”

Post by rkennedy »

Can you update your nsc.ini and uncomment the line specified above?

Code: Select all

;check_updates=check_updates.vbs
Restart the NSClient++ service, and then run a check manually on Nagios for that service. What did the Status Information change to?
Former Nagios Employee
bdm0917
Posts: 12
Joined: Wed Dec 16, 2015 2:32 pm

Re: check_npre UNKNOWN: No handler for that command”

Post 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?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_npre UNKNOWN: No handler for that command”

Post 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?
Former Nagios Employee
bdm0917
Posts: 12
Joined: Wed Dec 16, 2015 2:32 pm

Re: check_npre UNKNOWN: No handler for that command”

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_npre UNKNOWN: No handler for that command”

Post 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?
Former Nagios Employee
Locked