relayd: permit commas between hosts in tables

relayd.conf(5) mentions the following:

  Each table must contain at least one host address; multiple hosts are
  separated by newline, comma, or whitespace.

So the addition of commas as separators should now cover all possible
cases.

Without this, hosts separated by commas in a table will show up with a
trailing comma in their host name and will probably not get their stats
correctly assigned when grabbing information from relayctl.
This commit is contained in:
Gabriel Filion 2020-02-01 16:46:26 -05:00 committed by Lars Kruse
parent 065d4f129c
commit daba178eef
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ while ( $content =~ /^\s*table\s*<([^>]+)>\s*{([^}]+)}/mg) {
$hosts =~ s/#.*$//mg; # comments
$hosts =~ s/^\s+//mg; # trim spaces before lines
print "hosts: $hosts\n" if $Munin::Plugin::DEBUG;
push @hosts , split /\s+/, $hosts;
push @hosts , split /,?\s+/, $hosts;
}
if ($cmd eq 'config') {