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

interface_linux_multi: fixed collect loop, fixed flush_rate, fixed exclude interfaces

This commit is contained in:
Daniel Forsberg 2013-02-27 20:26:46 +01:00
parent e5ceabe428
commit 191ef79a80

View file

@ -85,6 +85,7 @@
use strict; use strict;
use warnings; use warnings;
use Time::HiRes; use Time::HiRes;
use IO::Handle;
my $plugin = $0; my $plugin = $0;
$plugin =~ s/.*\///; $plugin =~ s/.*\///;
@ -130,7 +131,7 @@ if (defined $ENV{MUNIN_UPDATERATE}) {
if (defined $ENV{MUNIN_CACHEFLUSH_RATE}) { if (defined $ENV{MUNIN_CACHEFLUSH_RATE}) {
if ($ENV{MUNIN_CACHEFLUSH_RATE} =~ /^[0-9]+$/) { if ($ENV{MUNIN_CACHEFLUSH_RATE} =~ /^[0-9]+$/) {
$update_rate = int($ENV{MUNIN_CACHEFLUSH_RATE}); $flush_interval = int($ENV{MUNIN_CACHEFLUSH_RATE});
} else { } else {
print STDERR "Invalid flush rate: $ENV{MUNIN_CACHEFLUSH_RATE}"; print STDERR "Invalid flush rate: $ENV{MUNIN_CACHEFLUSH_RATE}";
} }
@ -154,8 +155,8 @@ if (defined $ENV{MUNIN_IF_INCLUDE}) {
} }
} }
my $exclude_list = undef; my $exclude_list = undef;
if (defined $ENV{MUNIN_IF_INCLUDE}) { if (defined $ENV{MUNIN_IF_EXCLUDE}) {
$exclude_list = [ split(/[[:space:]]+/, $ENV{MUNIN_IF_INCLUDE}) ]; $exclude_list = [ split(/[[:space:]]+/, $ENV{MUNIN_IF_EXCLUDE}) ];
if (0 == scalar (@$exclude_list)) { if (0 == scalar (@$exclude_list)) {
$exclude_list = undef; $exclude_list = undef;
} elsif ('' eq $exclude_list->[0]) { } elsif ('' eq $exclude_list->[0]) {