NRPE remote host setup on amazon ec2

2.2k views Asked by At

I have been trying to monitor a remote server using Nagios-Nrpe. The remote host is the Amazon Ec2 instance where I have installed npre daemon on xinetd.

  • I have added my nagios server IP to "only-from" property in /etc/xinet.d/nrpe file.
  • I have added the entry in /etc/services.
  • I have made changes in iptables also.
  • I have added an entry for TCP port 5666 in my security group too.

These commands work properly:

$ netstat -at | grep nrpe 
$usr/local/nagios/libexec/check_nrpe -H localhost

I have setup the nagios server and nrpe_check plugin on my local machine. But whenever I am doing:

/usr/local/nagios/libexec/check_nrpe -H <"amazon-ec2-IP-address">

I get the following error:

connect to address <"amazon-ec2-IP-address"> port 5666: Connection refused ......
connect to host <"amazon-ec2-IP-address"> port 5666: Connection refused

I have tried making the nrpe client on another linux on my LAN and the command worked, but not for Amazon Ec2.

If anyone has the solution for this issue, please do share ASAP.

1

There are 1 answers

0
pulsarjune On

Make sure you have,

Opened up port 5666 in the Security Group linked to the EC2-instance.