Page 2 of 3

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Mon Aug 17, 2015 12:26 pm
by sinkak
but still having

Code: Select all

CHECK_NRPE: Error receiving data from daemon. 

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Mon Aug 17, 2015 1:40 pm
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.

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Tue Aug 18, 2015 10:20 am
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:~$

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Tue Aug 18, 2015 2:32 pm
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?

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Tue Aug 18, 2015 2:46 pm
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

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Tue Aug 18, 2015 2:55 pm
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.

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Wed Aug 19, 2015 9:47 am
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?

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Wed Aug 19, 2015 12:55 pm
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?

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Wed Aug 19, 2015 2:28 pm
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.

Re: migrating nagios to new server causing CHECK_NRPE: Error

Posted: Mon Aug 24, 2015 11:08 am
by sinkak
If that's the case. I will use an automation engine to push this new config file from server to all clients.