Follow through this guide to learn how to install Nagios NRPE agent on CentOS 8. In order to execute Nagios plugins that monitors various system services and metrics on a remote host, you need to install Nagios Remote Plugin Executor (NRPE).
Install Nagios NRPE Agent on CentOS 8
Nagios NRPE agents can be installed from the EPEL repos directly using the package manager or can be build from the source.
Install Nagios NRPE Agents From EPEL Repos
Install EPEL repos on CentOS 8 by running the command;
dnf install epel-release
Once the EPEL repos are installed, run DNF list command to check available NRPE packages.
dnf list nrpe
Last metadata expiration check: 0:45:46 ago on Fri 18 Oct 2019 04:15:03 PM EDT. Available Packages nrpe.x86_64 3.2.1-9.el8 epel
NRPE 3.2.1 is available for installation. The command below installs NRPE agent on CentOS 8.
dnf install nrpe
Confirm installed version once the installation completes.
NRPE - Nagios Remote Plugin Executor Version: 3.2.1
Run the commands below to start and enable nrpe to run on system boot.
systemctl enable nrpe --now
To check the status of NRPE agent;
systemctl status nrpe
● nrpe.service - Nagios Remote Plugin Executor Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2019-10-18 17:16:54 EDT; 25s ago Docs: http://www.nagios.org/documentation Main PID: 26565 (nrpe) Tasks: 1 (limit: 11523) Memory: 740.0K CGroup: /system.slice/nrpe.service └─26565 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f Oct 18 17:16:54 centos8.kifarunix-demo.com systemd: Started Nagios Remote Plugin Executor. Oct 18 17:16:55 centos8.kifarunix-demo.com nrpe: Starting up daemon Oct 18 17:16:55 centos8.kifarunix-demo.com nrpe: Server listening on 0.0.0.0 port 5666. Oct 18 17:16:55 centos8.kifarunix-demo.com nrpe: Server listening on :: port 5666. Oct 18 17:16:55 centos8.kifarunix-demo.com nrpe: Listening for connections on port 5666 Oct 18 17:16:55 centos8.kifarunix-demo.com nrpe: Allowing connections from: 127.0.0.1,::1
Open NRPE Port on FirewallD
NRPE uses port TCP 5666 by default. If firewallD is running, open this port to allow external access esp from Nagios Monitoring server.
firewall-cmd --add-port=5666/tcp --permanent firewall-cmd --reload
Install Nagios NRPE Agent from Source Code
You can as well build Nagios NRPE agent from the source code. Follow the guide below to learn how to build Nagios NRPE Agent from the source.
Once you have installed Nagios, you can the configure it to define the specific nagios plugins to execute for Nagios host monitoring.
Configure NRPE Agent
The Nagios NRPE configuration is also discussed in the guide above except that, the configuration file for NRPE agent installed from EPEL repos is
That is just it on how to install Nagios NRPE agents on CentOS 8. Hope this guide was informative enough.