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

  1. Install these packages on the host:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# dnf install openssl openssl-devel gcc make git

  2. NRPE installation requires a Nagios user. Create the user first:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# useradd nagios
    [root@host01 ~]# passwd nagios

  3. Download the latest version of the Nagios plug-ins. Then, make and install them:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# wget http://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz
    [root@host01 ~]# tar zxf nagios-plugins-2.3.3.tar.gz
    [root@host01 ~]# cd nagios-plugins-2.3.3
    [root@host01 nagios-plugins-2.3.3]# ./configure
    [root@host01 nagios-plugins-2.3.3]# make
    [root@host01 nagios-plugins-2.3.3]# make install

  4. Download the latest version of the Ceph plug-ins:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 nagios-plugins-2.3.3]# cd ~
    [root@host01 ~]# git clone --recursive https://github.com/ceph/ceph-nagios-plugins.git
    [root@host01 ~]# cd ceph-nagios-plugins
    [root@host01 ceph-nagios-plugins]# make dist
    [root@host01 ceph-nagios-plugins]# make install

  5. Download, make, and install Nagios NRPE:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ceph-nagios-plugins]# cd ~
    [root@host01 ~]# wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-4.0.3/nrpe-4.0.3.tar.gz
    [root@host01 ~]# tar xvfz nrpe-4.0.3.tar.gz
    [root@host01 ~]# cd nrpe-4.0.3
    [root@host01 nrpe-4.0.3]# ./configure
    [root@host01 nrpe-4.0.3]# make all
    [root@host01 nrpe-4.0.3]# make install-groups-users
    [root@host01 nrpe-4.0.3]# make install
    [root@host01 nrpe-4.0.3]# make install-config
    [root@host01 nrpe-4.0.3]# make install-init

  6. If you are using a firewall, open port 5666 to allow communication with NRPE:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# firewall-cmd --zone=public --add-port=5666/tcp
    [root@host01 ~]# firewall-cmd --zone=public --add-port=5666/tcp --permanent

Additional Resources

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

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# systemctl enable nrpe
    [root@host01 ~]# systemctl start nrpe

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

  1. Edit the NRPE configuration with the Nagios server’s IP address:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# vi /usr/local/nagios/etc/nrpe.cfg

  2. Add the IP address of the Nagios Core server to the allowed_hosts setting.

    Syntax

    Copy to Clipboard Toggle word wrap
    allowed_hosts=127.0.0.1,IP_ADDRESS_OF_NAGIOS_CORE_SERVER

    Replace IP_ADDRESS_OF_NAGIOS_CORE_SERVER with the IP address of your Nagios Core server.

  3. Restart nrpe:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# systemctl restart nrpe

Verification

  • Test the installation:

    Example

    Copy to Clipboard Toggle word wrap
    [root@host01 ~]# /usr/local/nagios/libexec/check_nrpe -H localhost

    The check should echo NRPE v4.0.3 if it is working correctly.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat, Inc.