From 1f5981334af1c8c285d2250c277bbf19d90b4c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Duret?= Date: Tue, 2 Aug 2016 10:31:23 +0200 Subject: [PATCH] Possibility to skip Non/Applicable sensor value --- storage/netapp/snmp/mode/components/temperature.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/netapp/snmp/mode/components/temperature.pm b/storage/netapp/snmp/mode/components/temperature.pm index a2829f392..b30ac3b54 100644 --- a/storage/netapp/snmp/mode/components/temperature.pm +++ b/storage/netapp/snmp/mode/components/temperature.pm @@ -78,6 +78,8 @@ sub check { foreach my $num (split /,/, $result->{enclTempSensorsPresent}) { $num = centreon::plugins::misc::trim($num); next if ($num !~ /[0-9]/ || !defined($current_temp[$num - 1])); + + next if ($self->check_filter(section => 'temperature', instance => $shelf_addr . '.' . $num)); $warn_under_thr[$num - 1] =~ /(-*[0-9]+)C/; my $wu_thr = $1; @@ -90,7 +92,6 @@ sub check { $current_temp[$num - 1] =~ /(-*[0-9]+)C/; my $current_value = $1; - next if ($self->check_filter(section => 'temperature', instance => $shelf_addr . '.' . $num)); $self->{components}->{temperature}->{total}++; my $status = 'ok'; @@ -134,4 +135,4 @@ sub check { } } -1; \ No newline at end of file +1;