[Bug 1066942] [NEW] cps_ plugin autodetection is broken
Tim Bishop
1066942 at bugs.launchpad.net
Mon Oct 15 15:32:44 UTC 2012
Public bug reported:
Summary: Please apply https://github.com/munin-
monitoring/munin/commit/3281ce622bbd5dbf2c0ac5be8c951cb9a488e47a to the
munin-node package.
I'm using these packages:
ii munin-common 1.4.6-3ubuntu3.1 network-wide graphing framework (common)
ii munin-node 1.4.6-3ubuntu3.1 network-wide graphing framework (node)
On 12.04.1 (precise).
The problem is with the cps_ plugin. It suggests the following plugins:
# /usr/share/munin/plugins/cps_ suggest
cps_1.1.1.1_21
cps_1.1.1.1_80
cps_1.1.1.1_873
cps_2.2.2.2_21
cps_2.2.2.2_80
cps_2.2.2.2_873
When these get created by munin-node-configure I end up with the
following:
# ls -la /etc/munin/plugins/cps_cps_212.219.56.18*
lrwxrwxrwx 1 root root 29 Aug 18 18:37 /etc/munin/plugins/cps_cps_1.1.1.1_21 -> /usr/share/munin/plugins/cps_
lrwxrwxrwx 1 root root 29 Aug 18 18:37 /etc/munin/plugins/cps_cps_1.1.1.1_80 -> /usr/share/munin/plugins/cps_
lrwxrwxrwx 1 root root 29 Aug 18 18:37 /etc/munin/plugins/cps_cps_1.1.1.1_873 -> /usr/share/munin/plugins/cps_
lrwxrwxrwx 1 root root 29 Oct 15 16:26 /etc/munin/plugins/cps_cps_2.2.2.2_21 -> /usr/share/munin/plugins/cps_
lrwxrwxrwx 1 root root 29 Aug 18 18:37 /etc/munin/plugins/cps_cps_2.2.2.2_80 -> /usr/share/munin/plugins/cps_
lrwxrwxrwx 1 root root 29 Oct 15 16:26 /etc/munin/plugins/cps_cps_2.2.2.2_873 -> /usr/share/munin/plugins/cps_
The code in cps_ parses $0:
unless ($0 =~ /cps(?:_([^_]+)|)_(.+)\s*$/) {
die "Could not parse name $0.\n";
}
my $vip = $1;
my $port = $2;
As you can see, the cps_cps_ should be cps_. It's doubling this up which
breaks the regex and therefore breaks the plugin.
The fix is quite simple:
--- cps_.orig 2012-10-15 16:14:14.580595524 +0100
+++ cps_ 2012-10-15 16:14:25.092431645 +0100
@@ -103,7 +103,7 @@
foreach my $vip (sort keys %{$ipvs}) {
foreach my $port (sort keys %{$ipvs->{$vip}}) {
- print "cps_${vip}_$port\n";
+ print "${vip}_$port\n";
}
}
exit 0;
This creates the plugins with a single cps_ at the start and then
everything works as expected.
The fix can also be seen upstream here:
https://github.com/munin-
monitoring/munin/commit/3281ce622bbd5dbf2c0ac5be8c951cb9a488e47a
It'd be great if this fix could be applied.
** Affects: munin (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to munin in Ubuntu.
https://bugs.launchpad.net/bugs/1066942
Title:
cps_ plugin autodetection is broken
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/munin/+bug/1066942/+subscriptions
More information about the Ubuntu-server-bugs
mailing list