Installing Linux NRPE Agent on RHEL 7/Centos 7

This document for how to installing Linux NRPE Agent on RHEL 7/Centos 7. It is for use by Nagios Administrators who want to monitor the remote Linux Servers with Nagios core / Nagios XI.

NRPE stands for Nagios Remot plugin executor which will execute on remote Linux machine and collect the data when Nagios server send an request NRPE will send an collected stats data to Nagios Server.

This will automatically number of things configure for you:

  1. Modify the distro’s package manager repositories.
  2. Installing the prerequisite packages
  3. Creating required users and groups
  4. Defining services for NRPE daemon(XINETD)
  5. Compiling and installing the agents and few plugins
  6. It will configuring the firewall
  7. Configuring the ports in /etc/services
  8. Configuring the agent.

Installing Linux NRPE agent in RHEL 7 / Centos 7

Installing the dependencies first on remote server by using yum command

~]#yum install -y gcc glibc glibc-common gd gd-devel make net-snmp php perl openssl-devel 

Create nagios user and set password

~]#useradd nagios

~]#passwd nagios

Now have to download and  install nagios plugin


Extract the nagios plugins

~]#tar -xzvf nagios-2.0.3.tar.gz

~]#cd nagios-2.0.3

Now compile and install

~]#make install

After installation an nagios plugin, give the permissions as below shown.

~]# chown nagios.nagios /usr/local/nagios 
~]# chown -R nagios.nagios /usr/local/nagios/libexec

Install the nrpe daemon

~]#yum install -y xinetd

Download the Linux NRPE Agent to the /tmp directory on the remote Linux machine you wish to monitor


Unpack the installation archive which you have downloaded

~]#tar -xzvf linux-nrpe-agent.tar.gz
~]#cd linux-nrpe-agent

Run the wrapper script ( as root credentials

linux nrpe agent installing 1

NRPE installation process

Type yes and hit the Enter, Enter your Nagios Server IP Address.

Provide Nagios Server IP Address

installing Linux NRPE Agent complete.

You have to goto nrpe.cfg file and add your nagios server ip address

~]#cd /usr/local/nagios/etc/

~]#vi nrpe.cfg

Add Nagios Server IP to allow

Goto /etc/xinetd.d/nrpe for verify your nagios server ip address.

~]#vi /etc/xinted.d/nrpe

Include Nagios Server IP

You can verify ports in /etc/services

~]#vi /etc/services

Add NRPE port numbers to communicate with services

Now restart the NRPE daemon

~]#systemctl restart xinetd.service

Check nrpe port listening or not?

Verify port is listening state

Now you have successfully installed and configured Linux NRPE Agent on remote Linux machine.


Nagios Remote Plugin executor is used to monitor remote Linux server (Nagios Client). After installing Linux NRPE agent we have to allow Nagios server IP from NRPE. NRPE agent send data using 5666, 5667 and 5668 ports.

Thanks for the read. Please provide your valuable feedback via comments.

Related Articles

Customise Linux Server for Nagios Server Installation

Monitoring Raid controller using Nagios

Thanks for your wonderful Support and Encouragement