From daba178eef55184ea3a566761f72686b18c3a4c1 Mon Sep 17 00:00:00 2001 From: Gabriel Filion Date: Sat, 1 Feb 2020 16:46:26 -0500 Subject: [PATCH] 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. --- plugins/relayd/relayd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/relayd/relayd b/plugins/relayd/relayd index bddbbdcf..e43400c2 100755 --- a/plugins/relayd/relayd +++ b/plugins/relayd/relayd @@ -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') {