diff options
author | Petter Reinholdtsen <pere@hungry.com> | 2011-11-26 22:00:24 +0000 |
---|---|---|
committer | Petter Reinholdtsen <pere@hungry.com> | 2011-11-26 22:00:24 +0000 |
commit | 0544cae172fa98a1de38e80adf40e220bc25c1f3 (patch) | |
tree | ea348d4c4c66da5e65c2526438e562591b076db8 | |
parent | f1089bee607c4a3a23d706d643b373eb183d2f27 (diff) | |
download | sitesummary-0544cae172fa98a1de38e80adf40e220bc25c1f3.tar.gz sitesummary-0544cae172fa98a1de38e80adf40e220bc25c1f3.tar.bz2 sitesummary-0544cae172fa98a1de38e80adf40e220bc25c1f3.tar.xz |
Make munin plugin more robust, by not mapping 'illegal' characters
in site names to _.
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | munin-plugin | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index d069ae9..c561f18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ sitesummary (0.0.71) UNRELEASED; urgency=low * Make sure 'site-summary -l' report handle hosts without a site set. + * Make munin plugin more robust, by not mapping 'illegal' characters + in site names to _. -- Petter Reinholdtsen <pere@debian.org> Sat, 26 Nov 2011 21:52:32 +0100 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; } |