Saturday, December 31, 2016

FIX "CRITICAL – Socket timeout after 10 seconds" - Nagios

How to fix “CRITICAL – Socket timeout after 10 seconds” error?
We can fix this by increasing the “Socket timeout” value from the default 10 seconds to let’s say 20.

We can do this by adding a parameter to a specific command defined in commands.cfg file on your Nagios server. Commands.cfg file is usually located at /usr/local/nagios/etc/objects/commands.cfg (if you compiled Nagios) or /etc/nagios/commands.cfg (if you installed Nagios from RPM).

Read more about commands.cfg in my post “Nagios configuration – How to configure Nagios” post.

BEFORE (/usr/local/nagios/etc/objects/commands.cfg):

define command {
 command_name    check_nrpe
 command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
 }
AFTER (/usr/local/nagios/etc/objects/commands.cfg):

define command {
 command_name    check_nrpe
 command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 20
 }
There are also other commands that support the “-t” parameter! Be sure to add a “-t 20” parameter to the command you had “CRITICAL – Socket timeout after 10 seconds” problems with ??

No comments:

Post a Comment