Error while using NRPE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Error while using NRPE

Post by MSPk »

Hi Team,

I'm trying to monitoring a RHEL server using nagios. I have already installed the NRPE agent on the target machine. When I try to monitor the parameters using nagios i see a message saying "Couldn't complete SSL handshake". Please suggest
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error while using NRPE

Post by lmiltchev »

There are a few different causes of this, though the most likely one is that the Nagios server's ip address is not defined in the remote host's nrpe.cfg file. Edit the nrpe.cfg file on the remote host and look for the line: allowed_hosts=127.0.0.1 You will need to add the ip address of your Nagios server to this line (it is comma-separated).

Code: Select all

vi /usr/local/nagios/etc/nrpe.cfg
Change:

Code: Select all

allowed_hosts=127.0.0.1
To:

Code: Select all

allowed_hosts=127.0.0.1,<nagios server ip>
If you use xinetd for controlling the NRPE daemon (most people do), then you need to add the Nagios server's ip address to the xinetd nrpe configuration file: /etc/xinetd.d/nrpe. In this file you will find the line: only_from = 127.0.0.1 This list is space-delimited.

Code: Select all

vi /etc/xinetd.d/nrpe
The other common cause is that NRPE was not compiled with ssl enabled. To recompile NRPE with ssl support, browse to your NRPE source directory (usually in /tmp/nrpe-2.14 if you followed the compiling NRPE from source document) and compile with the switch:

Code: Select all

./configure --enable-ssl
cd /tmp/nrpe-2.14
./configure --enable-ssl
make all
make install
Change:

Code: Select all

only_from = 127.0.0.1
To:

Code: Select all

only_from = 127.0.0.1 <Nagios server ip>
If you use xinetd:

Code: Select all

service xinetd restart
If you use an init-script method (this is the default way, but your distribution may vary):

Code: Select all

/etc/init.d/nrpe restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Error while using NRPE

Post by MSPk »

I have added the nagios server ip address in the nrpe.cfg and i already see the Ip address of the nagios server on the xinetd.d/nrpe. However I cant run the commands 'service xinetd restart' or '/etc/init.d/nrpe restart'. I get a messaging ' -bash: Service: command not found'
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error while using NRPE

Post by abrist »

How was nrpe installed? From source, repo, or from the XI agent download?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Error while using NRPE

Post by MSPk »

I have downloaded it from link on the nagios xi
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Error while using NRPE

Post by slansing »

Are you re-installing NRPE now?.. Your new thread suggests so.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Error while using NRPE

Post by MSPk »

Well, I have tried installing the same package on another server and that failed. they are 2 different issues. This Issue is something i faced ona server where the NRPE package has been installed successfully.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error while using NRPE

Post by lmiltchev »

Can you try re-installing the linux agent following the steps, outlined in this document?
Be sure to check out our Knowledgebase for helpful articles and solutions!
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Error while using NRPE

Post by MSPk »

this exactly how we have installed this agent, but i dont midn re-installing it...!!!
Do you suggest we uninstall the current NRPE package before re-installing it or just install it over the current installation.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Error while using NRPE

Post by lmiltchev »

You can just install over.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked