NRPE client – how to set it up?

Nagios vs NRPE


Recently I had to set up a Nagios server to monitor all our Linux based VMs ( virtual machines, test environments ) and after setting up the server side I started to look after how to set up the remote client sides.

There are at least two “general”, so widely used solution for this, called NRPE and NSCA plugins. I chose the first one and started to check some install guides available in the wild. However, I faced many problems during installation, so I decided to share my adventures.


Found this and this as install guides. We use CentOS 6.6 and I had many different problems with these processes. First, NRPE 3.1.x is not available yet as rpm, so I can not use yum to install it. Second, when I started to go through the “hard” way to install (using make), I faced many problems like missing files…it is really strange if this guide works for many others.

Anyway, after a while I managed to hunt down every file I needed, so here is the guide how to set up NRPE client on a remote CentOS Linux node:

  1. create nagios user and nagios group, add the user to the group
  2. wget nagios plugins (you can find it on nagios side, version is always growing of course, example )
  3. wget nrpe ( example )
  4. tar xfv nagios plugins zip
  5. tar xfv nrpe zip
  6. yum install gcc glibc glibc-common openssl-devel -y
  7. cd nagios dir
  8. ./configure
  9. make
  10. make install
  11. chown -R nagios:nagios /usr/local/nagios
  12. cd nrpe dir
  13. ./configure
  14. make all
  15. make install
  16. make install-init
  17. download nrpe service script, example link
  18. remove -n from line 30 if you want to use SSL
  19. upload the script to the client, into /etc/init.d folder and give proper rights to it
  20. create /usr/local/nagios/etc/nrpe.cfg on clients and put your remote commands into it
  21. service nrpe start

That’s it, with this procedure now everything works for me on many clients. I have automated the installation using Ansible and it takes a couple of mins to set up any remote hosts with NRPE.


Server side is a bit different story, maybe I summarize that as well in the next post.


Author: d3voops

DevOps engineer at an international company. Fan of problem solving and remote work.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s