NRPE installation and configuration in remote Linux

NRPE installation Nagios remote plugin executor. NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics (disk usage, CPU load, etc.). NRPE can also communicate with some of the Windows agent addons, so you can execute scripts and check metrics on remote Windows machines as well.

Note: The NRPE addon requires that Nagios Plugins must be installed on the remote Linux machine. Without these, the NRPE daemon will not work and will not monitor any services.

Related Topics:

Prepare Linux server for Nagios installation

Nagios 4.1.1 Installation in RHEL 7 / Centos 7

NSClient++ installation in Windows machine

Step 1: NRPE Installation dependencies first

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

yum install - tech tutorials


Step 2: Create Nagios user

~]# useradd nagios 
~]# passwd nagios

useradd - tech tutorials

Step 3: Installation Nagios plugins

cd /tmp 

Step 4: Extract Nagios plugins, compile and install

~]# tar -xzvf nagios-plugins-2.1.1.tar.gz 
~]# ll -l 
~]# cd nagios-plugins-2.1.1 
~]# ./configure 
~]# make 
~]# make install 
~]# chown nagios.nagios /usr/local/nagios 
~]# chown -R nagios.nagios /usr/local/nagios/libexec

extract nagios plugins - tech tutorails

Step 5:  We have to run nrpe agent under the xinted service

~]# yum install xinetd

xinetd installation - tech tutorials

Step 6: Download and install NRPE package

To install NRPE deamon and run NRPE as a service using xinetd

~]# cd /tmp  
~]# wget 
~]# tar xzf nrpe-2.15.tar.gz 
~]# cd nrpe-2.15 
~]# ./configure 
~]# make all 
~]# make install-plugin 
~]# make install-daemon 
~]# make install-daemon-config 
~]# make install-xinetd

nrpe package extract

nrpe installation

Step 7: Configure the NRPE service

Now open /etc/xinetd.d/nrpe file and add the localhost and IP address of the Nagios Server

nrpe xinetd config file - tech tutorails







Open /etc/services

~]# vi /etc/services
~]# nrpe            5666/tcp                 #NRPE client entry
~]# service xinetd restart

Step 8: Verify NRPE is listening

~]# netstat -at | grep nrpe

Step 9: Configure the Firewall to allow the NRPE port number

~]# firewall-cmd --zone-public --add-port=5666/tcp -permanent
~]# firewall-cmd --reload


Go to Nagios Server then follow the below steps verify NRPE is working. Now verify you can able to run the commands on remote client using NRPE.

~]# cd /usr/local/nagios/libexec  
~]# ./check_nrpe -H <Remote host IP>

Sample output

~]# NRPE v2.15

Now configure your services to monitor.

See Video Tutorial for details installation and configuration

NRPE installation NRPE installation NRPE installation

Thanks for your wonderful Support and Encouragement


Ankam Ravi Kumar

Working as Linux / Storage Administrator L3. Interested in sharing the knowledge.

2 Responses

  1. blank faizan sheikh says:

    Hello Ravi ,
    If you dont want to share knowledge then why u r wasting time of people , on youtube as well in your block you r providing only half content , If I talk about your youtube videos , there is also you cutout some steps and providing in paid channel.
    Why your misleading people , mentioned directly all your contents are paid.
    You are writing that you r interested in sharing knowledge , fuck sharing knowledge .

    • blank ARK says:

      It might be your fault in reading, i think you don’t know Linux at all. Its a complete article for NRPE installation.

Leave a Reply

Your email address will not be published.