What is NAGIOS:
Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.
Nagios monitors your entire IT infrastructure to ensure systems, applications, services, and business processes are functioning properly. In the event of a failure, Nagios can alert technical staff of the problem, allowing them to begin remediation processes before outages affect business processes, end-users, or customers. With Nagios you’ll never be left having to explain why an unseen infrastructure outage hurt your organization’s bottom line
1) Install the below listed packages and their binaries & libraries with necessary dependencies:
Additionally, httpd and php will reuqired to install on the nagios monitoring server.
To Create the nagios user in the client Machine:
Extract the Nagios Plugin. Create a directory for nagios:
After the download of nagios-plugin 2.1.4, need to extract it out:
Compile and Install Nagios Plugin:
Set the permission for the compiled plugin directories:
Mostly, the xinetd package will be installed, if not try to install that package as well.
NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics (disk usage, CPU load, etc.). NRPE can also communicate with some of the Windows agent addons, so you can execute scripts and check metrics on remote Windows machines as well.
Extract the NRPE tar file now:
The installation should be successfully completed now.. So next…
Create a nrpe file under the path as /etc/xinetd.d/nrpe:
|# default: off
# description: NRPE (Nagios Remote Plugin Executor)
flags = REUSE
type = UNLISTED
port = 5666
socket_type = stream
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /etc/nagios/nrpe.cfg –inetd
log_on_failure += USERID
disable = no
only_from = space
Next, you need to make an entry in the /etc/service file.. Before you edit take a backup of this file for safety consideration:
and add the below line at the file :
nrpe 5666/tcp NRPE
Now, restart the xinetd service:
To verify the nrpe service is running and responding in the client machine:
And to verify the nrpe daemon is listening as expected:
To make changes in the nagios configuration file:
Open the path /usr/local/nagios/etc/nagios.cfg [ Make a backup of this file before making changes].
NOTE: Place your client IP address and Hostname in /etc/hosts as well as in Nagios monitoring server too.
Then, create a directory under /etc for nagios:
Once done, restart the xinetd service.. to verify the NRPE daemon service is working or not:
Now, the communication is working fine, which can be verified using the ip address loaded in the web browser.