Ip6tables -I INPUT -p tcp -destination-port 5666 -j ACCEPT = CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x = iptables -I INPUT -p tcp -destination-port 5666 -j ACCEPT Port 5666 is used by NRPE and needs to be opened on the local firewall. Information on starting and stopping services will be explained further on. = CentOS 7.x / 8.x | RHEL 7.x / 8.x | Oracle Linux 7.x / 8.x = make install-init = CentOS 5.x / 6.x | RHEL 5.x / 6.x | Oracle Linux 5.x / 6.x = make install-init This installs the service or daemon files. echo > /etc/servicesĮcho '# Nagios services' > /etc/services The /etc/services file is used by applications to translate human readable service names into port numbers when connecting to a machine across a network. Installing only the plugin is usually done on your Nagios server and workers. If you only wanted to install the check_nrpe plugin, refer to the section at the bottom of this KB article as there a lot of steps that can be skipped. However it is useful having the check_nrpe plugin installed for testing purposes. If you only wanted to install the daemon, run the command make install-daemon instead of the command below. This step installs the binary files, the NRPE daemon and the check_nrpe plugin. Removing this flag will require that all arguments be explicitly set in the nrpe.cfg file on each server monitored. If you prefer to you can omit the -enable-command-args flag. Note that if you want to pass arguments through NRPE you must specify this in the configuration option as indicated below. Yum install -y gcc glibc glibc-common openssl openssl-devel perl wget Make sure that you have the following packages installed. RHEL | CentOS | Oracle Linux Prerequisites
A best effort has been made to ensure if you follow all the relevant steps you will end up with a working installation of NRPE. Some OS's like Ubuntu and SUSE have stricter user permissions, in those cases the listed commands have sudo in front of them to ensure you are able to complete the steps. All of the steps below were tested on the operating systems (OS) listed after a clean install of the OS. It is assumed that you are logged onto the machine you are installing NRPE as the root user, or a user with sufficient privileges. NRPE 4.0.3 and Nagios Plugins 2.2.1 is what this guide instructs you to install, however future versions should also work fine with these steps. If you only want to install the check_nrpe plugin, refer to the section at the bottom of this KB article. This guide is broken up into several sections and covers different Linux distributions and non-Linux operating systems. This procedure is intended for Nagios XI administrators who are new to NRPE or Nagios XI and have to use a source-based install method for NRPE, usually due to unsupported Linux distributions or security restrictions in corporate environments. Most monitored environments consist of many different distributions, therefore may need to compile NRPE and its associated plugins. The linux-nrpe-agent that ships with Nagios XI is only supported on CentOS, RHEL, OpenSUSE, SLES, Ubuntu, and Debian.
This document describes how to install and configure NRPE from source for use with Nagios Core/XI.