mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 02:51:03 +00:00
use proper DEBUG variable from module
This commit is contained in:
parent
f3eca64eda
commit
03b11d9257
1 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ while ( $content =~ /table\s*<([^>]*)>\s*{([^}]*)}/g) {
|
||||||
my $hosts = $2;
|
my $hosts = $2;
|
||||||
$hosts =~ s/#.*$//mg; # comments
|
$hosts =~ s/#.*$//mg; # comments
|
||||||
$hosts =~ s/^\s+//mg; # trim spaces before lines
|
$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;
|
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: $!";
|
open(my $status, "relayctl show summary|") or die "can't open relayctl: $!";
|
||||||
while (<$status>) {
|
while (<$status>) {
|
||||||
if (/([\w\.]+)\s+(\d+\.\d+)%/) {
|
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});
|
$avail{$1} = $2 unless defined($avail{$1});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue