check_snmp -c option fail?


#1

I use nagios to check the status of some APC UPS.
The command dosn’t work.

# 'snmp_ups_lasttest_result' command definition
define command{
        command_name    snmp_ups_lasttest_result
        command_line    /usr/lib/nagios/plugins/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.7.2.3.0 -c 2 -l '\1=Pass 2=Fail\'
        }

Outcome at the console:

/usr/lib/nagios/plugins/check_snmp -H 10.100.20.61 -o .1.3.6.1.4.1.318.1.1.1.7.2.3.0 -c 2 -l '\1=Pass 2=Fail\'
\1=Pass 2=Fail\ OK - 2 | iso.3.6.1.4.1.318.1.1.1.7.2.3.0=2

Status is 2 so I expected a Fail status but get a Ok?

Nagios status:
UPS Test Result OK 2009-10-10 14:11:59 0d 23h 5m 34s 1/4 1=Pass 2=Fail OK - 2

UPS status:
10/10/2009 10:40:26 UPS: Failed a self-test.