Follow through this guide to learn how to install Nagios NRPE agent on Rocky Linux 8. In order to execute Nagios plugins that monitors various system services and metrics on a remote host, you need to install NagiosRemote Plugin Executor (NRPE) on those hosts.
Installing Nagios NRPE Agent on Rocky Linux 8
Nagios NRPE agents:
- can be installed from the EPEL repos directly using the package manager
- can be build from the source
Install Nagios NRPE Agent From EPEL Repos
Install EPEL repos on Rocky Linux 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: 15:57:24 ago on Tue 22 Jun 2021 09:41:44 PM EAT.
Available Packages
nrpe.x86_64 4.0.3-6.el8 epel
NRPE 4.0.3 is available for installation. The command below installs NRPE agent on Rocky Linux 8.
dnf install nrpe
Confirm installed version once the installation completes.
nrpe -V
NRPE - Nagios Remote Plugin Executor
Version: 4.0.3
Running NRPE on Rocky Linux 8
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 Wed 2021-06-23 13:40:50 EAT; 2s ago
Docs: http://www.nagios.org/documentation
Main PID: 5415 (nrpe)
Tasks: 1 (limit: 11387)
Memory: 728.0K
CGroup: /system.slice/nrpe.service
└─5415 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
Jun 23 13:40:50 localhost.localdomain systemd[1]: Started Nagios Remote Plugin Executor.
Jun 23 13:40:50 localhost.localdomain nrpe[5415]: Starting up daemon
Jun 23 13:40:50 localhost.localdomain nrpe[5415]: Server listening on 0.0.0.0 port 5666.
Jun 23 13:40:50 localhost.localdomain nrpe[5415]: Server listening on :: port 5666.
Jun 23 13:40:50 localhost.localdomain nrpe[5415]: Listening for connections on port 5666
Jun 23 13:40:50 localhost.localdomain nrpe[5415]: 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.
Install Nagios NRPE Agent on RHEL/CentOS/Oracle Linux
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 link given below, the configuration file for NRPE agent installed from EPEL repos is /etc/nagios/nrpe.cfg
.
How to Configure NRPE Agent on Rocky Linux/CentOS/Oracle Linux
Other Nagios Tutorials
Configure Nagios Email Notification Using Gmail