Vbscript Help
Posted: Thu Dec 20, 2012 9:54 am
I'm hoping someone can help me with this. I found this script on the nagios exchange (http://exchange.nagios.org/directory/Pl ... ck/details) and it works great when I run the vbscript locally on the client.
I would like to run this as a service check ($USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_ad $ARG1$).
I added the following line to nsclient.ini under the /settings/external scripts/scripts section: check_ad=cscript scripts\check_ad.vbs //nologo /test:$ARG1$
On the client the command that should run is: cscript check_ad.vbs //nologo /test:replications. Again, this works fine if I run locally from the client cmd prompt. When I run a test from the service screen this is what I get:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H IPADDRESS -t 30 -c check_ad replications
OUTPUT: CRITICAL - $ARG1$: CRITICAL.
I have a feeling I'm missing something in the nsclient.ini file, but I'm not sure what. All the documentation I find online refers to a nsc.ini file which I don't have.
Thanks!
Ryan
I would like to run this as a service check ($USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_ad $ARG1$).
I added the following line to nsclient.ini under the /settings/external scripts/scripts section: check_ad=cscript scripts\check_ad.vbs //nologo /test:$ARG1$
On the client the command that should run is: cscript check_ad.vbs //nologo /test:replications. Again, this works fine if I run locally from the client cmd prompt. When I run a test from the service screen this is what I get:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H IPADDRESS -t 30 -c check_ad replications
OUTPUT: CRITICAL - $ARG1$: CRITICAL.
I have a feeling I'm missing something in the nsclient.ini file, but I'm not sure what. All the documentation I find online refers to a nsc.ini file which I don't have.
Thanks!
Ryan