NRPE gives wrong exit codes

Ciro Iriarte cyruspy at gmail.com
Mon Sep 7 18:04:48 CEST 2009


> 2009/9/7 Hiren Patel <hir3npatel at gmail.com>:
>>
>> 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)?
>>

Also tested with check_load:

# After restart
----
spmon:~/tmp/analisis # /usr/lib/nagios/plugins/check_nrpe -H billbd2
-c check_load -a 10,9,8  15,14,13
CRITICAL - load average: 16.12, 12.39,
12.48|load1=16.125;10.000;15.000;0; load5=12.391;9.000;14.000;0;
load15=12.484;8.000;13.000;0;
spmon:~/tmp/analisis # echo $?
2
----

# Second execution
----
spmon:~/tmp/analisis # /usr/lib/nagios/plugins/check_nrpe -H billbd2
-c check_load -a 10,9,8  15,14,13
CRITICAL - load average: 17.09, 12.72,
12.59|load1=17.090;10.000;15.000;0; load5=12.723;9.000;14.000;0;
load15=12.594;8.000;13.000;0;
spmon:~/tmp/analisis # echo $?
0
----

# Running it locally
----
[root at billbd2 log]# /usr/local/nagios/libexec/check_load -w 10,9,8 -c 15,14,13
CRITICAL - load average: 15.08, 12.69,
12.59|load1=15.078;10.000;15.000;0; load5=12.691;9.000;14.000;0;
load15=12.590;8.000;13.000;0;
[root at billbd2 log]# echo $?
2

[root at billbd2 log]# /usr/local/nagios/libexec/check_load -w 10,9,8 -c 15,14,13
WARNING - load average: 14.81, 12.67,
12.58|load1=14.809;10.000;15.000;0; load5=12.668;9.000;14.000;0;
load15=12.582;8.000;13.000;0;
[root at billbd2 log]# echo $?
1
----

The truss log can show system calls made during the NRPE response
(like strace on linux).

Regards,

-- 
Ciro Iriarte
http://cyruspy.wordpress.com
--

------------------------------------------------------------------------------
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