How to Install NRPE on CentOS 7: Let’s do it!
Looking for steps to ‘Install NRPE on CentOS 7’?
Nagios provides complete monitoring of Linux operating systems with the help of the NRPE service. Often, bad NRPE installation can stop Nagios from working.
At Bobcares, we often get requests from our customers to install NRPE as part of our Server Management Services.
Today, let’s get into the details on how our Support Engineers help to install NRPE.
What is NRPE?
Before getting into the detailed NRPE installation, let’s have a quick look at the NRPE.
NRPE stands for Nagios Remote Plugin Executor. Its an agent between remote Linux machine and Nagios Monitoring host.
Nagios is a complete server monitoring system that alerts users when things go wrong and alert them a second time when the problem has been resolved.
NRPE is a Nagios agent that helps remote system monitoring using scripts that are hosted on the remote systems.
In general, NRPE allows you to monitor remote machine metrics such as disk usage, CPU load, etc. It can also communicate with some of the Windows agent add-ons.
Let’s detail how we install NRPE on CentOS 7 for our customers.
How we ‘Install NRPE on CentOS 7’?
At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers requesting to install NRPE.
We can further divide the procedure of installing NRPE in the user(remote) end into 3 basic categories.
Now, let’s see how our Support Engineers help the customers by installing NRPE on CentOS 7.
NRPE is installed on the remote host that we want to monitor from our Nagios server.
1. Initially, we enable the EPEL yum repository since NRPE packages and plugin are available in this. We follow the below command to enable it.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
We can also use the following command to enable EPEL.
yum install epel-release
2. After enabling this, we install the NRPE and plugins into the customer’s system by running the below command.
yum --enablerepo=epel -y install nrpe nagios-plugins
3. Thereafter, we install the supporting commands that NRPE executes for monitoring services. We can see the list of available commands packages by running the following command.
yum --enablerepo=epel -y list nagios-plugins*
For instance, the prompt appears as follows.
From this, we install the required packages to the remote(user’s) system.
After the installation of NRPE, we then move on to configure it.
By default, the NRPE configuration file will be available at:
First and foremost, we have to configure Nagios server IP to this NRPE configuration file for the proper working of the monitoring system.
1. Initially, we open the configuration file using the command follows.
2. We then add the Nagios server IP with the allowed_hosts field in the configuration file.
Here in the place of x.x.x.x we have to provide corresponding Nagios server IP.
Then save the configuration file. Now the Nagios server is able to connect to NRPE client(remote server).
3. After this, we add the monitoring task according to the requirement in the same configuration file.
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
We can add more commands according to the requirement of the tasks to monitor.
4. Finally, after adding the necessary tasks, we restart the services.
systemctl enable nrpe.service
systemctl start nrpe.service
As a final procedure, we need to test whether our installation is proper or not.
For this, we log in to the Nagios server.
Then we execute the following command to check whether the Nagios server is able to connect to clients NRPE services.
check_nrpe -H x.x.x.x
Here, X.X.X.X indicates the IP address of the remote server where NRPE is installed.
The prompt will then display the version of NRPE installed in the remote server.
NRPE help Nagios server to remotely execute plugins/commands on Linux/Unix machines. We Install NRPE on centos 7 of the remote host which we want to monitor from our Nagios server.
[Having trouble when trying to ‘Install NRPE on CentOS 7’? – Our Experts are available 24/7.]
In short, NRPE is the agent that executes the monitoring task between remote Linux machine and Nagios Monitoring host. Today, we saw how our Support Engineers helped the customers to ‘Install NRPE on CentOS 7’.