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.
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Mon Apr 28, 2014 1:07 pm
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 (nagios@nagios.org)
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 (nagios@nagios.org)
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"
hazmat
Posts: 39 Joined: Wed Mar 19, 2014 9:17 am
Post
by hazmat » Mon Apr 28, 2014 2:20 pm
Thanks.
Client:
Code: Select all
NRPE - Nagios Remote Plugin Executor
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
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 (nagios@nagios.org)
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
slansing
Posts: 7698 Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...
Post
by slansing » Mon Apr 28, 2014 5:00 pm
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?
hazmat
Posts: 39 Joined: Wed Mar 19, 2014 9:17 am
Post
by hazmat » Tue Apr 29, 2014 8:35 am
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$
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Apr 29, 2014 3:26 pm
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?
hazmat
Posts: 39 Joined: Wed Mar 19, 2014 9:17 am
Post
by hazmat » Tue Apr 29, 2014 4:04 pm
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.
slansing
Posts: 7698 Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...
Post
by slansing » Wed Apr 30, 2014 10:47 am
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.
hazmat
Posts: 39 Joined: Wed Mar 19, 2014 9:17 am
Post
by hazmat » Tue May 06, 2014 8:55 am
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.
lmiltchev
Former Nagios Staff
Posts: 13587 Joined: Mon May 23, 2011 12:15 pm
Post
by lmiltchev » Tue May 06, 2014 11:58 am
$ 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...
Be sure to check out our
Knowledgebase for helpful articles and solutions!
hazmat
Posts: 39 Joined: Wed Mar 19, 2014 9:17 am
Post
by hazmat » Tue May 06, 2014 12:25 pm
Holy crap that did it. THANK YOU!