From 0544cae172fa98a1de38e80adf40e220bc25c1f3 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Sat, 26 Nov 2011 22:00:24 +0000 Subject: Make munin plugin more robust, by not mapping 'illegal' characters in site names to _. --- munin-plugin | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'munin-plugin') diff --git a/munin-plugin b/munin-plugin index a0899db..8c18a87 100755 --- a/munin-plugin +++ b/munin-plugin @@ -50,8 +50,9 @@ if (!$ARGV[0]) { sub label2key { my $label = shift; - $label =~ s/[^a-zA-Z0-9_]+/_/g; - $label =~ s/^_+//; + # Removing illegal characters. Apparently using '_' as a + # replacement character break graph generation with version 1.2.5. + $label =~ s/[^a-zA-Z0-9]+//g; return $label; } -- cgit v1.2.3