mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
stronger regex
This commit is contained in:
parent
93155c82ab
commit
e5ffe76311
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ my $cmd = (defined($ARGV[0])) ? $ARGV[0] : '';
|
||||||
my @hosts = ();
|
my @hosts = ();
|
||||||
open(my $conf, "<", $configfile) or die "can't open $configfile: $!";
|
open(my $conf, "<", $configfile) or die "can't open $configfile: $!";
|
||||||
my $content = join("", <$conf>);
|
my $content = join("", <$conf>);
|
||||||
while ( $content =~ /table\s*<([^>]*)>\s*{([^}]*)}/g) {
|
while ( $content =~ /table\s*<([^>]+)>\s*{([^}]+)}/g) {
|
||||||
my $hosts = $2;
|
my $hosts = $2;
|
||||||
print "table: $1, " if defined $Munin::Plugin::DEBUG;
|
print "table: $1, " if defined $Munin::Plugin::DEBUG;
|
||||||
$hosts =~ s/#.*$//mg; # comments
|
$hosts =~ s/#.*$//mg; # comments
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue