Page 1 of 1

Using NRPE to monitor remote linux server -- IP address null

PostPosted: Sun Oct 21, 2018 4:00 pm
by rogerjbos
Fresh install of 4.4.2 with NRPE plugin to monitor a remote linux server which I called orangepione and all 5 checks show orange (unknown) because nagios is timing out after 30 seconds and I am trying to figure out why. Event log shows this:

[10-21-2018 20:55:41] wproc: host=orangepione; service=(null);

I set up NRPE logging and the last few lines of the nrpe.log file show this:

[1540087467] INFO: SSL/TLS initialized. All network traffic will be encrypted.
[1540087467] Starting up daemon
[1540087467] SETUP_WAIT_CONN FOR: IPv4 address: 0.0.0.0 ((null))
[1540087467] Server listening on 0.0.0.0 port 5666.
[1540087467] SETUP_WAIT_CONN FOR: IPv4 address: :: ((null))
[1540087467] Server listening on :: port 5666.
[1540087467] Listening for connections on port 5666
[1540087467] Allowing connections from: 69.123.xxx.xxx

So it is seeing my IP of 69.123.xxx.xxx, why it is saying service (null) and timing out.

NRPE error host timeout & service(null)

PostPosted: Sun Oct 21, 2018 6:33 pm
by rogerjbos
Trying to configure NRPE to monitor a remote linux server, but I keep getting host timeout errors:

netstat -nap | grep 5666 shows

tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 201/nrpe
tcp6 0 0 :::5666 :::* LISTEN 201/nrpe

So it seems that my allow IP address is not being parsed correct, but the tail of the nrpe.log file shows the correct IP address 69.123.xxx.xxx

[1540087467] Added command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
[1540087467] Added command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
[1540087467] INFO: SSL/TLS initialized. All network traffic will be encrypted.
[1540087467] Starting up daemon
[1540087467] SETUP_WAIT_CONN FOR: IPv4 address: 0.0.0.0 ((null))
[1540087467] Server listening on 0.0.0.0 port 5666.
[1540087467] SETUP_WAIT_CONN FOR: IPv4 address: :: ((null))
[1540087467] Server listening on :: port 5666.
[1540087467] Listening for connections on port 5666
[1540087467] Allowing connections from: 69.123.xxx.xxx

Here is the line I am using in nrpe.cfg:

# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
allowed_hosts=127.0.0.1,69.123.122.212

Thank you in advance for any suggestions you may have!

Re: Using NRPE to monitor remote linux server -- IP address

PostPosted: Mon Oct 22, 2018 11:22 am
by rogerjbos
Solved. I made some changes to the configs and got it working. Not sure 100% which change did the trick, but I think since I am using:

dont_blame_nrpe=0

I had to remove the $ARG1$ and $ARG2$ from the define in command.cfg:

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$
}

Simple is best. Just glad it is working now. Thanks to all.

Re: Using NRPE to monitor remote linux server -- IP address

PostPosted: Mon Oct 22, 2018 1:37 pm
by scottwilkerson
rogerjbos wrote:Solved. I made some changes to the configs and got it working. Not sure 100% which change did the trick, but I think since I am using:

dont_blame_nrpe=0

I had to remove the $ARG1$ and $ARG2$ from the define in command.cfg:

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$
}

Simple is best. Just glad it is working now. Thanks to all.


glad you got it resolved!

Locking thread