Page 1 of 1

NRPE Restart

Posted: Mon Jan 04, 2016 10:56 am
by sushant4tech
Hello All,

I have recently installed Nagios Core 4 on a ubuntu server lets say "ALPHA". I also added 6 servers for monitoring which is working fine.
However i need to monitor this "ALPHA" using another nagios instance on server "BETA".

The "BETA" server is again a ubuntu server. However it runs Nagios 3 core. I added ip of BETA in ALPHA's nrpe.cfg located at "/usr/local/nagios/etc/nrpe.cfg". and restarted nagios service. However i get "CHECK_NRPE: Error - Could not complete SSL handshake." error. I have added incoming 5666 port on ALPHA for BETA.

My only suspicion is that i have not installed nrpe service on ALPHA. so i am restarting nagios and not nrpe. I have never monitored a monitoring server from other server via nagios before. I assume that BETA should be able to communicate with nrpe.cfg of ALPHA.

I know it sounds all messy but please guide me. let me know if i should provide any particular inputs here.

Re: NRPE Restart

Posted: Mon Jan 04, 2016 11:27 am
by jolson
I need you to clarify a few things for me:

First, do you have NRPE installed and operational on both servers? If so, what procedure did you use to install nrpe?

I'd like the output of the following:

Code: Select all

ps -ef | egrep "nrpe|xinetd"

Code: Select all

cat /etc/xinetd.d/nrpe

Re: NRPE Restart

Posted: Fri Jan 08, 2016 4:42 am
by sushant4tech
Hi Jolson,

Yes i installed NRPE and it is active on both server.
I used the command below for installing NRPE

Code: Select all

sudo apt-get install nagios-nrpe-server nagios-plugins
The output of the commands you asked to see is as below

Code: Select all

$ ps -ef | egrep "nrpe|xinetd"
ubuntu    5613  1582  0 09:37 pts/0    00:00:00 egrep --color=auto nrpe|xinetd
root     26662     1  0 Jan06 ?        00:00:00 /usr/sbin/xinetd -pidfile /run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
nagios   28836     1  0 Jan06 ?        00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d

Code: Select all

$ cat /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
        flags           = REUSE
        socket_type     = stream
        port            = 5666
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nrpe
        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
        log_on_failure  += USERID
        disable         = no
        only_from       = 127.0.0.1 55.169.155.155
}

Re: NRPE Restart

Posted: Fri Jan 08, 2016 10:43 am
by rkennedy
For clarification, which server are those bottom two command outputs from?

Re: NRPE Restart

Posted: Sat Jan 09, 2016 3:56 am
by sushant4tech
These outputs are from the server which needs to be monitored.
The client server.

Re: NRPE Restart

Posted: Mon Jan 11, 2016 10:42 am
by jolson
You are certain that 55.169.155.155 is the proper IP address for your Nagios box? Be sure the IP address of your Nagios server doesn't change during communication somehow (go through NAT or similar).

Lets check on a few more things:

Code: Select all

file /usr/local/nagios/bin/nrpe
ls -l /usr/local/nagios/bin/nrpe
file /usr/local/nagios/etc/nrpe.cfg
ls -l /usr/local/nagios/etc/nrpe.cfg
cat /usr/local/nagios/etc/nrpe.cfg
egrep "5666|nrpe" /etc/services