mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
fix debug printing
This commit is contained in:
parent
70a119e8e5
commit
7fdf0482fa
1 changed files with 3 additions and 3 deletions
|
@ -56,10 +56,10 @@ open(my $conf, "<", $configfile) or die "can't open $configfile: $!";
|
|||
my $content = join("", <$conf>);
|
||||
while ( $content =~ /table\s*<([^>]+)>\s*{([^}]+)}/g) {
|
||||
my $hosts = $2;
|
||||
print "table: $1, " if defined $Munin::Plugin::DEBUG;
|
||||
print "table: $1, " if $Munin::Plugin::DEBUG;
|
||||
$hosts =~ s/#.*$//mg; # comments
|
||||
$hosts =~ s/^\s+//mg; # trim spaces before lines
|
||||
print "hosts: $hosts\n" if defined $Munin::Plugin::DEBUG;
|
||||
print "hosts: $hosts\n" if $Munin::Plugin::DEBUG;
|
||||
push @hosts , split /\s+/, $hosts;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,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 $Munin::Plugin::DEBUG;
|
||||
print "found spare value: $2 for $1\n" if $Munin::Plugin::DEBUG;
|
||||
$avail{$1} = $2 unless defined($avail{$1});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue