Page 1 of 2

Solaris 10 nrpe problems

Posted: Thu Jul 31, 2014 7:47 am
by bkoutsob
We are trying to install nrpe in a Solaris 10 machine:

SunOS pnms 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-280R

I am able to install successfully the NRPE agent, when I run:

bash-3.00# netstat -an | grep 5666
*.5666 *.* 0 0 49152 0 LISTEN

Also Running:

bash-3.00# /usr/local/nagios/libexec/check_nrpe -H localhost
NRPE v2.12

seems proper.

I have added the host via the configuration wizard in Nagios XI and all services, except ping, return errors. Other commands seem to have not been defined, while in the /var/adm/messages I get the following for example:

Jul 31 14:25:02 pnms nrpe[19741]: [ID 900267 daemon.error] Client request was invalid, bailing out...
Jul 31 14:29:52 pnms nrpe[19752]: [ID 441885 daemon.error] Error: Request contained command arguments!
Jul 31 14:29:52 pnms nrpe[19752]: [ID 900267 daemon.error] Client request was invalid, bailing out...
Jul 31 15:05:02 pnms nrpe[9312]: [ID 396531 daemon.error] Error: Request contained command arguments, but argument option is not enabled!
Jul 31 15:05:02 pnms nrpe[9312]: [ID 900267 daemon.error] Client request was invalid, bailing out...
Jul 31 15:07:21 pnms nrpe[9319]: [ID 813741 daemon.error] Error: Could not complete SSL handshake. 5
Jul 31 15:08:05 pnms nrpe[9326]: [ID 813741 daemon.error] Error: Could not complete SSL handshake. 5
Jul 31 15:09:31 pnms nrpe[9327]: [ID 813741 daemon.error] Error: Could not complete SSL handshake. 5
Jul 31 15:15:22 pnms nrpe[9361]: [ID 813741 daemon.error] Error: Could not complete SSL handshake. 5
Jul 31 15:34:26 pnms nrpe[9463]: [ID 813741 daemon.error] Error: Could not complete SSL handshake. 5


We are really new to this, we bought Nagios XI and we are struggling with the Solaris Monitoring. Can you please provide some help?

Thank you in advance

Re: Solaris 10 nrpe problems

Posted: Thu Jul 31, 2014 3:22 pm
by tmcdonald
Did you compile NRPE with the --enable-command-args flag?

http://www.thegeekstuff.com/2010/12/ena ... arguments/

You would also need to set dont_blame_nrpe=1 in the configs. That would explain the errors if you are trying to pass arguments to the commands.

Re: Solaris 10 nrpe problems

Posted: Fri Aug 01, 2014 1:34 am
by bkoutsob
Yes, I have done both. Still I get the same errors. Please advise.

Re: Solaris 10 nrpe problems

Posted: Fri Aug 01, 2014 12:14 pm
by sreinhardt
What version of openssl do you have on the client and servers? (nagios and solaris)

Re: Solaris 10 nrpe problems

Posted: Mon Aug 04, 2014 2:01 am
by bkoutsob
Server:
OpenSSL 1.0.1e-fips 11 Feb 2013

Client:
OpenSSL 0.9.7d 17 Mar 2004 (+ security patches to 2006-09-29)

Re: Solaris 10 nrpe problems

Posted: Mon Aug 04, 2014 5:41 am
by rajasegar
bkoutsob wrote:Yes, I have done both. Still I get the same errors. Please advise.
I have over 300 Solaris instances running every version under the sky using nrpe without issues. Maybe I can assist you on this.

What version of Solaris are you using? x86 or SPARC?
What release version is the OS?
What is the command line used to start the agent?
I am using nohup /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d. Not using the xinetd.

If you still cannot solve it, I can pass you my nrpe 2.15 compiled with enable arguments?

Re: Solaris 10 nrpe problems

Posted: Mon Aug 04, 2014 5:52 am
by bkoutsob
My version is Sparc

SunOS pnms 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-280R

Running as:

nrpe stream tcp nowait nagios /usr/sfw/sbin/tcpd /usr/local/nagios/bin/nrpe \ -c /usr/local/nagios/etc/nrpe.cfg -i

can you upload the compiled version you have somewhere for me to get it? it might work. thank you!

Re: Solaris 10 nrpe problems

Posted: Mon Aug 04, 2014 6:06 am
by bkoutsob
Using the command you send me it seems to work better, however I am getting for example:

OUTPUT: NRPE: Command 'check_mem' not defined

also for example:

COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.10.33.15 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
OUTPUT: DISK CRITICAL - 20% is not accessible: No such file or directory

COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.10.33.15 -t 30 -c check_all_procs -a '-w 150 -c 250'
OUTPUT: NRPE: Command 'check_all_procs' not defined

long story short, none of the services installed by the wizard work. do I have to define each and every command? do you by any chance have a .cfg file with most of the commands defined?

Re: Solaris 10 nrpe problems

Posted: Mon Aug 04, 2014 6:26 am
by rajasegar
bkoutsob wrote:Using the command you send me it seems to work better, however I am getting for example:

OUTPUT: NRPE: Command 'check_mem' not defined

also for example:

COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.10.33.15 -t 30 -c check_disk -a '-w 20% -c 10% -p /'
OUTPUT: DISK CRITICAL - 20% is not accessible: No such file or directory

COMMAND: /usr/local/nagios/libexec/check_nrpe -H 10.10.33.15 -t 30 -c check_all_procs -a '-w 150 -c 250'
OUTPUT: NRPE: Command 'check_all_procs' not defined

long story short, none of the services installed by the wizard work. do I have to define each and every command? do you by any chance have a .cfg file with most of the commands defined?
This means it is working, however you need to define the command in the target server's nrpe.cfg.
Guess what I don't use wizards, too much hassle to get it to work the way I want it to work and it is full of holes.

Add this in your nrpe.cfg and create your services manually. Ensure there are no duplicate commands. It will silently accept one of it.

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ $ARG4$
command[check_disk_all]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -A
command[check_disk_all_gbl]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -A -i $ARG3$
command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ $ARG4$
command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$ $ARG3$
command[check_memory]=/usr/local/nagios/libexec/check_mem.pl -u  -w $ARG1$ -c $ARG2$ $ARG3$
command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$ $ARG3$ -r
command[check_memory_used]=/usr/local/nagios/libexec/check_mem.pl -u -w $ARG1$ -c $ARG2$ $ARG3$
command[check_tcp]=/usr/local/nagios/libexec/check_tcp -H $ARG1$ -p $ARG2$ $ARG3$
If you need any other specific thing to monitor, just ask I might have it.

Re: Solaris 10 nrpe problems

Posted: Mon Aug 04, 2014 7:24 am
by bkoutsob
Thank you for your help! If there is a list will many commands I will gladly use it as I need to test some services. Which means, as many as you have will be of use :)