Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to configure NRPE with Nconf?

#7
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
[email protected]:~ $ /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 10.0.0.100 -2 -V
10.0.0.100 is the IP address of ronaplace...
I get this..
NRPE Plugin for Nagios
Copyright © 1999-2008 Ethan Galstad ([email protected])
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 10.0.0.100 -2 check_users
*** Error in `/usr/lib/nagios/plugins/check_nrpe': corrupted size vs. prev_size: 0x00532160 ***
Aborted
Been puzzling over this for some time.
Any help greatly appreciated.
Regards and thanks


NOW I AM REALLY CONFUSED!

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 10.0.0.30 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 10.0.0.30 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.
 Reply
 
Messages In This Thread
How to configure NRPE with Nconf? - by baggins - 10-03-2017, 06:10 AM
RE: How to configure NRPE with Nconf? - by Robbie Ferguson - 10-03-2017, 10:38 AM
RE: How to configure NRPE with Nconf? - by baggins - 10-03-2017, 12:26 PM
RE: How to configure NRPE with Nconf? - by Robbie Ferguson - 10-03-2017, 12:43 PM
RE: How to configure NRPE with Nconf? - by baggins - 10-03-2017, 12:59 PM
RE: How to configure NRPE with Nconf? - by Robbie Ferguson - 10-03-2017, 01:04 PM
RE: How to configure NRPE with Nconf? - by ronjohntaylor - 03-18-2018, 01:36 AM
 
Forum Jump:

Users browsing this thread: 1 Guest(s)