cps_ plugin autodetection is broken

Bug #1066942 reported by Tim Bishop
This bug affects 1 person
Affects Status Importance Assigned to Milestone
munin (Ubuntu)
Fix Released
Won't Fix

Bug Description

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

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:


It'd be great if this fix could be applied.

Related branches

James Page (james-page)
Changed in munin (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Chris J Arges (arges) wrote :

This is fixed in the trusty and utopic versions already. Therefore this patch needs to go through the SRU process as defined here:

The patch looks pretty good, all that's needed to do is fill out the SRU template; and someone can sponsor that into precise.


Changed in munin (Ubuntu):
status: Triaged → Fix Released
Changed in munin (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Changed in munin (Ubuntu):
importance: Medium → Undecided
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in munin (Ubuntu Precise):
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.