Page 1 of 1
NRPE Timeout
Posted: Thu Aug 11, 2011 9:28 am
by axj0187
NRPE agent has been running fine for weeks now. Then out of nowhere I started getting "CHECK_NRPE: Socket timeout after 30 seconds." errors, but only on service checks using check_init_service, everything else (CPU,Disk,Mem) is returning OK. This is very strange. Any suggestions?
Re: NRPE Timeout
Posted: Thu Aug 11, 2011 10:07 am
by lmiltchev
Can you run the "check_init_service" from the command line and post the output?
You can obtain some additional information on command line testing by reading here:
http://support.nagios.com/wiki/index.ph ... k_Commands
Re: NRPE Timeout
Posted: Thu Aug 11, 2011 10:13 am
by axj0187
Do you mean on the machine I am monitoring?
If so:
./check_init_service sshd
sshd (pid 3349 2504 1971) is running...
Re: NRPE Timeout
Posted: Thu Aug 11, 2011 4:49 pm
by lmiltchev
You can try increasing the value for the timeout in your command definition, for example you may have:
Code: Select all
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
Try changing "-t 30" to "-t 60" or "-t 90".
After this, run in terminal:
and see if you are still getting a timeout message.
Re: NRPE Timeout
Posted: Fri Aug 12, 2011 7:45 am
by axj0187
Now after a little while it returns with NRPE: Unable to Read Output. Ive been hacking away at this for a day now and have no idea what else to try, any other ideas?
Thanks for the help.
Re: NRPE Timeout
Posted: Fri Aug 12, 2011 10:11 am
by nscott
That error generally means that plugins have been moved or the check_command (on the remote box) was redefined. (On the remote box) Make sure you're plugins are still in /usr/local/nagios/libexec, are executable by the user nagios, and make sure (on the remote box) that the check commands, usually in the /usr/local/nagios/etc/ are properly setup.
Re: NRPE Timeout
Posted: Fri Aug 12, 2011 3:02 pm
by axj0187
I removed sudo from the command definition and this fixed the problem. Thanks.