Page 1 of 1

CHECK_NRPE:Socket timeout after 10 seconds

Posted: Thu May 31, 2018 11:33 pm
by ernie
Hi,
I often get NRPE socket timeout after 10 seconds on my certain services.

My current command for the services is;

Code: Select all

define command {
       command_name                  		check_nrpe_captive_rad_api
       command_line                  		$USER1$/check_nrpe -H $HOSTADDRESS$ -t 59 -c $ARG1$ $ARG2$
}
this is nrpe.cfg;

Code: Select all

# COMMAND TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# allow plugins to finish executing before killing them off.

command_timeout=60

# CONNECTION TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# wait for a connection to be established before exiting. This is sometimes
# seen where a network problem stops the SSL being established even though
# all network sessions are connected. This causes the nrpe daemons to
# accumulate, eating system resources. Do not set this too low.

connection_timeout=300

command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
the output check command should be;
HTTP OK: HTTP/1.1 200 OK - 191 bytes in 1.138 second response time

i do not understand why i get timeout after 10 seconds even i had config timeout as 59.
please advice.

Re: CHECK_NRPE:Socket timeout after 10 seconds

Posted: Fri Jun 01, 2018 1:40 pm
by npolovenko
Hi, @ernie. I'd also need to see the service definition for the http check you're running.
I'm looking at 4 commands in your nrpe.cfg file and none of them check http:

Code: Select all

command[check_users]=
command[check_load]=
command[check_disk]=
command[check_procs]=
Your nrpe.cfg file is missing a lot of the settings unless you copied only a part of it.

You don't really need to run nrpe if all you want is a http check:

Code: Select all

/usr/local/nagios/libexec/check_http -I url_goes_here
Run this command locally and let me know of the output.