1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 22:25:23 +00:00

Now working ;) Really, the previous version reported way too low values because of a wrong implementation. This is tested and correct now for Windows and pfSense SNMP hosts.

This commit is contained in:
Stefan Seidel 2010-11-25 14:10:46 +01:00 committed by Steve Schnepp
parent 7266e9ab5c
commit f16bb2cbb3

View file

@ -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;