The Nagios Plugins are the components that do the actual monitoring work. They are all bash scripts and are located in:
To make the plugins/agents talk with server/Nagios Core you use the NRPE (Nagios Remote Plugin Executor).
Install the EPEL (Extra Packages for Enterprise Linux) repository. [https://fedoraproject.org/wiki/EPEL]
Install NRPE and all Nagios plugins.
Add the Nagios Core server IP adress.
Start the nrpe service or restart if you have previously started it, to let the new configuration take effects.
The NRPE is using port 5666 (see /etc/nagios/nrpe.cfg) to communicate with the server, so we need to open that port in the firewall. Below is the current settings in iptables for the client computer we are trying to monitor.
Open tcp port 5666 for incoming traffic.
Nagios Core Server Configuration
Install the nagios nrpe plugin on the server.
Then we need to enable it. Add the below command to the end of the file.
Before we can proceed, we now need to understand how Nagios arrenge items in it's admin GUI.
If you look at the selected menu items to the right, I have selected:
- Host Groups
- Service Groups
Now if we open the main nagios configuration file, you will see a similiar structure of the configuration files.
You can open the /etc/nagios/objects/localhost.cfg and compare how items are arrenged in the web admin GUI.
Now when we have got a basic understanding of the internal configuration structure we are going to put our new configuration file in /etc/nagios/conf.d/.
Finally restart nagios service and watch you new Host and Service in the web admin GUI.
If you run into problems, open the default nagios log file.
And RHEL default log file. And also read mine previous blog how to configure iptables and logging. [http://magnus-k-karlsson.blogspot.se/2014/01/configure-iptables-for-ftp-server-vsftp.html]