Chapter 4. Configuring the remote node on the Nagios Core server
Chapter 4. Configuring the remote node on the Nagios Core server Configure the Nagios Core server to be aware of the remote nodes. Prerequisites User-level access to the remote node on the Nagios Core server. Internet access. Procedure Install the check_nrpe plug-in: Create a configuration for the remote host: Replace localhost with the hostname of the remote host, and the loopback IP address with the IP address of the remote host. Finally, delete or comment out the Host Group definition. Change the file ownership to Nagios: Add a cfg_file= reference to the mon.cfg file in /usr/local/nagios/etc/nagios.cfg : Example Restart the Nagios server: Ensure that the make and install procedures worked and that there is connectivity between the Nagios Core server and the remote host containing NRPE: It should echo NRPE v3.1.0-rc1 if it is working correctly.
cd ~ wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.1.0/nrpe-3.1.0.tar.gz tar xvfz nrpe-3.1.0.tar.gz cd nrpe-3.1.0 ./configure make check_nrpe make install-plugin cd /usr/local/nagios/etc/objects cp localhost.cfg mon.cfg chown nagios:nagios mon.cfg vi /usr/local/nagios/etc/nagios.cfg cfg_file=/usr/local/nagios/etc/objects/mon.cfg systemctl restart nagios /usr/local/nagios/libexec/check_nrpe -H IP_ADDRESS_OF_REMOTE_HOST