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

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. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  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...

441 Responses

  1. Aleks P says:

    Hi, thanks for the tutorial.

    I have an error when i try to verify my nagios.cfg file though.

    It says, template generic_servce specified in service definition could not be found (config file /usr/local/nagios/etc/services.cfg) also i can run nagios on the web but when i try to click lets say…services it says that Error: Could not read object configuration data!, I am assuming because the config file is wrong.

    Thanks!

    • Ravi Saive says:

      @Aleks,

      Have you created services.cfg file under /usr/local/nagios/etc/ and added the entry in nagios.cfg file? if yes, could you share the services.cfg file entries with us? let me take a look and give you a proper solution..

  2. satish says:

    Hi, I am not able to find below file… what I am missing here ? :-(

    Now open /etc/xinetd.d/nrpe file and add the localhost and IP address of the Nagios Monitoring Server.

  3. Jose Mantilla says:

    Nice tutorial, unfortunately, there is some mistakes due to versions, I have executed all the steps with Centos 7.3 and clients centos 6.8, the complete solution and steps for whetever linux distro is: https://support.nagios.com/kb/article.php?id=515

    • Ravi Saive says:

      @Jose,

      Thanks for finding this article useful, yes there were some mistakes even I faced for NRPE version 3.0 during my setup on CentOS 7.2 and CentOS 6.8, will modify and add the correct steps for nrpe 3.0 source installation..

  4. casper says:

    [root@localhost nrpe-3.0]# make install-inetd
    No inetd file to install
    make: *** [install-inetd] Error 1
    ==========================================================
    Hello I encountered this problem, ask where the problem lies
    thanks

  5. Vijay Thankur says:

    Thanks for Sharing nagios is working cool.
    if i have to add multiple hosts for monitoring ? so we need to add continues adding in this file ? /usr/local/nagios/etc/services.cfg

  6. Kool says:

    Hi Ravi,

    I successfully configured the nagios server, but facing problem with Nrpe3.0, so I went with Nrpe2.14 version, but again ./configure stopped at SSL headers Error.

    To sort this out I proceeded with installation of Openssl-devel package through yum, but that also failed seeking dependencies. And dependencies also need more dependencies which creates chain of packages to be installed.

    Would be grateful to you if you could suggest some alternatives.
    Thanks!

    • Ravi Saive says:

      @Anu,

      The error is clear that you don’t have SSL headers installed on the system and that can be fixed installing:

      yum install openssl-devel
      
  7. Siranjeevi says:

    HI,

    I am facing below error, while installing npre deamon.

    # make install-daemon-config
    make: *** No rule to make target `install-daemon-config’. Stop.

    • Ravi Saive says:

      @Siranjeevi,

      Did you installed needed gcc libraries? if not install them using:

      # yum groupinstall " Development Tools"
      
      • Ankit Sharma says:

        Hi Ravi,

        I was following the instructions the to run make install-deamon-config after running the yum groupinstall “Development Tools” and after doing that when i run make install-daemon-config commnad i am having the same output:

        make: *** No rule to make target `install-daemon-config’. Stop.

        due to this i am not able to see /etc/xientd.d/nrpe file to add the nagios host IP

        Please suggest.

        Ankit

  8. Tom says:

    Has anyone found a somewhat simple way to add remote host service checks to Nagios server using automation (Chef, HTTP POST, etc.)? There are some ideas floating around, but haven’t been able to find what I need.

    • Zack says:

      What could be the simplest way than this ? I’ve created a bash script doing this by connecting to remote host and running the installation script

  9. abhishek kushwaha says:

    hiii
    i m facing this error how can remove it and how can share my screen shot

    CHECK_NRPE: Socket timeout after 10 seconds.

    • Ravi Saive says:

      @Abhishek,

      Socket timeout error related to your network connection, make sure there isn’t any network issues between two servers..

Got something to say? Join the discussion.

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

Join Over 300K+ Linux Users
  1. 202,035
  2. 9,267
  3. 38,621

Are you subscribed?