Chapter 3. Nagios remote plug-in executor installation


As a storage administrator, you can monitor the Ceph storage cluster nodes, install Nagios plug-ins, the Ceph plug-ins and the Nagios remote plug-in executor (NRPE) add-on to each of the Ceph nodes.

For demonstration purposes, this section adds NRPE to a Ceph Monitor node with the hostname mon. Repeat the remaining procedures on all Ceph nodes 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

  • Access to OpenSSL.
  • User-level access to Ceph Monitor node.

Procedure

  1. Install these packages on the node:

    Copy to Clipboard Toggle word wrap
    [user@mon]# yum install openssl openssl-devel gcc make git
  2. NRPE installation requires a Nagios user. So create the user first:

    Copy to Clipboard Toggle word wrap
    [user@mon]# useradd nagios
    [user@mon]# passwd nagios
  3. Download the latest version of the Nagios plug-ins. Then, make and install them:

    Copy to Clipboard Toggle word wrap
    [user@mon]# wget http://www.nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
    [user@mon]# tar zxf nagios-plugins-2.2.1.tar.gz
    [user@mon]# cd nagios-plugins-2.2.1
    [user@mon]# ./configure
    [user@mon]# make
    [user@mon]# make install
  4. NRPE uses xinetd for communication. Install it before installing the NRPE module:

    Copy to Clipboard Toggle word wrap
    [user@mon]# yum install xinetd
  5. Download the latest verion of the Ceph plug-ins:

    Copy to Clipboard Toggle word wrap
    [user@mon]# cd ~
    [user@mon]# git clone --recursive https://github.com/valerytschopp/ceph-nagios-plugins.git
    [user@mon]# cd ceph-nagios-plugins
    [user@mon]# make dist
    [user@mon]# make install
  6. Download, make and install Nagios NRPE:

    Copy to Clipboard Toggle word wrap
    [user@mon]# cd ~
    [user@mon]# wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.1.0/nrpe-3.1.0.tar.gz
    [user@mon]# tar xvfz nrpe-3.1.0.tar.gz
    [user@mon]# cd nrpe-3.1.0
    [user@mon]# ./configure
    [user@mon]# make all
    [user@mon]# make install-groups-users
    [user@mon]# make install
    [user@mon]# make install-config
    [user@mon]# make install-init
  7. Edit the the /etc/services file, and add the service string nrpe 5666/tcp:
  8. Open port 5666 to allow communication with NRPE:

    Copy to Clipboard Toggle word wrap
    [user@mon]# firewall-cmd --zone=public --add-port=5666/tcp
    [user@mon]# 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 service to collect data and report it back to the Nagios Core server.

Prerequisites

  • User-level access to the Ceph Monitor node

Procedure

  1. Enable, restart, and reload xinetd:

    Copy to Clipboard Toggle word wrap
    [user@mon]# systemctl enable xinetd
    [user@mon]# systemctl restart xinetd
    [user@mon]# systemctl reload xinetd
  2. Enable and start NRPE:

    Copy to Clipboard Toggle word wrap
    [user@mon]# systemctl enable nrpe
    [user@mon]# systemctl start nrpe

3.3. Configuring Nagios Core server access to remote nodes

In order for the Nagios Core server to access Nagios Remote Plugin Executor (NPRE) on a remote machine, the remote machine’s xinetd and NRPE configurations must be updated with the IP address of the Nagios Core server.

Prerequisites

  • User-level access to the Nagios Core server.
  • Internet access.
  • Access to the Nagios Remote Plugin Executor.

Procedure

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

    Copy to Clipboard Toggle word wrap
    [user@mon]# vi /etc/xinetd.d/nrpe
    Copy to Clipboard Toggle word wrap
    # default: off
    # description: NRPE (Nagios Remote Plugin Executor)
    service nrpe
    {
        disable         = yes
        socket_type     = stream
        port            = 5666
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nrpe
        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
        only_from       = 127.0.0.1,IP_ADDRESS_OF_NAGIOS_CORE_SERVER
        log_on_success  =
    }
  2. After adding the IP address of the Nagios Core server to the only_from option, restart the xinetd service:

    Copy to Clipboard Toggle word wrap
    [user@mon]# systemctl restart xinetd
  3. Edit the NRPE configuration with the Nagios server’s IP address:

    Copy to Clipboard Toggle word wrap
    [user@mon]# vi /usr/local/nagios/etc/nrpe.cfg
    Copy to Clipboard Toggle word wrap
    allowed_hosts=127.0.0.1,IP_ADDRESS_OF_NAGIOS_CORE_SERVER
  4. Add the IP address of the Nagios Core server to the allowed_hosts setting. Then, restart nrpe:

    Copy to Clipboard Toggle word wrap
    [user@mon]# systemctl restart nrpe
  5. Test the installation:

    Copy to Clipboard Toggle word wrap
    [user@host]# /usr/local/nagios/libexec/check_nrpe -H localhost

    The check should echo NRPE v3.1.0-rc1 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.