Page 3 of 5

Re: returned an invaled return code 255

Posted: Fri May 08, 2015 10:51 am
by jolson
You're right - it is odd that it's working locally but not remotely. Have you tried restarting NSClient already?

Please open services.msc and find NSClient++ - restart the service and re-try the check from Nagios.

Re: returned an invaled return code 255

Posted: Fri May 08, 2015 11:48 am
by ariarlet
ooooh great now this run :D
but now you need another server than not read

Re: returned an invaled return code 255

Posted: Fri May 08, 2015 11:54 am
by jolson
but now you need another server than not read
Could you please rephrase this sentence? I am not sure what you mean.

Re: returned an invaled return code 255

Posted: Mon May 11, 2015 9:11 am
by ariarlet
Now I have no servers that instead reads the logs locally if

Re: returned an invaled return code 255

Posted: Mon May 11, 2015 9:45 am
by jolson
Do you have a server that reads logs remotely instead of locally - or something similar?

I'm still not 100% clear on what you're asking.

Re: returned an invaled return code 255

Posted: Mon May 11, 2015 9:57 am
by ariarlet
yes, the server have got logs.

Local this program is running but remot not run.

And the other server remot not run, this error is:

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_nrpe -H [SERVER] -p 5666 -c check_log3 -t 30  -a -p "unable" -l "D:/alert_enetvae.log" -c 1 
OUTPUT: Plug-in error: time out after 15 seconds
Sorry my english is bad.

Re: returned an invaled return code 255

Posted: Mon May 11, 2015 9:59 am
by jolson
Let's try giving your command a longer timeout:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.82.4.115 -p 5666 -c check_log3 -t 30  -a -p "unable" -l "D:/alert_enetvae.log" -t 45 -c 1 
How does that work for you?

Re: returned an invaled return code 255

Posted: Mon May 11, 2015 10:14 am
by ariarlet
then not read the second -t but i write

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_nrpe -H [HOST] -p 5666 -c check_log3 -t 30 -a -p "unable" -l "D:/alert_enetvae.log" -a -t 45 -a -c 1  
OUTPUT: Cannot read $ARG2$

Re: returned an invaled return code 255

Posted: Mon May 11, 2015 10:27 am
by jolson
Sorry - I missed that you already had a timeout added. Here, try the following:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H [HOST] -p 5666 -c check_log3 -t 30 -a -p "unable" -l "D:/alert_enetvae.log" -a --no-timeout -a -c 1
This plugin will set an internal time-out alarm based on the $TIMEOUT
setting found in utils.pm. You can use the --no-timeout option to disable
this.
http://exchange.nagios.org/directory/Pl ... pl/details

Re: returned an invaled return code 255

Posted: Mon May 11, 2015 10:31 am
by ariarlet
thanks

but then this not read arg2 = D:/alert_enetvae.log but in server there are logs. And the other server i haver got same problem, local the program run good

Code: Select all

OUTPUT: Cannot read $ARG2$