How to monitor an AWS instance (Linux system) using nagios in local machine as server via nrpe plugin [closed]

I have my nagios core installed in an local machine(linux 16.04), which is perfectly monitoring my local remote machines. But i want to monitor an AWS instance (linux machine) using the same local machine which i’m using to monitor the other local remote machine via nrpe plugin. But the problem with the same is that a connection can’t be established between the server and the instance as each time I run the ./check_nrpe command i get this output : “CHECK_NRPE STATE CRITICAL: Socket timeout after 10 seconds.”

Please put some light on the same. Any kind of help will be appreciated.

Answer

check_nrpe usually connects to the nrpe process on the server on port 5666 or using xinetd on port 2098, so you would need to open whichever port you are using in your AWS security groups. If you can only allow access from your home IP that would improve security a little.
Also check that nrpe is listening on 0.0.0.0 or the internal IP of the instance rather that 127.0.0.1.

Attribution
Source : Link , Question Author : Maniraj , Answer Author : Simon Greenwood

Leave a Comment