CHECK_NRPE:Socket timeout after 10 seconds

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ernie
Posts: 5
Joined: Tue Nov 17, 2015 10:58 pm

CHECK_NRPE:Socket timeout after 10 seconds

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: CHECK_NRPE:Socket timeout after 10 seconds

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked