migrating nagios to new server causing CHECK_NRPE: Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by sinkak »

but still having

Code: Select all

CHECK_NRPE: Error receiving data from daemon. 
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by jdalrymple »

sinkak wrote:i tried adding new server ip to one of the clients nrpe.cfg file. That removed the error.
This means it's running daemonized and is why we needed to see the output of `ps -ef | grep nrpe.cfg` - the changes you maded to your inetd.conf file were of no use.
sinkak wrote:i have more than 100 hosts. i cant edit on each client.
Is there any thing i can do like that on server side so that it changes all clients config file?
Short of assuming the old IP - No.

Now would be a good time to implement some sort of centralized management of your configs though. To a lesser extent you could prevent this one small problem from happening again in the future by using a DNS name instead of an IP.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by sinkak »

on new server

Code: Select all

ubuntu@ip-10-0-10-149:~$ ps -ef | grep nrpe.cfg
nagios   23396     1  0 Aug17 ?        00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
ubuntu   26167 25827  0 15:18 pts/1    00:00:00 grep --color=auto nrpe.cfg
ubuntu@ip-10-0-10-149:~$
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by jdalrymple »

sinkak wrote:/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
Daemonized
sinkak wrote:ubuntu@ip:~$ grep nrpe /etc/xinetd.d/nrpe
service nrpe
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
Run from inetd

If it's daemonized though, the inetd variant will fail to launch because 5666 is already in use. It would appear you're using both, but daemonized wins which means the necessary changes are allowed_hosts in nrpe.cfg.

All make sense?
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by sinkak »

nrpe.cfg filein both paths

Code: Select all

/usr/local/nagios/etc/nrpe.cfg
/etc/nagios/nrpe.cfg
has

Code: Select all

allowed_hosts=127.0.0.1, newserverip
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by jdalrymple »

Are we still troubleshooting something?
sinkak wrote:i tried adding new server ip to one of the clients nrpe.cfg file. That removed the error.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by sinkak »

same error.

Code: Select all

CHECK_NRPE: Error - Could not complete SSL handshake.


if add -n option in check_nrpe.cfg file then error is

Code: Select all

CHECK_NRPE: Error receiving data from daemon. 
if i add new server IP individually to client nrpe.cfg file then no error.
But i cant do the same for 100 client hosts. I am trying to solve this error from server side.

any suggestions?
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by sinkak »

I did configure NRPE with these commands during initial set up.It does have ssl enabled.

./configure --enable-command-args --with-nagios-user=nagios --with-nagios-group=nagios --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu

why does still have ssl error?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by jdalrymple »

I've already answered this. It's not the answer I want to give you, but it is the ONLY answer.
sinkak wrote:i have more than 100 hosts. i cant edit on each client.
Is there any thing i can do like that on server side so that it changes all clients config file?
jdalrymple wrote:Short of assuming the old IP - No.

Now would be a good time to implement some sort of centralized management of your configs though. To a lesser extent you could prevent this one small problem from happening again in the future by using a DNS name instead of an IP.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: migrating nagios to new server causing CHECK_NRPE: Error

Post by sinkak »

If that's the case. I will use an automation engine to push this new config file from server to all clients.
Locked