mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-23 06:35:42 +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:
parent
7266e9ab5c
commit
f16bb2cbb3
1 changed files with 2 additions and 2 deletions
|
@ -27,7 +27,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
use Net::SNMP;
|
use Net::SNMP;
|
||||||
|
|
||||||
my $DEBUG = 0;
|
my $DEBUG = 1;
|
||||||
|
|
||||||
my $host = $ENV{host} || undef;
|
my $host = $ENV{host} || undef;
|
||||||
my $port = $ENV{port} || 161;
|
my $port = $ENV{port} || 161;
|
||||||
|
@ -151,7 +151,7 @@ sub get_by_regex
|
||||||
$num++;
|
$num++;
|
||||||
next unless ($response->{$ret} =~ /$regex/);
|
next unless ($response->{$ret} =~ /$regex/);
|
||||||
@keys = split (/\./, $ret);
|
@keys = split (/\./, $ret);
|
||||||
$result->{$keys[-1]} = $response->{$ret};;
|
$result->{$num} = $response->{$ret};;
|
||||||
print "# Index $num: ", $keys[-1], " (", $response->{$ret}, ")\n" if $DEBUG;
|
print "# Index $num: ", $keys[-1], " (", $response->{$ret}, ")\n" if $DEBUG;
|
||||||
};
|
};
|
||||||
return $result;
|
return $result;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue