III. 4 Configuration steps on the Nagios monitoring server to monitor remote server:
1. Download NRPE Add-on
Download nrpe-2.13.tar.gz from Nagios.org and move to /home/downloads:
2. Install check_nrpe on the nagios monitoring server
tar xvfz nrpe-2.13.tar.gz cd nrpe-2.13 ./configure make all make install-plugin ./configure will give a configuration summary as shown below: *** Configuration summary for nrpe 2.13 015-19-2012 ***: General Options: ————————- NRPE port: 5666 NRPE user: nagios NRPE group: nagios Nagios user: nagios Nagios group: nagios
Note: I got the “checking for SSL headers… configure: error: Cannot find ssl headers” error message while performing ./configure. Install openssl-devel as shown below and run the ./configure again to fix the problem.
yum -y install openssl-devel
Verify whether nagios monitoring server can talk to the remotehost.
/usr/local/nagios/libexec/check_nrpe -H 192.168.1.3 NRPE v2.12
Note: 192.168.1.3 in the ip-address of the remotehost where the NRPE and nagios plugin was installed as explained in Section II above.
3. Create host and service definition for remotehost
Create a new configuration file /usr/local/nagios/etc/objects/remotehost.cfg to define the host and service definition for this particular remotehost. It is good to take the localhost.cfg and copy it as remotehost.cfg and start modifying it according to your needs.
host definition sample:
define host{ use linux-server host_name remotehost alias Remote Host address 192.168.1.3 contact_groups admins }
Service definition sample:
define service{ use generic-service service_description Root Partition contact_groups admins check_command check_nrpe!check_disk }
Note: In all the above examples, replace remotehost with the corresponding hostname of your remote server.
4. Restart the nagios service
Restart the nagios as shown below and login to the nagios web (http://nagios-server/nagios/) to verify the status of the remotehost linux sever that was added to nagios for monitoring.
service nagios reload
Originally posted 2016-01-11 05:52:57.