CHECK_NRPE: Socket timeout after 20 seconds.

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

CHECK_NRPE: Socket timeout after 20 seconds.

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Post 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?
wfournier
Posts: 7
Joined: Fri Oct 04, 2013 2:44 am

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Post by wfournier »

Check the definition of your check command, where you call check_nrpe, that has a timeout setting as well.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Post 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.
stecino
Posts: 248
Joined: Thu Mar 14, 2013 4:42 pm

Re: CHECK_NRPE: Socket timeout after 20 seconds.

Post by stecino »

Thanks, I think I got it
Locked