CHECK_NRPE: Socket timeout after 10 seconds

checking the NRPE installations when we use this command …

# /usr/local/nagios/libexec/check_nrpe -H localhost

or

# /usr/local/nagios/libexec/check_nrpe -H <IP Address of remote machine>

e.g.

# /usr/local/nagios/libexec/check_nrpe -H 10.32.23.189

shows following error message…

CHECK_NRPE: Socket timeout after 10 seconds

So, I googled alot, after searching alot, I came across few of the solutions, (thanks for those who post it).

I am just clubbing those solution…

1. check that local NRPE (remote host) is working fine…

# /usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.8

(So, u got the above output, means remote host NRPE installation is fine.)

2. Now, from the nagios server box, run the comand

# /usr/local/nagios/libexec/check_nrpe -H
CHECK_NRPE: Socket timeout after 10 seconds.

ok, u got the error ! hmmm…

3. Now, check that ur nagios server is allowing the incoming & outgoing connection via port 5666

# /sbin/iptables -A INPUT -p tcp  --dport 5666 -j ACCEPT
# /sbin/iptables -A OUTPUT -p tcp  --dport 5666 -j ACCEPT

4.After adding the rules, make sure to save your new IPTables rules by doing

# /sbin/iptables-save > /etc/sysconfig/iptables

that’s it !!!

Try again the command

# /usr/local/nagios/libexec/check_nrpe -H localhost

or

# /usr/local/nagios/libexec/check_nrpe -H <IP Address of remote machine>

Advertisements
  1. November 21st, 2012
    Trackback from : custom nrpe plugin in nagios

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: