diff --git a/plugins/other/snmp__netstat b/plugins/other/snmp__netstat index 4c909ec4..8d2d5aaf 100755 --- a/plugins/other/snmp__netstat +++ b/plugins/other/snmp__netstat @@ -27,7 +27,7 @@ use strict; use Net::SNMP; -my $DEBUG = 0; +my $DEBUG = 1; my $host = $ENV{host} || undef; my $port = $ENV{port} || 161; @@ -151,7 +151,7 @@ sub get_by_regex $num++; next unless ($response->{$ret} =~ /$regex/); @keys = split (/\./, $ret); - $result->{$keys[-1]} = $response->{$ret};; + $result->{$num} = $response->{$ret};; print "# Index $num: ", $keys[-1], " (", $response->{$ret}, ")\n" if $DEBUG; }; return $result;