From 902f0738b545e8d5f5bb68530dff533aa867911f Mon Sep 17 00:00:00 2001 From: garnier-quentin Date: Mon, 10 Aug 2015 14:24:31 +0200 Subject: [PATCH] + Ref #122 --- hardware/pdu/raritan/snmp/mode/components/sensor.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hardware/pdu/raritan/snmp/mode/components/sensor.pm b/hardware/pdu/raritan/snmp/mode/components/sensor.pm index 204aed796..07ef26d72 100644 --- a/hardware/pdu/raritan/snmp/mode/components/sensor.pm +++ b/hardware/pdu/raritan/snmp/mode/components/sensor.pm @@ -83,7 +83,8 @@ sub check { $instance, $component, $result->{State})); } - if ($value =~ /[0-9]/ || ($value =~ /^0$/ && $result->{Unit} ne '')) { + if ($value =~ /[0-9]/) { + next if ($value =~ /^0$/ && $result->{Unit} eq ''); my ($exit2, $warn, $crit, $checked) = $self->get_severity_numeric(section => $component, instance => $instance, value => $value); if ($checked == 0) { $result->{EnabledThresholds} = oct("0b". unpack('b*', $result->{EnabledThresholds}));