getting following error :

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

But it's working for localhost

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

ps i have checked security groups as well as iptables

Also on Nagios server :

# /usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.13
[root@ADM-PROD-NAGIOS ec2-user]# /usr/local/nagios/libexec/check_nrpe -H monitoring-host-ip
NRPE v2.15
  • do you have nagios client running in the remote machine? Do you have opened 5666/tcp alllow Nagios IP in the AWS console firewall? – Rui F Ribeiro Nov 25 '15 at 10:55
  • I guess # /usr/local/nagios/libexec/check_nrpe -H localhost NRPE v2.15 this on remote hosts proves nagios client is running on remote machine – Ashish Karpe Nov 25 '15 at 10:59
  • # netstat -at | grep nrpe tcp 0 0 :nrpe *: LISTEN – Ashish Karpe Nov 25 '15 at 10:59

There are two thing in nrpe.cfg.

  1. allowed_hosts
  2. server_address

In allowed_host we should mention public IP of Nagios server if it is outside the LAN.

In server_address we should mention the IP of the local machine which is to listen nrpe, because we might have multiple ethernet ports enabled and IPs associated with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.