Category5.TV Community Forum

Full Version: How to configure NRPE with Nconf?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I would like to monitor some Linux servers with NRPE.
Is there a tutorial available somewhere on how to configure NRPE with Nconf?


PS: I do have a strange issue when I ssh into nems: the system messages show up in some cyrillic language...
See attachment.

As I am using a non-us keyboard I had to change the default keyboard layout (which is not in a cyrillic language obviously!

The only NRPE documentation so far is here:

If you have specific questions, perhaps I can add more documentation to answer that... doing my best to expand the docs before NEMS 1.3's release in November.

Regarding the language you're seeing... are you sure you selected the correct language settings when you ran sudo nems-init?

All the best,
I've installed the nrpe server package on the target machine using dnf (I'm using Fedora).

From the nems machine I can run commands such as:

pi@NEMS:/usr/lib/nagios/plugins $ ./check_nrpe -H -c check_root
DISK OK - free space: /var/tmp 34435 MB (72.20% inode=91%);| /var/tmp=13257MB;40214;45241;0;50268

So the machines can communicate.
What is not clear to me at the moment is what steps I need to take in Nconf to tell nems to monitor disk space, etc on that particular machine.

As far as the installed language is concerned:

pi@NEMS:/usr/lib/nagios/plugins $ echo $LANG
Which is the language I want.

By setting your locale to Belarus, you are changing the system language which is what is resulting in the Belarusian (Russian) output of some system text. As you say, this is the language that you want, so it is not a concern. NEMS itself is English only since that's all I'm able to speak, but the underlying system (Debian) supports Russian. So you'll end up with a bit of a mix-match between language outputs Smile

Sounds like you know your way around Nagios - so that's great. The key thing will be learning to adapt that knowledge to NEMS, which does away with the old "text file" scripts and instead places your hosts and services in a web-based GUI (NEMS NConf).

I haven't written documentation for the individual check commands yet. You should be able to get a sense of how NEMS NConf works by reviewing the samples I've included, or get started with the legacy NConf wiki, which fortunately is still active even though the original developer stopped building NConf.

I will do my best to have check_nrpe (and other check commands) documented this quarter. It's a huge undertaking.

I now realize my mistake. I was under the impression that be_BY.UTF-8 was the language code for Belgium![Image: blush.gif]
I'v checked the language setting on my other machines and there it is nl_BE.UTF-8...
I ran raspi-config and now it is sorted!

pi@NEMS:/usr/lib/nagios/plugins $ ls something
ls: cannot access 'something': No such file or directory

Actually I'm a complete newbie as far as Nagios is concerned.
I just googled around to find some guidance...
I'll have a look at the examples.

Oh - haha! Well that's that then! Glad I could help you sort that out.

It seems you've got your head around some of the basic stuff regardless, so just be sure you note that as you look at any "Nagios" tutorials, you'll be looking at the text-based script stuff. You need to adapt that knowledge to our GUI to make it make sense.

It is very straightforward -- especially for someone who knows Nagios inside and out -- but as a self-professed NagiosN00b (ha!) you may have a bit more work cut out for you.

Do keep in mind, NEMS 1.3 is slated for a November release. Part of wrapping up the 1.2.x development cycle is completion of the documentation to make way for the upcoming NEMS 1.3 features (and subsequent documentation) - so if you're stuck with any particular point, please let me know and I'll do my best to add it to the official docs.

For now, I've added check_nrpe to the list.

Hello Robbie
Thanks for a great tool.
I too would like to know how to configure NRPE with NConf.

I am a retired IT guys who still likes to play at home.
I have been running NEMS 1.1 for some time to monitor my LAN in my house.  Stuff like my Ether switches, NAS, weather station, security cameras and a few Raspberry Pi's that I use as robots to do chores for me like speedtests, temperature monitoring and so on.
I have been trying to get NRPE going but without success.
I am running NEMS 1.3 on a RPi 3 as of about March 13th  2018.
I have all my hosts monitored to alert me with an email if they go down and that's working fine.
I have done the NEMS-Update and am up to date.
However I wanted to drill down into the 2 x RPi's that I have to show number of users connected, current load and CPU temp if I could.
I believe the NRPE is the tool.
I have encountered a few issues.  I have kept a log.

