Page 1 of 1
CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Mon Dec 16, 2013 9:27 pm
by stecino
Hello,
I have logfile check monitor, which does a error match on the logfile on NRPE client.
Sometimes I get this connection timeout error. Has someone noticed this issue on their end. Is it possible there maybe some logfile locking issues, or something else?
Thanks in advance
Re: CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Tue Dec 17, 2013 10:29 am
by abrist
stecino wrote: Is it possible there maybe some logfile locking issues, or something else?
Probably not file locking issues. If the load/bandwidth is high on the remote system, it may be just failing due to timeout. They could also be restarting network services etc, or backing up the server. There are a large number of possible causes. My suggestion would be ask the admin of the server if there was anything done to the server around the same time your check timed out.
Re: CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Wed Dec 18, 2013 9:12 pm
by stecino
So these are my settings
service_check_timeout=60
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
ocsp_timeout=5
perfdata_timeout=5
Why would I be getting critical at 20seconds? Where is this timeout? Is this on the NRPE client side?
Re: CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Thu Dec 19, 2013 6:37 am
by wfournier
Check the definition of your check command, where you call check_nrpe, that has a timeout setting as well.
Re: CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Thu Dec 19, 2013 10:40 am
by abrist
Timeout can be controlled by the "-t" switch for the check_nrpe command, in nrpe.cfg on the remote host, or a system wide setting in nagios.cfg.
Re: CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Thu Dec 19, 2013 2:34 pm
by stecino
These are my command definitions:
# 'check_nrpe' command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
define command {
command_name check_nrpe_arg
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t $ARG1$ -c $ARG2$ -a $ARG3$
}
At the moment, I am using the first one, and to be honest, given that I have alot of configuration tied to it, I would rather change it at the system level. So given the parameters that I have included up top, what else do I need to adjust or to add?
Re: CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Thu Dec 19, 2013 3:56 pm
by slansing
It looks like you will need to place your timeout number in seconds in the ARG1 portion of your service definitions. Make sure they are using the check_nrpe_arg command you defined. I'd recommend trying 30 or 40 for the timeout range.
Re: CHECK_NRPE: Socket timeout after 20 seconds.
Posted: Thu Dec 19, 2013 9:13 pm
by stecino
Thanks, I think I got it