Page 5 of 5

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Mon Apr 28, 2014 1:07 pm
by scottwilkerson
On the client run something like:

Code: Select all

/usr/local/nagios/bin/nrpe --help

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
On the Nagios server run something like:

Code: Select all

/usr/local/nagios/libexec/check_nrpe --help

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
Lets see the output of both, they should both say something like "SSL/TLS Available"

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Mon Apr 28, 2014 2:20 pm
by hazmat
Thanks.

Client:

Code: Select all

NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
TCP Wrappers Available
Server:

Code: Select all

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Mon Apr 28, 2014 5:00 pm
by slansing
Do you by any chance have another NRPE enabled system you can run a test against? One that was either compiled with SSL support or not?

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Tue Apr 29, 2014 8:35 am
by hazmat
Actually, this nagios server has been successfully monitoring a Windows server as well as a bunch of networked printers and switches.

I'll repeat the current setup for the monitoring.

nagios server:

Code: Select all

check_command        check_nrpe!check_disk!-a '-w 20% -c 10% -p /var'
monitored client:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Tue Apr 29, 2014 3:26 pm
by scottwilkerson
hazmat wrote:Thanks again for the help here. I took the nagios install from the server and now I can run remote commands from the command line.

$ check_nrpe -H 1.2.3.4 -c check_disk -a '-w 20% -c 10% -p /var'
DISK OK - free space: /var 5418 MB (72% inode=99%);| /var=2107MB;6348;7141;0;7935

However, when I run via the application, I get "No output returned from plugin". This is the command I have in the cfg on the nagios server:

check_command check_nrpe!check_disk!-a '-w 20% -c 10% -p /var'

Thanks.
I am a little confused, if you can run this from the nagios server, where 1.2.3.4 is your client, then it really doesn't make any sense why you would get "No output returned from plugin" when run from Nagios if infact your check_nrpe command is set to

Code: Select all

command_line    /usr/local/nagios/libexec/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
Is this correct?

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Tue Apr 29, 2014 4:04 pm
by hazmat
Yeah, that's correct, but the error, at least now, is "CHECK_NRPE: Error receiving data from daemon". Not sure what else I should look at. The "command_line" statement should be in commands.cfg?

Thanks.

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Wed Apr 30, 2014 10:47 am
by slansing
Yes, in nagios core you would set your command there and reference it across your services. We still need to know if you have another server with NRPE on it that you can test this against, you mentioned printers and switches... well they don't use NRPE. I was trying to ask if you could test this on a known, working, linux system with NRPE on it.

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Tue May 06, 2014 8:55 am
by hazmat
I tried it on another Linux machine in the same data center and am getting the same errors. I'm finding it hard to believe that it's a networking issue, though, since running check_nrpe from the command line of the nagios server gets the proper results. So I'm guessing it's a configuration problem. Here's what I have.

From commands.cfg:

Code: Select all

command_line    /usr/local/nagios/libexec/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
From the client's config on the nagios server:

Code: Select all

check_command    check_nrpe!check_disk!-a '-w 20% -c 10% -p /var'
From nrpe.cfg on the client machine:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Thanks as always.

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Tue May 06, 2014 11:58 am
by lmiltchev
$ check_nrpe -H 1.2.3.4 -c check_disk -a '-w 20% -c 10% -p /var'
DISK OK - free space: /var 5418 MB (72% inode=99%);| /var=2107MB;6348;7141;0;7935
Here, you are not passing "-n" flag...
command_line /usr/local/nagios/libexec/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ $ARG2$
but here, you are...

Re: Could not complete SSL handshake (check_nrpe is fine)

Posted: Tue May 06, 2014 12:25 pm
by hazmat
Holy crap that did it. THANK YOU!