Page 1 of 1

New Check Question

Posted: Thu Jan 15, 2015 9:56 am
by mbowden
I created a small batch script to check for the existence of one of 2 services on a windows machine. The service that I created uses check_nrpe. I have an issue where the script works fine on both platforms locally form the cmd line, so the script is good.

However from Nagios the command works perfectly on a 32 bit windows box and fails on a 64 bit box saying "No handler for command: win_check_puppet.bat"
I have put the script "win_check_Puppet.bat" in the scripts folder on both platforms.

Both Clients have identical NSC.ini files, The pertinent sections are below (I think)

; Script to check external scripts and/or internal aliases.
CheckExternalScripts.dll


and

[External Scripts]
win_check_Puppet.bat=scripts\win_check_Puppet.bat


From what I have read it seems possible that the nsclient.ini may need to be edited as well? If so can you help with syntax for that file. I have tried adding this and restarting the service with no luck.

; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts = 1
; win_check_Puppet.bat - Alias for win_check_Puppet.bat. To configure this item add a section called: /settings/external scripts/scripts/win_check_Puppet.bat
win_check_Puppet.bat = scripts\win_check_Puppet.bat


Thank You
Mike

Re: New Check Question

Posted: Thu Jan 15, 2015 10:40 am
by mbowden
This line added to the nsclient.ini resolved the issue

[/settings/external scripts/scripts]
win_check_Puppet = scripts\\win_check_Puppet.bat

Re: New Check Question

Posted: Thu Jan 15, 2015 10:45 am
by slansing
I was actually just about to reply back to you with an external scripts line, glad you got it worked out!