Search

Chapter 4. Configuring the remote node on the Nagios Core server

download PDF

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

  1. Install the check_nrpe plug-in:

    [user@nagios]# cd ~
    [user@nagios]# wget https://github.com/NagiosEnterprises/nrpe/releases/download/nrpe-3.1.0/nrpe-3.1.0.tar.gz
    [user@nagios]# tar xvfz nrpe-3.1.0.tar.gz
    [user@nagios]# cd nrpe-3.1.0
    [user@nagios]# ./configure
    [user@nagios]# make check_nrpe
    [user@nagios]# make install-plugin
  2. Create a configuration for the remote host:

    [user@nagios]# cd /usr/local/nagios/etc/objects
    [user@nagios]# cp localhost.cfg mon.cfg

    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.

  3. Change the file ownership to Nagios:

    [user@nagios]# chown nagios:nagios mon.cfg
  4. Add a cfg_file= reference to the mon.cfg file in /usr/local/nagios/etc/nagios.cfg:

    [user@nagios]# vi /usr/local/nagios/etc/nagios.cfg

    Example

    cfg_file=/usr/local/nagios/etc/objects/mon.cfg

  5. Restart the Nagios server:

    [user@nagios]# systemctl restart nagios
  6. Ensure that the make and install procedures worked and that there is connectivity between the Nagios Core server and the remote host containing NRPE:

    [user@nagios]# /usr/local/nagios/libexec/check_nrpe -H IP_ADDRESS_OF_REMOTE_HOST

    It should echo NRPE v3.1.0-rc1 if it is working correctly.

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.

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.

© 2024 Red Hat, Inc.