Check_http_xpath.pl - Return code of 255 is out of bounds
Posted: Tue Aug 05, 2014 5:44 pm
I've a pile of fibre RAIDs that provide many environmental and performance variables via XML. I can usually parse this successfully using check_http_xpath.pl. However, currently despite all the green OK statuses, I'm getting "Return code of 255 is out of bounds."
The confusion arises at the command line:
...which means the return code is 0. Is Nagios just confused here?
Here's the command as I run it at the command line:
Here's what shows up in the log file:
Here's the config for the command:
I've tried the command with $ARG3$ printed as [`'$ARG3$'`] and ['$ARG3$'], but that doesn't make a difference. The confusing thing is that this did work the last time I tried it.
Here's the service definition:
Any ideas here?
This is on a freshly installed Nagios VM. CentOS 6.5, Nagios core 4.0.5.
Thanks.
The confusion arises at the command line:
Code: Select all
$ echo $?
0Here's the command as I run it at the command line:
Code: Select all
# perl /usr/local/nagios/libexec/check_http_xpath.pl -I 10.10.10.10 -l admin -a password -u /xml.asp -c '/status/perf_status/array[1]/load_percent<=90'
OK: load_percent=81|/status/perf_status/array[1]/load_percent=81
Code: Select all
Aug 5 18:03:39 monag nagios: Warning: Return code of 255 for check of service 'Array 1 Load' on host 'raid1' was out of bounds.
Aug 5 18:03:39 monag nagios: SERVICE ALERT: raid1;Array 1 Load;UNKNOWN;HARD;3;(Return code of 255 is out of bounds)
Code: Select all
# Check Array Load
define command{
command_name check_raid_array_load
command_line /usr/local/nagios/libexec/check_http_xpath.pl -H $HOSTADDRESS$ -l admin -a $ARG2$ -u /admin/xml.asp -c '/status/perf_status/array[`'$ARG3$`']/load_percent<=90' -w '/status/perf_status/array[`'$ARG3$`']/load_percent<=75'
}Here's the service definition:
Code: Select all
define service{
use generic-service ; defined in generic
host_name raid1
service_description Array 1 Load ; give description
check_command check_raid_array_load!password!1 ; defined commandline
normal_check_interval 10 ; useful time check
}Any ideas here?
This is on a freshly installed Nagios VM. CentOS 6.5, Nagios core 4.0.5.
Thanks.