Install Nagios client with below steps. It communicates with Nagios server and alert us if any server or services has any issues

Login to the client machine as root

1. Create group nagios as root user

 groupadd -g 1001 nagios  

2. Create user id nagios with group nagios


  useradd -u 1001 -g 1001 -c "Nagios Monitoring Tool" -d /home/nagios -s /bin/bash nagios  ## 1001 is an example of uid and gid 
 mkdir /home/nagios
 chown -R nagios:nagios /home/nagios
 passwd nagios 

3. Login to Nagios user created and follow the below steps.

 su – nagios
 mkdir downloads 

4. Download the latest nagios-plugins and nrpe.


5. Install Nagios Plugin. Untar  nagios-plugins-1.4.15.tar.gz

tar -zxvf  nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure --prefix=/home/nagios/nagios
make install 

6. Install nrpe. Untar nrpe-2.12.tar.gz

tar -zxvf  nrpe-2.12.tar.gz
cd nrpe-2.12
./configure --prefix=/home/nagios/nagios 

Here if the command fails for ssl libraries install the reqd ones and check that there is a link in /usr/lib for the libssl….version file as in this link.

make all
make install-plugin
make install-daemon
make install-daemon-config

As root do

make install-xinetd 

6. Edit the /etc/xinetd.d/nrpe file and add the IP address of the Nagios Server to the only_from directive.

only_from = <nagios_server_ip_address>  

7. Add the following entry for the NRPE daemon to the /etc/services file.

nrpe              5666/tcp # NRPE 

8. If  xinetd not installed in the server, install it and then restart  the xinetd process

apt-get install xineted
/etc/init.d/xinetd restart 

9. Login to nagios user and configure all your nrpe plugins. There are multiple plugins found for Nagios to monitor various services. Edit  in /home/nagios/nagios/etc/nrpe.cfg

10. Some nrpe.conf entry.Add the lines…  In first line if u want to add any other partitions append -p /partition name

command[check_disk]=/home/nagios/nagios/libexec/check_disk -w 10% -c 5% -p / -p /home -u GB

command[check_mailq]=/home/nagios/nagios/libexec/check_mailq -w 5 -c 10 -M sendmail

command[check_log]=/home/nagios/nagios/libexec/check_log -F /var/log/messages -O /home/nagios/nagios/check_var_log_messages.old -q ERROR

11. As root restart the xinetd process after making these changes.

/etc/init.d/xinetd restart

You are Done with Nagios Client Installation. Enjoy.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s