NRPE Restart

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
User avatar
sushant4tech
Posts: 25
Joined: Fri Jul 31, 2015 12:24 am

NRPE Restart

Post 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.
- $u$h@nT
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: NRPE Restart

Post 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
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
sushant4tech
Posts: 25
Joined: Fri Jul 31, 2015 12:24 am

Re: NRPE Restart

Post 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
}
- $u$h@nT
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NRPE Restart

Post by rkennedy »

For clarification, which server are those bottom two command outputs from?
Former Nagios Employee
User avatar
sushant4tech
Posts: 25
Joined: Fri Jul 31, 2015 12:24 am

Re: NRPE Restart

Post by sushant4tech »

These outputs are from the server which needs to be monitored.
The client server.
- $u$h@nT
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: NRPE Restart

Post 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
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked