How to increase NRPE socket timeout??

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

Re: How to increase NRPE socket timeout??

Post by abrist »

Just to recap. You need to do 3 things:
1. Verify that service_check_timeout in the nagios.cfg on your nagios server is set high enough:
grep service_check_timeout /usr/local/nagios/etc/nagios.cfg
NOTE: Remember to restart nagios after any changes to nagios.cfg.
2. Add "-t" to the check_nrpe command on the nagios server:
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$
3. Verify that the command_timeout in the nrpe.cfg file on the remote host is configured to be long enough:

Code: Select all

grep command_timeout /usr/local/nagios/etc/nrpe.cfg
NOTE: Remember to restart the nrpe daemon on the remote host after changing any nrpe.cfg directive values.

Does the command run correctly with -t 30 from the cli?

Code: Select all

./check_nrpe -H <host> -t 30 -c check_cassandra
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.
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: How to increase NRPE socket timeout??

Post by xpac »

Here's a snapshot:
Attachments
command.PNG
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to increase NRPE socket timeout??

Post by abrist »

xpac wrote:Here's a snapshot:
Looks ok.

Does the command run correctly with -t 30 from the cli?

Code: Select all

 ./check_nrpe -H <host> -t 30 -c check_cassandra
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.
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: How to increase NRPE socket timeout??

Post by xpac »

abrist wrote:Just to recap. You need to do 3 things:
1. Verify that service_check_timeout in the nagios.cfg on your nagios server is set high enough:
grep service_check_timeout /usr/local/nagios/etc/nagios.cfg
NOTE: Remember to restart nagios after any changes to nagios.cfg.
2. Add "-t" to the check_nrpe command on the nagios server:
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$
3. Verify that the command_timeout in the nrpe.cfg file on the remote host is configured to be long enough:

Code: Select all

grep command_timeout /usr/local/nagios/etc/nrpe.cfg
NOTE: Remember to restart the nrpe daemon on the remote host after changing any nrpe.cfg directive values.

Does the command run correctly with -t 30 from the cli?

Code: Select all

./check_nrpe -H <host> -t 30 -c check_cassandra
1, 2, and 3 are all correct.

If I run the command with -t 30 from the cli, it does execute properly
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: How to increase NRPE socket timeout??

Post by jdalrymple »

Your Nagios is straight up misbehaving.

Next thing that I personally would do is:

nagios.cfg:

Code: Select all

debug_level=-1
debug_verbosity=2
max_debug_file_size=20971520
Make sure you have 20MB of free disk space, restart Nagios then dig through debug to see why it's misbehaving.
Locked