Musings of a technophile

Just another blog from a computer nerd
  • Home
  • About Me
  • Funny things my kids say

How to install Nagios NRPE on Ubuntu

ElementZero | May 27, 2010

First, you need to install the nagios-nrpe-server. There is a nagios-nrpe-plugin but that’s not what you need because that is just the plugin and you need this daemon (Linux equivalent of a Windows Service for all you Windows guys).

sudo apt-get install nagios-nrpe-server

next, we should check and make sure that the service is actually running. We can do this two ways
sudo ps -Al | grep nrpe

This will show a line where the process is started. If it just comes back without stating anything something is wrong. Another check is to make sure you machine is listening on the nrpe port

netstat -an | grep 5666

Next, we need to set up the Nagios server to be able to check our machine.

sudo nano /etc/nagios/nrpe.cfg

and change

allowed_hosts=127.0.0.1

to

allowed_hosts=127.0.0.1,x.x.x.x

where “x.x.x.x” is the ip address of your nagios server. Now restart the nrep daemon so it reloads the settings

sudo /etc/init.d/nagios-nrpe-server restart

Now go on the Nagios server and run the following command

/usr/local/nagios/libexec/check_nrpe -H y.y.y.y

where “y.y.y.y” is the ip address of the machine you just installed nrpe on. If it works it will respond with the version of NRPE you just installed on the machine.

That’s it!

Categories
Computer Troubleshooting
Tags
linux, Server Administration
Comments rss
Comments rss
Trackback
Trackback

« Installing Windows Server 2008 on a Dell PowerEdge 2650 Apple’s iPhone 4 follies and dilemmas »

6 Responses to “How to install Nagios NRPE on Ubuntu”

  1. Paul Grevink says:
    March 25, 2011 at 9:44 am

    Hello,

    This post was very usefull, thank you very much for posting.

    Regards,

    Paul

  2. Odd Benestad d.y says:
    July 20, 2011 at 7:34 am

    Hello,

    Thank you for the post !

    Best regards,
    Odd

  3. Hussain says:
    July 17, 2012 at 8:50 am

    Hi,

    To run the command /usr/local/nagios/libexec/check_nrpe -H y.y.y.y, but after following instructions on this blog, could not locate nagios folder under /usr/local. I am using ubuntu 10.04 LTS. Am I missing a step?

    Thanks

  4. ElementZero says:
    July 19, 2012 at 12:46 pm

    Hmm – perhaps someone changed the path of the package that is pulled down from apt-get?

    Try this

    sudo updatedb
    sudo locate check_nrpe

    that should list all the locations of check_nrpe. Look in the list and adjust the path accordingly. If you’d be so kind to give me an update on that I’d appreciate it

  5. NRPE/nagios-plugins: Compiling with --enable-perl-modules problem. says:
    November 4, 2012 at 10:29 am

    [...] Is this the nagios server/host or a remote monitoring host? so install the nrpe plugin first? How to install Nagios NRPE on Ubuntu HowTos are everywhere. Please use [code][/code] tags Please. Thank [...]

  6. Daniel says:
    January 5, 2013 at 3:03 pm

    Since I’m confused I first changed server_address to my Nagios server ip and much confusion ensued. I should have read your guide twice before starting. Thanks!

Leave a Reply

Click here to cancel reply.

Categories

  • Anime
    (8)
  • Computer Troubleshooting
    (29)
  • Games
    (17)
  • Family and Everyday Life
    (27)
  • Misc Thoughts
    (13)

Archives

  • July 2011 (1)
  • June 2011 (2)
  • April 2011 (1)
  • February 2011 (2)
  • October 2010 (1)
  • June 2010 (2)
  • May 2010 (7)
  • April 2010 (1)
  • January 2010 (1)
  • November 2009 (1)
  • July 2009 (1)
  • May 2009 (1)
  • April 2009 (3)
  • March 2009 (5)
  • February 2009 (8)
  • January 2009 (11)
  • December 2008 (12)
  • November 2008 (12)
  • October 2008 (11)
  • September 2008 (8)

Tags

Apple ASP.NET Blizzard Cisco coding computer repair Disney ecchi Ethan Ethan Logan Exchange firewall Food Fort Myers FPS furniture hacking iis 7 jokes Kaden linux Logan Madelyn movies networking Racing RTS SEO Server Administration Shonen SQL SSRS 2005 StarCraft II VMWare Warcraft III Windows Server 2008 WordPress Zoo
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox Admin Login