Page 1 of 1

Strange behavior from Solaris Agent

Posted: Wed Dec 16, 2015 4:20 pm
by mlbsysops
Okay so we're running into the following issue:

When trying to run a check from the XI interface we get the following for this one solaris host:

Code: Select all

COMMAND: /usr/local/nagios/libexec/check_nrpe -H sammdc01 -c check_load -a 5.0,5.0,5.0 10.0,9.0,8.0
OUTPUT: CHECK_NRPE: Error - Could not complete SSL handshake.
However if the same check is run locally through nrpe (as nagios user) it works:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H localhost -c check_load -a 5.0,5.0,5.0 10.0,9.0,8.0
OK - load average: 1.25, 1.28, 1.30|load1=1.254;15.000;30.000;0; load5=1.281;10.000;25.000;0; load15=1.305;5.000;20.000;0; 
Relevant Info:
Solaris OS:
uname -a
SunOS sammdc01 5.11 11.1 i86pc i386 i86pc

allowed hosts has the correct IP for the xi server and localhost;
/etc/inetd.conf is pointing to the nrpe install and nrpe.cfg:

Code: Select all

nrpe stream tcp nowait nagios /usr/sbin/tcpd /usr/local/nagios/bin/nrpe -c /etc/nagios/nrpe.cfg -i
NRPE is listening:

Code: Select all

/usr/bin/netstat -a |grep nrpe                                                                                                                                  
      *.nrpe               *.*                0      0 128000      0 LISTEN
The solaris agent was installed via the following documentation:
https://assets.nagios.com/downloads/nag ... _Agent.pdf (solaris-nrpe-agent/init.sh was edited for 5.11 as the documentation states)

/etc/services has the 5666 entered:

Code: Select all

nrpe 5666/tcp # NRPE
Nagios home directory is set to /usr/local/nagios.

Any idea on what could be causing this? At first I thought there were two nrpe's running but svcs |grep nrpe only brings up the agent that was installed:

Code: Select all

svcs |grep nrpe
online         20:54:24 svc:/network/nrpe/tcp:default

Re: Strange behavior from Solaris Agent

Posted: Thu Dec 17, 2015 11:08 am
by rkennedy
From the Nagios machine, can you run nmap clientip against the machine and post the result?

Re: Strange behavior from Solaris Agent

Posted: Thu Jan 07, 2016 2:58 pm
by mlbsysops
To give an update, I found the issue. The Binary was looking for the nrpe.cfg in /opt/nagios instead of /usr/local/nagios/ which is where it is installed. This can be closed.

Re: Strange behavior from Solaris Agent

Posted: Thu Jan 07, 2016 3:07 pm
by bwallace
Thanks for sharing the solution, I'm sure that will come in handy at some point down the line. I'll go ahead and lock this thread now.