Check_nrpe Arguments fail to pass through $ARGx$ vars
Posted: Tue Feb 26, 2013 4:40 pm
Hello,
I have a Nagios server that needs to restart some Windows services, and/or do other things. When I issue the following command on the Nagios server, I get back this:
[root@ubitmon-hf libexec]# ./check_nrpe -H 10.23.241.210 -p 5666 -c runcmd -a spooler
C:\Program Files\NSClient++>net stop $ARG1$
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
C:\Program Files\NSClient++>net start $ARG1$
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
C:\Program Files\NSClient++>rem @exit 0
[root@ubitmon-hf libexec]#
This tells me the bat file is running. It appears that $ARG1$ isn't getting picked up as a variable. So, I recompiled the check_nrpe with --./configure --enable-command-args
Same response. Also, I edited the nsclient.ini file and added the following:
[/settings/External Scripts/Scripts]
runcmd = scripts\runcmd.bat $ARG1$
[/settings/NRPE/server]
allow arguments = 1
I am lost as to how to get this to work! The documentation I can find was outdated, I had to really fish around just to find the correct stuff to put in nsclient.ini. Has anybody ran into this? Any help is appreciated.
Regards,
Randy.
I have a Nagios server that needs to restart some Windows services, and/or do other things. When I issue the following command on the Nagios server, I get back this:
[root@ubitmon-hf libexec]# ./check_nrpe -H 10.23.241.210 -p 5666 -c runcmd -a spooler
C:\Program Files\NSClient++>net stop $ARG1$
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
C:\Program Files\NSClient++>net start $ARG1$
The service name is invalid.
More help is available by typing NET HELPMSG 2185.
C:\Program Files\NSClient++>rem @exit 0
[root@ubitmon-hf libexec]#
This tells me the bat file is running. It appears that $ARG1$ isn't getting picked up as a variable. So, I recompiled the check_nrpe with --./configure --enable-command-args
Same response. Also, I edited the nsclient.ini file and added the following:
[/settings/External Scripts/Scripts]
runcmd = scripts\runcmd.bat $ARG1$
[/settings/NRPE/server]
allow arguments = 1
I am lost as to how to get this to work! The documentation I can find was outdated, I had to really fish around just to find the correct stuff to put in nsclient.ini. Has anybody ran into this? Any help is appreciated.
Regards,
Randy.