Page 2 of 3
Re: Help with NRPE please
Posted: Wed Sep 11, 2013 4:11 pm
by lmiltchev
I tried it on my test box and it seems it's working fine. In the "NSC.ini" file, I have:
Code: Select all
check_winfile=scripts\check_winfile.exe //T:30 //NoLogo $ARG1$
I tested it from the nagios server, by running:
Code: Select all
./check_nrpe -H <windows_client_ip> -c check_winfile -a '-t c:\tmp --filter "age ge -24 hours" --critical 0'
FILE OK - 0 files out of 7 to consider|'selected files'=0;;0; 'all files'=7 'deleted files'=0
Re: Help with NRPE please
Posted: Wed Sep 11, 2013 4:25 pm
by csward
Yes, i can get this working locally, just not through nagios. I keep getting the:
(No output returned from plugin)
Re: Help with NRPE please
Posted: Wed Sep 11, 2013 5:01 pm
by csward
Ran from the nagios command line and get:
administrator@CSP-NAG-P01:/usr/local/src/nagios-plugins-1.4.16/plugins$ ./check_nrpe -H CSITFPSP01A -c check_winfile -a '-target c:\test --filter "age ge -24 hours" --critical 0'
FILE UNKNOWN - No targets are specified.
Re: Help with NRPE please
Posted: Wed Sep 11, 2013 5:02 pm
by lmiltchev
Did you add $ARG2$ to the check_nrpe command definition? Did you set up the "check_winfile" command definition in the "NSC.ini" (nsclient.ini) file in a similar way?
Code: Select all
check_winfile=scripts\check_winfile.exe //T:30 //NoLogo $ARG1$
What happens, when you run a check from the nagios server?
Code: Select all
./check_nrpe -H <windows_client_ip> -c check_winfile -a '-t <path to your file> --filter "age ge -24 hours" --critical 0'
Re: Help with NRPE please
Posted: Wed Sep 11, 2013 5:20 pm
by csward
Tried with IP also:
administrator@CSP-NAG-P01:/usr/local/src/nagios-plugins-1.4.16/plugins$ ./check_nrpe -H 10.64.3.157 -c check_winfile -a '-t "c:\Test" --filter "age ge -24 hours" --critical 0'
FILE UNKNOWN - No targets are specified.
Yes, i added the $ARG2$
Not sure why this isn't working. Seems to work from the host.
Re: Help with NRPE please
Posted: Thu Sep 12, 2013 9:06 am
by lmiltchev
Hm-m, do you have the following two lines in the NSC.ini (nsclient.ini) under the NRPE and External Scripts sections?
Code: Select all
allow arguments = true
allow nasty characters = true
Re: Help with NRPE please
Posted: Thu Sep 12, 2013 9:36 am
by csward
That was it. At least it worked for my test folder. I thought I had this set, apparently there is more than one place to do this.
I have a lot of files in the production folder and I'm getting this error:
CHECK_NRPE: Socket timeout after 10 seconds.
Is there a way to extend this? I have this set to -t 120
so not sure why it's timing out at 10 seconds.
Thanks
Re: Help with NRPE please
Posted: Thu Sep 12, 2013 9:47 am
by slansing
Do you have a "-t 10" hard coded in your commands anywhere? On the check command, service definition, or the nsclient command? If not run the following, you may find you must increase the timeout in the nagios.cfg:
Code: Select all
cat /usr/local/nagios/etc/nagios.cfg | grep timeout
Re: Help with NRPE please
Posted: Thu Sep 12, 2013 9:47 am
by csward
actually, after running this from the nagios command prompt:
./check_nrpe -H 10.64.3.157 -t 120 -c check_winfile -a '-t j:\AWIIProxy\ProcessedMessages'
I get this:
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
Since it works with my c:\test folder could this just be a permission issue?
Re: Help with NRPE please
Posted: Thu Sep 12, 2013 9:49 am
by csward
service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
# service_check_timeout seconds. This can be useful if a
service_check_timeout_state=c