Below are my notes:

Back on NEMS 1.1 I had experimented with NRPE but did not have much success.
I had installed NRPE on two of my Raspberry Pi’s (host names "ash" & "ronsplace") but did not have much success or anything really meaningful.
NEMS 1.3 has more checks that can be done but it requires two server_ports to be open, ports 5666 and 12489.  So far I can only see how to open one port or the other in the nrpe.cfg but not both at the same time.

This is version of NRPE on NEMS 1.3 (running raspbian stretch)

nagios-nrpe-plugin/stable,now 3.0.1-3+deb9u1 armhf [installed]
nagios-nrpe-server/stable,now 3.0.1-3+deb9u1 armhf [installed]
nrpe-ng/stable 0.1.2-1 all
shinken-mod-booster-nrpe/stable 1.4.1-2 all

This is the version of NRPE on both "ash" & "ronsplace"(running raspbian jessie)

nagios-nrpe-plugin/oldstable 2.15-1 armhf
nagios-nrpe-server/oldstable,now 2.15-1 armhf [installed]
shinken-mod-booster-nrpe/oldstable 1.4.1-2 all

If I run check_users on "ronsplace" I get
pi@ronsplace:~ $ /usr/lib/nagios/plugins/check_users -w 10 -c 20
USERS OK - 3 users currently logged in |users=3;10;20;0

If I run...
$ /usr/lib/nagios/plugins/check_nrpe -H -2 -V is the IP address of ronaplace...
I get this..
NRPE Plugin for Nagios
Copyright © 1999-2008 Ethan Galstad (
Version: 3.0.1
Last Modified: 09-08-2016
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: OpenSSL 0.9.6 or higher required

which sort of indicates that it's communicating???
However...  If I run this

$ /usr/lib/nagios/plugins/check_nrpe -H -2 check_users
*** Error in `/usr/lib/nagios/plugins/check_nrpe': corrupted size vs. prev_size: 0x00532160 ***
Been puzzling over this for some time.
Any help greatly appreciated.
Regards and thanks


I turned on debug on the remote host "ronsplace"

I created a service in NConf see attached file NEMS NRPE.jpg for screen dump.
the service was "check_nrpe" with and argument "check_users"

The check_users ran from NEMS.  It ran at 18:03:11
It seems to have run twice?

This is from the log from ronsplace....
Mar 18 18:03:11 ronsplace nrpe[24563]: Connection from port 39636
Mar 18 18:03:11 ronsplace nrpe[24563]: Host address is in allowed_hosts
Mar 18 18:03:11 ronsplace nrpe[24563]: Handling the connection...
Mar 18 18:03:11 ronsplace nrpe[24563]: Error: Request packet type/version was invalid!
Mar 18 18:03:11 ronsplace nrpe[24563]: Client request was invalid, bailing out...
Mar 18 18:03:11 ronsplace nrpe[24563]: Connection from � closed.
Mar 18 18:03:11 ronsplace nrpe[24565]: Connection from port 40148
Mar 18 18:03:11 ronsplace nrpe[24565]: Host address is in allowed_hosts
Mar 18 18:03:11 ronsplace nrpe[24565]: Handling the connection...
Mar 18 18:03:11 ronsplace nrpe[24565]: Host is asking for command 'check_users' to be run...
Mar 18 18:03:11 ronsplace nrpe[24565]: Running command: /usr/lib/nagios/plugins/check_users -w 5 -c 10
Mar 18 18:03:11 ronsplace nrpe[24565]: Command completed with return code 0 and output: USERS OK - 3 users currently logged in |users=3;5;10;0
Mar 18 18:03:11 ronsplace nrpe[24565]: Return Code: 0, Output: USERS OK - 3 users currently logged in |users=3;5;10;0
Mar 18 18:03:11 ronsplace nrpe[24565]: Connection from � closed.

I have managed to get this fixed.
The issue was incompatibility on NRPE V3 on stretch and V2 on jessie.
I upgraded my jessie on ronsplace  to stretch and it now works.

From reading I did there are major differences between SSL and packet size in these tw versions.

Anyway seems to be working now.