Contents...
NRPE stands for Nagios Remote Plugin Executor, NRPE is designed to allow you to execute the Nagios plugins one remote Linux machines. It allows Nagios to monitor local host resources such as CPU statistics, Memory statistics, Disk Space etc on remote machine.
Follow the below link to install Nagios Server.
Install NRPE on CentOS and RHEL
Follow the below steps to install NRPE on CentOS and RHEL.
Step #1 : Install EPEL Repository
First of all install EPEL repository on your system. It provides NRPE packages and plugins for Nagios. Follow the below link to install and enable the EPEL repository on the Linux system.
Step #2 : Install NRPE and NRPE-Plugins
Now after installing and enabling EPEL repository, install NRPE and plugins on your system.
# yum --enablerepo=epel -y install nrpe nagios-plugins
You can also list of available commands packages and install in on your system using below command.
# yum --enablerepo=epel -y list nagios-plugins* Installed Packages nagios-plugins.x86_64 2.2.1-4git.el7 @epel Available Packages nagios-plugins-all.x86_64 2.2.1-4git.el7 epel nagios-plugins-apt.x86_64 2.2.1-4git.el7 epel nagios-plugins-bacula.x86_64 5.2.13-23.1.el7 base nagios-plugins-bonding.x86_64 1.4-3.el7 epel nagios-plugins-breeze.x86_64 2.2.1-4git.el7 epel nagios-plugins-by_ssh.x86_64 2.2.1-4git.el7 epel nagios-plugins-check-updates.x86_64 1.6.18-2.el7 epel nagios-plugins-cluster.x86_64 2.2.1-4git.el7 epel nagios-plugins-dbi.x86_64 2.2.1-4git.el7 epel nagios-plugins-dhcp.x86_64 2.2.1-4git.el7 epel nagios-plugins-dig.x86_64 2.2.1-4git.el7 epel nagios-plugins-disk.x86_64 2.2.1-4git.el7 epel nagios-plugins-disk_smb.x86_64 2.2.1-4git.el7 epel nagios-plugins-dns.x86_64 2.2.1-4git.el7 epel ..... .....
Step #3 NRPE Configuration
After installing NRPE you need to edit its configuration file and start it.
# vim /etc/nagios/nrpe.cfg
Now add the below line with Nagios Server IP as shown below. In my case Nagios server IP is 192.168.0.5.
allowed_hosts=127.0.0.1, 192.168.0.5
Once edited the above file now lets see Nagios server is able to connect with NRPE client.
command[check_root_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p / command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
You can also add more commands like above as per requirement of monitoring.
Step #4 : Start NRPE Service
Now start and enable on boot the NRPE service after making all changes to apply the changes.
# systemctl enable nrpe.service # systemctl start nrpe.service
Step #5 : Testing From Nagios Server
Now login to your Nagios server and execute the below command to verify that Nagios server is able to connect to client NRPE service. If it able to connect it will show version of clients NRPE package. In my case remote system IP is 192.168.0.6.
# check_nrpe -H 192.168.0.6 NRPE v3.1
If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at LookLinux Submit Article. Stay connected to Facebook.
Leave a Comment