Page 1 of 1

Mismatch betwen plugins

Posted: Thu Jun 21, 2012 6:43 am
by clive_goa
Hi Team ,

We have a central nagios server ( rmds-nagios ) running with a NRPE plugin version 2.12

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ /usr/local/nagios/libexec/check_nrpe -n -H rmds-nagios
NRPE v2.12


And the remote server that is being monitored runs with a NRPE plugin version 2.0


(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ /usr/local/nagios/libexec/check_nrpe -n -H rmds-sink-lx-1 -p 5903
NRPE v2.0

Now we have a command ( involked via a script after being mentioed in the local nrpe.cfg ) which prints all the enabled services under SMF control

command[SMFexec]=/usr/local/nagios/libexec/SMFexec

Now , if I invoke the same command via nagios server , it does not seem to work .
It just prints the first line or so .

check_nrpe -H rmds-sink-lx-1 -p 5903 -t 60 -c SMFexec

Please let me know if mismatch in plugin version between nagios and remote server could be the reason


Thanks
Clive

Re: Mismatch betwen plugins

Posted: Thu Jun 21, 2012 1:29 pm
by lmiltchev
If you are not using SSL, you should add the "-n" flag. Try running this on your central nagios server:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H rmds-sink-lx-1 -n -p 5903 -t 60 -c SMFexec 
What is the output of these two commands?

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H rmds-sink-lx-1
telnet rmds-sink-lx-1 -p 5903

Re: Mismatch betwen plugins

Posted: Fri Jun 22, 2012 12:16 am
by clive_goa
Firstly, thanks for looking into the issue ...

There's a firewall between Luxembourg ( rmds-sink-lx-1 ) and Denmark ( rmds-nagios ) .Luxembourg remote servers can only be accessed via SSH from rmds-

nagios.

It does not not use SSL as some other commands also work when -n option is supplied.
There is no issue with the script as it works fine when run on the rmds-sink-lx-1 ( locally ) unlike when run emotely from a central nagios server ( rmds-

nagios ) .
This script works fine too when we want to remotely execute the command on other remote servers located in London.

(PROD)radmin@rmds-nagios:/opt/thomsonreuters/SOFTWARE/globalconfig$ /usr/local/nagios/libexec/check_nrpe -H rmds-sink-lx-1 -n -p 5903 -t 60 -c SMFexec

(PROD)radmin@rmds-nagios:/opt/thomsonreuters/SOFTWARE/globalconfig$




The o/p of the other 2 commands is as follows :


(PROD)radmin@rmds-nagios:/opt/thomsonreuters/SOFTWARE/globalconfig$ /usr/local/nagios/libexec/check_nrpe -H rmds-sink-lx-1
CHECK_NRPE: Socket timeout after 10 seconds.

Note :

Using the timeout option of 1 minute ( 60 seconds )

(PROD)radmin@rmds-nagios:/opt/thomsonreuters/SOFTWARE/globalconfig$ /usr/local/nagios/libexec/check_nrpe -H rmds-sink-lx-1 -t 60
CHECK_NRPE: Socket timeout after 60 seconds.

There seems to be a syntax issue with the other command ( This is a Solaris 10 system )

(PROD)radmin@rmds-nagios:/opt/thomsonreuters/SOFTWARE/globalconfig$ telnet rmds-sink-lx-1 -p 5903
Usage: telnet [-8] [-E] [-K] [-L] [-a] [-c] [-d] [-f/-F] [-r] [-x]
[-e char] [-k realm] [-l user] [-n tracefile] [-X atype]
[host-name [port]]

Note :

Thus I tried the following command using the appropriate syntax . However, it gets hung

(PROD)radmin@rmds-nagios:/opt/thomsonreuters/SOFTWARE/globalconfig$ telnet rmds-sink-lx-1 5903
Trying 10.2.20.218...
Connected to rmds-sink-lx-1.
Escape character is '^]'.


Do I need to supply any other parameter with check_nrpe to get the desired output ?

The most interesting fact is that it seems to work for other commands like check_ram that throw "one-line" output . But it does not work when we want to

get "multiple-line" output.

And It is definitely not using SSL ( with the -n option ) and it does not return anything when the option -n is not used as shows belows :

"check_ram:"

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ check_nrpe -n -H rmds-sink-lx-1 -p 5903 -t 60 -c check_ram
RAM OK - 745 MB out of 2048 MB RAM unused.

Note :

Without the -n option

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ check_nrpe -H rmds-sink-lx-1 -p 5903 -t 60 -c check_ram

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$



"SMFexec:"

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ check_nrpe -H rmds-sink-lx-1 -n -p 5903 -t 60 -c SMFexec

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$


If I edit check_ram script to display one more o/p, it does not work either


Would you advise me to upgrade the nrpe version because on

a. rmds-sink-lx-1 : NRPE plugin version which is 2.0 and it does not have -n option

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ /usr/local/nagios/libexec/check_nrpe -n -H rmds-sink-lx-1 -p 5903
NRPE v2.0


radmin@rmds-sink-lx-1# check_nrpe
Incorrect command line arguments supplied

NRPE Plugin for Nagios
Copyright (c) 1999-2003 Ethan Galstad ([email protected])
Version: 2.0
Last Modified: 09-08-2003
License: GPL with exemptions (-l for more info)

Usage: check_nrpe -H <host> [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
<host> = The address of the host running the NRPE daemon
<Truncated>


b. rmds-nagios : NRPE plugin version which is 2.12 and it does have -n option

(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ /usr/local/nagios/libexec/check_nrpe -n -H rmds-nagios
NRPE v2.12



(PROD)radmin@rmds-nagios:/usr/local/nagios/libexec$ check_nrpe
Incorrect command line arguments supplied

NRPE Plugin for Nagios
Copyright (c) 1999-2006 Ethan Galstad ([email protected])
Version: 2.3 <================= It should 2.3 however here unlike 2.12 when checked remotely from rmds-nagios
Last Modified: 01-23-2006
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [-n] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]

Options:
-n = Do no use SSL <=====================================
<host> = The address of the host running the NRPE daemon
<Truncated>


radmin@rmds-sink-lx-1# check_nrpe -l | grep SSL
exemption that compiling, linking, and/or using OpenSSL is allowed.


But if that's the case , the command check_ram should have also not ideally worked ?

Does the NRPE plugin version on both the servers need to be same or ideally with the main options like " do not use SSL " ?

Are the plugin hardware-dependent as it is a SPARC machine ?

radmin@rmds-sink-lx-1# uname -a
SunOS rmds-sink-lx-1 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V215


and also how to upgrade the plugin if needed ? Which plugin should I download and from where ?


Thanks again ...

Re: Mismatch betwen plugins

Posted: Fri Jun 22, 2012 4:01 pm
by lmiltchev
Thus I tried the following command using the appropriate syntax . However, it gets hung

(PROD)radmin@rmds-nagios:/opt/thomsonreuters/SOFTWARE/globalconfig$ telnet rmds-sink-lx-1 5903
Trying 10.2.20.218...
Connected to rmds-sink-lx-1.
Escape character is '^]'.
This is good - you can access port 5903.

In regards to the NRPE, you can obtain version 2.12 from here:

http://sourceforge.net/projects/nagios/ ... nrpe-2.12/

NRPE Documentation

Re: Mismatch betwen plugins

Posted: Mon Jun 25, 2012 4:54 am
by clive_goa
Thanks a lot. I will try from my end.