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

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

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.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

503 Responses

  1. Henrich says:

    Good day,

    I am stuck at extracting the file tar -xvf nagios-plugins-2.1.2.tar.gz, it only says

    gzip: stdin: not in gzip format
    tar: Child not returned status 1
    tar: Error is not recoverable: exiting now

    I already installed unzip, gzip and tar. Do you have any ideas on how to solve this?

    • Ravi Saive says:


      It seems your download tar archive is corrupted or damaged during download, try to download new copy tar archive file and then extract it again..

  2. Nitish Joshi says:

    Hi Ravi,

    A very basic question!!!

    I have installed Nagios on an EC2 instance and its up and running. But now when I try to access http://ec2-ip/nagios from my windows machine, I am unable to access it.

    I have configured port 80 for inbound rules in the security group still I am unable to access the web-interface.

  3. Nath says:

    Hi Guys,

    I am new for Nagios i need document to install Nagios and Monitoring for linux and windows servers in Nagios.

  4. Jyotsna says:

    Hi Ravi,

    I see two sets of configuration files, one set in /usr/local/nagios/etc and another in /etc/nagios/.

    Which one of them is picked? Am trying to add hostgroups to nagios but its not picking up the hosts information.

  5. Dilip Kumar says:

    nrpe tcp/5666 #nrpe : Hash is Missing

  6. Piotr says:

    Hi Ravi,

    I have the same problem as Partha:

    [[email protected] nrpe-3.0]# make install-plugin
    cd ./src/; make install-plugin
    make[1]: Entering directory `/root/nagios/nrpe-3.0/src’
    /usr/bin/install -c -m 755 -d /usr/local/nagios/bin
    /usr/bin/install -c -m 755 ../uninstall /usr/local/nagios/bin/nrpe-uninstall
    /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
    /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
    /usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec
    make[1]: Leaving directory `/root/nagios/nrpe-3.0/src’

    [[email protected] nrpe-3.0]# make install-daemon
    cd ./src/; make install-daemon
    make[1]: Entering directory `/root/nagios/nrpe-3.0/src’
    /usr/bin/install -c -m 755 -d /usr/local/nagios/bin
    /usr/bin/install -c -m 755 ../uninstall /usr/local/nagios/bin/nrpe-uninstall
    /usr/bin/install -c -m 755 nrpe /usr/local/nagios/bin
    /usr/bin/install -c -m 755 -o nagios -g nagios -d /usr/local/nagios/var
    /usr/bin/install -c -m 644 ../startup/tmpfile.conf /usr/lib/tmpfiles.d/nrpe.conf
    make[1]: Leaving directory `/root/nagios/nrpe-3.0/src’

    #I guess problem starts here#

    [[email protected] nrpe-3.0]# make install-daemon-config
    make: *** No rule to make target `install-daemon-config’. Stop.

    [[email protected] nrpe-3.0]# make install-xinetd
    make: *** No rule to make target `install-xinetd’. Stop.

    [[email protected] nrpe-3.0]# make install-inetd
    /usr/bin/install -c -m 644 startup/default-xinetd /etc/xinetd.d/nrpe
    ***** MAKE SURE ‘nrpe 5666/tcp’ IS IN YOUR /etc/services FILE

    Would appreciate your advice.



    • Piotr says:

      Hi there,

      Used these instructions to setup NRPE and it KIND OF worked:

      I mean I got it running but now stumbled upon another problem and cannot find any solution anywhere.

      [[email protected] init.d]# /usr/local/nagios/libexec/check_nrpe -H localhost
      CHECK_NRPE: Error – Could not connect to ::3668:6c6e:7556:0: Connection reset by peer

      [[email protected] init.d]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_load
      CHECK_NRPE: Error – Could not connect to ::3668:6c6e:7556:0: Connection reset by peer


      • Debojyoti Bose says:

        1) /usr/local/nagios/etc/nrpe.cfg must be present
        2)grep -i disable /etc/xinetd.d/nrpe
        disable = no
        3)If you don’t need IPv6 try disabling it in /etc/sysctl.conf
        # grep -i ipv6 /etc/sysctl.conf
        net.ipv6.conf.all.disable_ipv6 = 1
        net.ipv6.conf.default.disable_ipv6 = 1
        net.ipv6.conf.lo.disable_ipv6 = 1

        Then run sysctl -p

    • Aldo says:


      I have the same problem as you, how did you resolve this?


  7. Partha sarathi Dash says:

    Hello Ravi,
    I stuck on this command “make install-daemon-config”. It is showing the error “make: *** No rule to make target `install-daemon-config’. Stop”.

  8. nirmal says:

    Hi, thanks for the tutorial
    let me know how to add windows host to nagios server.

  9. Mani says:

    I am having the same problem. The check_nrpe file is not in the /usr/local/nagios/libexec/ directory

    • Ravi Saive says:


      That means your NRPE installation was not successful, try to install again and see if the nrpe plugin available from libexec directory…

  10. Satyam says:

    Hi Ravi
    On Nagios Monitoring Server
    Not able to perform step 2
    [[email protected]]# /usr/local/nagios/libexec/check_nrpe -H

    • Ravi Saive says:


      What error you getting on the screen while checking NRPE version with host?

      • Satyam says:

        No such file and directory found, according to your document, it should show version of Nagios. Second question, i want to monitor “ps -ef | grep -i gmvuser” from remote machine, how to add entry for that in /usr/local/nagios/etc/nrpe.cfg file at remote server .

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.