Chapter 3. Nagios remote plug-in executor installation
Chapter 3. Nagios remote plug-in executor installation As a storage administrator, you can monitor the Ceph storage cluster hosts, install Nagios plug-ins, the Ceph plug-ins, and the Nagios remote plug-in executor (NRPE) add-on to each of the Ceph hosts. For demonstration purposes, this section adds NRPE to a Ceph Monitor host with the hostname host01 . Repeat the remaining procedures on all Ceph hosts that Nagios should monitor. 3.1. Installing and configuring Nagios Remote Plug-In Executor Install the Nagios Remote Plug-in Executor (NPRE) and configure it to communicate with the Nagios Core server. Prerequisites Root-level access to Ceph Monitor host. Procedure Install these packages on the host: Example NRPE installation requires a Nagios user. Create the user first: Example Download the latest version of the Nagios plug-ins. Then, make and install them: Example Download the latest version of the Ceph plug-ins: Example Download, make, and install Nagios NRPE: Example If you are using a firewall, open port 5666 to allow communication with NRPE: Example Additional Resources For more information about Nagios plug-ins for Ceph, see Nagios plugins for Ceph . 3.2. Starting the Nagios Remote Plug-in Executor service Start the Nagios Remote Plug-in Executor (NRPE) service to collect data and report it back to the Nagios Core server. Prerequisites Root-level access to the Ceph Monitor host Procedure Enable and start the NRPE service: Example 3.3. Configuring Nagios Core server access to remote nodes For the Nagios Core server to access Nagios Remote Plugin Executor (NPRE) on a remote machine, the remote machine's NRPE configurations must be updated with the IP address of the Nagios Core server. Prerequisites Root-level access to the Nagios Core server. Internet access. Access to the Nagios Remote Plugin Executor. Procedure Edit the NRPE configuration with the Nagios server's IP address: Example Add the IP address of the Nagios Core server to the allowed_hosts setting. Syntax Replace IP_ADDRESS_OF_NAGIOS_CORE_SERVER with the IP address of your Nagios Core server. Restart nrpe : Example Verification Test the installation: Example The check should echo NRPE v4.0.3 if it is working correctly.
dnf install openssl openssl-devel gcc make git useradd nagios passwd nagios wget http://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz tar zxf nagios-plugins-2.3.3.tar.gz cd nagios-plugins-2.3.3 ./configure make make install cd ~ git clone --recursive https://github.com/ceph/ceph-nagios-plugins.git cd ceph-nagios-plugins make dist make install cd ~ wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-4.0.3/nrpe-4.0.3.tar.gz tar xvfz nrpe-4.0.3.tar.gz cd nrpe-4.0.3 ./configure make all make install-groups-users make install make install-config make install-init firewall-cmd --zone=public --add-port=5666/tcp firewall-cmd --zone=public --add-port=5666/tcp --permanent systemctl enable nrpe systemctl start nrpe vi /usr/local/nagios/etc/nrpe.cfg allowed_hosts=127.0.0.1, IP_ADDRESS_OF_NAGIOS_CORE_SERVER systemctl restart nrpe /usr/local/nagios/libexec/check_nrpe -H localhost