Install NRPE for Nagios

Add the EPEL repository to enable installation via YUM:

# yum install epel-release

Next, run yum install nrpe

# yum install nrpe

This will also install nagios-plugins by default

Edit /etc/nagios/nrpe.cfg, add the commands your remote hosts required and add your Monitor server(s) address(es) to the allowed_hosts parameter as a comma-separated list, example:

allowed_hosts=10.0.0.1, 10.0.0.2

################################################################################
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 190 -c 200
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.

Start the nrpe agent, and make sure that nrpe is started at boot:

CentOS/RHEL 6:
# service nrpe restart
# chkconfig nrpe on

CentOS/RHEL 7:
# systemctl restart nrpe
# systemctl enable nrpe

Plugins will be install by default to:

/usr/lib64/nagios/plugins

For those who are installing from source and tar ball, the default path will be in:

/usr/local/nagios/libexec

Be the first to comment

Leave a Reply

Your email address will not be published.


*