Page 2 of 4

Re: NRPE on Solaris9

Posted: Fri May 01, 2015 2:26 pm
by ssax
Please PM me your acl.c file.

Edit: Received file, placed in shared support directory.

Re: NRPE on Solaris9

Posted: Thu May 07, 2015 7:20 am
by maddev
sent you.

Re: NRPE on Solaris9

Posted: Thu May 07, 2015 10:07 am
by jolson
I was looking for solutions to your issue, and came across a solaris agent:

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/agents/solaris-nrpe-agent.tar.gz
tar xzf solaris-nrpe-agent.tar.gz
cd solaris-nrpe-agent
./fullinstall
This may only work for Solaris 10+, but I figured I would throw this procedure your way since it's quite simple and may resolve the problem.

Re: NRPE on Solaris9

Posted: Fri May 08, 2015 1:43 am
by maddev
Hi Jolson,

It did not work on Solaris 9. I tried with that already. Event went to modify the script to identify the machine as solaris 9. But no luck.

Best way would be to figure out the problem with compiling on solaris 9. Or to make someone compile on a solaris9 machine and to get the binary.

Re: NRPE on Solaris9

Posted: Fri May 08, 2015 10:33 am
by abrist
Have you checked: https://www.opencsw.org/ for any potential packages?

Re: NRPE on Solaris9

Posted: Fri May 08, 2015 12:29 pm
by maddev
yup. But no luck.
What they have is also for Solaris 10

Re: NRPE on Solaris9

Posted: Fri May 08, 2015 1:59 pm
by jdalrymple
Solaris 10 is still supported, Solaris 9 is not as of last year.

I compiled a more time-period appropriate version of NRPE on Solaris 9 - it went fine:

Code: Select all

bash-2.05# uname -a
SunOS unknown 5.9 Generic_118559-11 i86pc i386 i86pc
bash-2.05# ./nrpe

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

***************************************************************
** POSSIBLE SECURITY RISK - COMMAND ARGUMENTS ARE SUPPORTED! **
**      Read the NRPE SECURITY file for more information     **
***************************************************************

***************************************************************
** POSSIBLE SECURITY RISK - TCP WRAPPERS ARE NOT AVAILABLE!  **
**      Read the NRPE SECURITY file for more information     **
***************************************************************

Usage: nrpe [-n] -c <config_file> <mode>

Options:
 -n            = Do not use SSL
 <config_file> = Name of config file to use
 <mode>        = One of the following two operating modes:
   -i          =    Run as a service under inetd or xinetd
   -d          =    Run as a standalone daemon

Notes:
This program is designed to process requests from the check_nrpe
plugin on the host(s) running Nagios.  It can run as a service
under inetd or xinetd (read the docs for info on this), or as a
standalone daemon. Once a request is received from an authorized
host, NRPE will execute the command/plugin (as defined in the
config file) and return the plugin output and return code to the
check_nrpe plugin.

Re: NRPE on Solaris9

Posted: Fri May 15, 2015 12:56 am
by maddev
Hi jdalrymple,

Thank you very much. I was able to compile and install the version 2.1 of NRPE.

Now comes the next part of establishing comminucation; I am seeing ssl handshake error. hope some of the below information is helpful.

On the solaris 5.9 node
uname -a

Code: Select all

SunOS <hostname> 5.9 Generic_112233-11 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
cat /etc/services | grep -i nrpe

Code: Select all

nrpe    5666/tcp                                #NRPE
ps -ef | grep -i inet

Code: Select all

    root 23787 19129  0 00:48:26 pts/2    0:00 grep -i inet
    root 23593     1  0 00:39:27 ?        0:00 /usr/sbin/inetd -s
netstat -a | grep -i nrpe

Code: Select all

      *.nrpe               *.*                0      0 49152      0 LISTEN
lsof -i:5666

Code: Select all

COMMAND   PID USER   FD   TYPE        DEVICE SIZE/OFF NODE NAME
inetd   23593 root   68u  IPv4 0x37ed007b528      0t0  TCP *:nrpe (LISTEN)
pkginfo -l | grep -i ssl

Code: Select all

   PKGINST:  RHATossl
      NAME:  openssl 0.9.7a
      DESC:  The OpenSSL toolkit.
   PKGINST:  RHATpossl
      NAME:  pyOpenSSL 0.6
      DESC:  Python wrapper module around the OpenSSL library
   PKGINST:  SMCossl
      NAME:  openssl
    VENDOR:  The OpenSSL Group
egrep -v "^#.*$|^$" /etc/nagios/nrpe.cfg

Code: Select all

log_facility=daemon
pid_file=/var/run/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
allowed_hosts=127.0.0.1,<ip.of.my.nagios.xi.machine>

dont_blame_nrpe=1
debug=0
command_timeout=60
connection_timeout=300
include=/etc/nagios/nrpe/common.cfg
cat /etc/inet/nrpe

Code: Select all

        # default: on
        # description: NRPE
        service nrpe
        {
                flags           = REUSE
                socket_type     = stream
                wait            = no
                user            = 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 <ip.of.my.nagios.xi.machine>
        }
/usr/local/nagios/libexec/check_nrpe -H localhost

Code: Select all

CHECK_NRPE: Error - Could not complete SSL handshake.
/usr/local/nagios/libexec/check_nrpe -H localhost -n

Code: Select all

CHECK_NRPE: Response packet had invalid CRC32.

From my Nagios XI server
/usr/local/nagios/libexec/check_nrpe -H <ip.of.solaris9.machine>

Code: Select all

CHECK_NRPE: Error - Could not complete SSL handshake.
/usr/local/nagios/libexec/check_nrpe -H <ip.of.solaris9.machine> -n

Code: Select all

CHECK_NRPE: Response packet had invalid CRC32.

Re: NRPE on Solaris9

Posted: Fri May 15, 2015 8:57 am
by ssax
Looks like your /etc/inet/nrpe is pointing to the wrong config file:

Code: Select all

server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
Should be:

Code: Select all

server_args     = -c /etc/nagios/nrpe.cfg --inetd
Or was that a posting mistake?

Code: Select all

/etc/init.d/inetsvc stop
/etc/init.d/inetsvc start

Re: NRPE on Solaris9

Posted: Sun May 17, 2015 11:56 pm
by maddev
No good; still the same error. :(