From 871a4ee631a120eaa1477b2f78592d563170de48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B3mas=20Edwardsson?= Date: Tue, 16 Mar 2010 17:02:58 +0000 Subject: [PATCH] check_snmp_interfaces - empty interfaces make plugin broken, do they that they are. --- check_snmp/trunk/check_snmp_interfaces | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/check_snmp/trunk/check_snmp_interfaces b/check_snmp/trunk/check_snmp_interfaces index e8f3662..5a2eb6a 100755 --- a/check_snmp/trunk/check_snmp_interfaces +++ b/check_snmp/trunk/check_snmp_interfaces @@ -230,6 +230,10 @@ foreach my $key ( keys %$resultat) { #$index = 1; #while ( $index <= $number_of_interfaces ) { + + # Weed out empty entries + @keys = grep(!/^$/, @keys); + foreach $index ( @keys ) { my $target_interface_index = $index; $oid_temp = $oid_ifdescr . $index;