NSClient++ (External Script) Examples Help


#1

Hello,
I am wrting a quick help request. I am trying to get restults from simple scripts (1 or 0, etc). Then have nagios return ok it 0 and critical if 1, etc. I saw there was some examples and example scripts in the NSClient++ scripts directory, and that is what I used for my test(s). However, I could not get it going, and I am new to the nagios world. If anyone could provide any examples for the (1) NSC.ini file (2) Nagios:command file and (3) nagios:windows.cfg file.

I really appreciate any help provided. Thanks,
A.Blevins

What I was using:
CheckExternalScripts:
check_es_ok=scripts\ok.bat


#2

what I did to make scripts works via nsclient++ is to scroll down in the nsc.ini file to the [NRPE Handlers] section, and since I was not sure exactly where scripts/ pointed to, I created my own directory, c:\scripts, and put the script there, then added this line:
check_udp=c:\scripts\udp.bat

After a nsclient++ restart, I executed the following command to test it on my nagios server:
./check_nrpe -H xxx.xxx.xxx.xxx -p 5666 -c check_udp

windows.cfg, I leave to you to figure out, since you have the elements you need here.