Install Nagios3 from the Ubuntu repository.
bash# sudo aptitude install nagios3
Once it is installed run a pre-flight check to verify it is working correctly.
bash# sudo nagios3 -v /etc/nagios3/nagios.cfg
By default it should run and you should be able to login to the web interface after you create the nagios user. Move into the /etc/nagios3 directory and create a user to access the web interface.
bash# htpasswd -c htpasswd.users nagiosadmin
New password:
Re-type new password:
Adding password for user nagiosadmin
Change the user permission to htpasswd.users
bash# sudo chown root:www-data htpasswd.users
bash# sudo chmod 640 htpasswd.users
Now login to the web interface with http://SERVER_IP_ADDRESS/nagios3/
You will not have all of the rights to view everything but for the purposes of making sure it all works you will see it is all running. Now you need to configure it for your settings.
For this example the server host IP is 10.0.0.5 and the client host IP is 10.0.0.6
Installed NRPE via the nagios-nrpe-server in the Ubuntu repository on the client host:
bash# aptitude install nagios-nrpe-server
Verified process was running:
bash# netstat -an | grep 5666
Logon to the Nagios Server host and execute:
bash# /usr/lib/nagios/libexec/check_nrpe -H 10.0.0.6
If you see this error: "CHECK_NRPE: Error - Could not cocmplete SSL handshake." Tweaked the Ubuntu's nrpe config on the client host /etc/nagios/nrpe.cfg from
allowed_hosts=127.0.0.1
to
allowed_hosts=10.0.0.5 (my Nagios server host IP)
This is needed since the nagios plugin was installed without inetd/xinetd. Restarted nagios plugin:
bash# /etc/init.d/nagios-nrpe-server restart
Tested Again on the Nagios Server:
bash# /usr/local/nagios/libexec/check_nrpe -H 10.0.0.6
If you see this then nagios client NRPE configuration is successful.
--> NRPE v2.8.1