NRPE gives wrong exit codes

Hiren Patel hir3npatel at gmail.com
Mon Sep 7 17:37:23 CEST 2009


Ciro Iriarte wrote:
> Hi, i'm posting this here as it seems more appropriate than
> nagios-users list. We are running nagios 3.2 on Linux. We're currently
> migrating most of our check done through SSH to NRPE but found an
> issue with Solaris 10 hosts. Once the nrpe service is restarted, the
> first execution works as expected, but the following checks gives
> EXIT_CODE=0, no matter what is the message (OK or Warning or
> Critical).
> 

could you switch on debugging on the nrpe server and paste the logs from 
running your tests again please, is this the case with any plugin type 
(something either than check_disk)?

> The execution by hand on the Solaris host works always:
> 
> ----
> [solaris ~]$ /usr/local/nagios/libexec/check_disk -w 50% -c 10% -p /test
> DISK WARNING - free space: /test 101125 MB (28% inode=100%);|
> /test=248599MB;174862;314752;0;349725
> [solaris ~]$ echo $?
> 1
> ----
> 
> For the first execution I get:
> 
> ---
> spmon:/etc/nagios/objects/services #
> /usr/lib/nagios/plugins/check_nrpe -H billbd2 -c check_disk -a 90% 80%
> /test
> DISK CRITICAL - free space: /kml_inst2 76172 MB (21% inode=100%);|
> /test=273552MB;34972;69944;0;349725
> spmon:/etc/nagios/objects/services # echo $?
> 2
> ---
> 
> For all the next ones:
> 
> ---
> spmon:/etc/nagios/objects/services #
> /usr/lib/nagios/plugins/check_nrpe -H billbd2 -c check_disk -a 90% 80%
> /test
> DISK CRITICAL - free space: /test 76172 MB (21% inode=100%);|
> /kml_inst2=273552MB;34972;69944;0;349725
> spmon:/etc/nagios/objects/services # echo $?
> 0
> ---
> 
> Versions:
> 
> check_nrpe (from openSUSE Build Service)
> --------------
> NRPE Plugin for Nagios
> Copyright (c) 1999-2008 Ethan Galstad (nagios at 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
> -------------
> 
> remote NRPE agent (compiled from source)
> -------------
> spmon:~ # /usr/lib/nagios/plugins/check_nrpe -H solaris
> NRPE v2.12
> ------------
> 
> Any ideas?, I have a truss capture of the daemon from a working
> execution and a non-working execution if anyone would like to check
> them (don't know if attachments are allowed)
> 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july




More information about the Developers mailing list