How to Add Linux Host to Nagios Monitoring Server Using NRPE Plugin

Download all articles in PDF format with our TecMint Content Subscription and Linux Support Services starting at $10 per month.

Support TecMint: Did you find this tutorial helpful?. Please help to keep it alive by donating. Every cent counts! - Donate Now

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

369 Responses

  1. Nagaraj says:

    Hi ,
    I’m adding four ubuntu host in the nagios server but all the four host showing same root partition and all the services

    • Ravi Saive says:

      @Nagaraj,

      Have you add all Ubuntu servers to Nagios hosts.cfg file? and defined services for these 4 servers in services.cfg file? also on each Ubuntu server in nrpe.cfg file have you defined proper root device name and all services? Please check these things first and confirm..

      • Nagaraj says:

        i done the following thing:
        1) vi /usr/local/nagios/etc/objects/localhost.cfg /usr/local/nagios/etc/objects/newhost.cfg

        2:edit the usr/local/nagios/etc/objects/newhost.cfg
        in HOST DEFINITION
        and change the hostname to newhost
        And same changes in

        SERVICE DEFINITIONS

        and save the file

        3) to add newhost in the /usr/local/nagios/etc/nrpe.cfg file also

        verify with /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

        no error

        where i did the mistake and where the hosts.cfg file located

        • Ravi Saive says:

          @Nagraj,

          Please follow the instructions carefully, you will know where is hosts.cfg and services.cfg file….

      • Nagaraj says:

        where hosts.cfg file is located & below find my steps

        1)copy localhost.cfg file to newhost.cfg

        and edit the newhost.cfg file and change the host name in the file to newhost and also i added the entry in the nrpe.cfg file also

  2. Balaraju says:

    @Ravi,

    I have installed client in ubuntu. i followed below link to install the nrpe in cleint.
    http://sharadchhetri.com/2013/06/11/how-to-install-and-configure-nagios-nrpe-client-in-ubuntu-with-apt-get-command/

    [root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xx.xxx
    NRPE v2.15
    [root@localhost ~]# /usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xx.xxx -c check_load
    OK – load average: 0.03, 0.08, 0.13|load1=0.030;15.000;30.000;0; load5=0.080;10.000;25.000;0; load15=0.130;5.000;20.000;0;

    but it is not displayed on console. We have added command also in /usr/local/nagios/etc/objects/command.cfg like below

    define command{
    command_name check_nrpe
    command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
    }

    define command{
    command_name check_load
    command_line /usr/local/nagios/libexec/check_load -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
    }

    • Ravi Saive says:

      @Balaraju,

      You should all add those check commands in remote nrpe.cfg file under /etc directory to display on the web..

  3. Balaraju says:

    Hi Team,

    I did all the configuration as above . But i am getting the error as below on console
    (No output on stdout) stderr: execvp(/usr/lib/nagios/plugins/check_nrpe, …) failed. errno is 2: No such file or directory

    • Ravi Saive says:

      @balaraju,

      Have you changed the default Nagios installation location? the default location for nagios-plugins source will be /usr/local/nagios/libexec, here all plugins installs. The error you getting seems you’ve chosen different location for nagios-plugins sources while compiling…

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 95000+ Linux Users
  1. 77,543
  2. 4,213
  3. 35,218

Enter your email to get latest Linux Howto's