This article describes how to install and configure the NRPE agent on RedHat based systems.
Note. The agent is the software that is installed on the client hosts to be monitored and not the actual OP5 Monitor server.
Step-by-step guide
1. Add the EPEL repository
On the non-subscription operating systems, Centos, Rocky, Alma the command is the same:
# yum install epel-release -y
Official RedHat Systems
RHEL 6:
RHEL 7:
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y
RHEL 8:
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
RHEL 9:
# subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm -y
2. Install NRPE and the plugins that are required to add the services via "Add UNIX client services" in the OP5 Monitor UI.
# yum install nrpe nagios-plugins-users nagios-plugins-load nagios-plugins-swap nagios-plugins-disk nagios-plugins-procs
3. Configure the agent to utilize the plugins using commands supported by OP5 Monitor host scan.
Create a new file called /etc/nrpe.d/op5_commands.cfg containing the following information:
################################################################################
#
# op5-nrpe command configuration file
#
# COMMAND DEFINITIONS
# Syntax:
# command[<command_name>]=<command_line>
#
command[users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[swap]=/usr/lib64/nagios/plugins/check_swap -w 20% -c 10%
command[root_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p / -m
command[usr_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /usr -m
command[var_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var -m
command[zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[total_procs]=/usr/lib64/nagios/plugins/check_procs -w 290 -c 300
command[proc_named]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C named
command[proc_crond]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:5 -C crond
command[proc_syslogd]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C syslog-ng
command[proc_rsyslogd]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C rsyslogd
These paths to the plugins should match the paths to the installed plugins in step # 2.
4. Now edit /etc/nagios/nrpe.cfg and add your Monitor server(s) address(es) to the allowed_hosts parameter as a comma-separated list, example:
allowed_hosts=127.0.0.1,10.0.0.10,10.0.0.11
5. Restart the nrpe agent on the host, and make sure that nrpe is started at boot:
Pre systemd systems (EL < 7):
# service nrpe restart
# chkconfig nrpe on
EL 7 and greater:
# systemctl restart nrpe
# systemctl enable nrpe
Now you can add the services via the function "Add UNIX client services" when adding a host in OP5 Monitor.
If the host is behind a firewall, or you have enabled firewall software on the host, you need to open for incoming traffic on TCP port 5666.
Linux server monitoring with SNMPv3
An alternative path we recommend is to use the SNMP (v3) protocol to monitor Linux hosts for added security. You can find how to setup that here: Monitoring Linux and Unix servers via SNMP
-
Tags:
- OP5 Monitor
- exported_docs_10_05_24
Comments
0 comments
Please sign in to leave a comment.