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:
- Modify the distro’s package manager repositories.
- Installing the prerequisite packages
- Creating required users and groups
- Defining services for NRPE daemon(XINETD)
- Compiling and installing the agents and few plugins
- It will configuring the firewall
- Configuring the ports in /etc/services
- 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
~]#./configure ~]#make ~]#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
Run the wrapper script (fullinstall.sh) as root credentials
Type yes and hit the Enter, Enter your 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
Goto /etc/xinetd.d/nrpe for verify your nagios server ip address.
You can verify ports in /etc/services
Now restart the NRPE daemon
~]#systemctl restart xinetd.service
Check nrpe port listening or not?
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.
Thanks for your wonderful Support and Encouragement
Stay Connected With Us. Learn More and Earn More