For redhat/centos

Client side

yum install epel-release
yum install
# this repo is for centos 7
yum install nrpe nagios-plugins-users nagios-plugins-load nagios-plugins-swap nagios-plugins-disk nagios-plugins-procs
vi /etc/nrpe.d/op5_commands.cfg
# it’s optional
vi /etc/nagios/nrpe.cfg
# disk in that file and mention hard-disk number and restart and enable service
# 2.allowed_hosts=,::1, (mention server ip on clent pc in nrpe.conf file)
systemctl restart nrpe
systemctl enable nrpe

Server side

This is the location of nagios configuration file: /usr/local/nagios/etc/objects/linux/linux-hostgroups.cfg

vi linux-hostgroups.cfg
# in this file remove client name from no-disk motoring group
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
service nagios restart

Note : check if port 5666 is open on client side for nagios server (vesta)

for ubuntu

Step 2 – Install NRPE Service

sudo apt-get install nagios-nrpe-server nagios-plugins

Step 3 – Configure NRPE

After the installation is complete, edit the nrpe file /etc/nagios/nrpe.cfg:
vim /etc/nagios/nrpe.cfg

Step 4 – Restart NRPE

service nagios-nrpe-server restart

Adding new host to monitor in Nagios

To add a remote host you need to create two new files “hosts.cfg” and “services.cfg” under “/usr/local/nagios/etc/” location.


# You can specify individual object config files as shown below:

# Definitions for monitoring the local (Linux) host


you need to choose the file on the requirement for me now is /usr/local/nagios/etc/objects/linux/linux-hosts.cfg


/usr/local/nagios/etc/objects/linux/linux-template.cfg is the service file

Finally, verify Nagios Configuration files for any errors.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Leave a Comment

Your email address will not be published. Required fields are marked *

Open chat