mirror of
https://github.com/munin-monitoring/contrib.git
synced 2018-11-08 00:59:34 +01:00
use proper DEBUG variable from module
This commit is contained in:
parent
f3eca64eda
commit
03b11d9257
@ -70,7 +70,7 @@ while ( $content =~ /table\s*<([^>]*)>\s*{([^}]*)}/g) {
|
||||
my $hosts = $2;
|
||||
$hosts =~ s/#.*$//mg; # comments
|
||||
$hosts =~ s/^\s+//mg; # trim spaces before lines
|
||||
print "table $1: $hosts\n" if defined $ENV{MUNIN_DEBUG};
|
||||
print "table $1: $hosts\n" if defined $Munin::Plugin::DEBUG;
|
||||
push @hosts , split /\s+/, $hosts;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ for my $host (@hosts) {
|
||||
open(my $status, "relayctl show summary|") or die "can't open relayctl: $!";
|
||||
while (<$status>) {
|
||||
if (/([\w\.]+)\s+(\d+\.\d+)%/) {
|
||||
print "found spare value: $2 for $1\n" if defined $ENV{MUNIN_DEBUG};
|
||||
print "found spare value: $2 for $1\n" if defined $Munin::Plugin::DEBUG;
|
||||
$avail{$1} = $2 unless defined($avail{$1});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user