Package: munin
Version: 2.0.17-3
Severity: normal
Tags: patch
The quota_usage_ plugin promises that it will look at quotas for
/dev/foo if linked as quota_usage_foo. This is not true - in the
plugin code, the filename is split at the _ character, then the
*first* part is shift'ed away. The remainder is joined with /
characters and appendede to /dev/, resulting in /dev/usage/foo for
quota_usage_foo. A second shift on the split array fixes that.
Another way would be to name the plugin quota_foo, but aparently
that wasn't the author's intention. On the other hand, the plugin
can never have worked as documented.
Attached is a patch that fixes the plugin to work as documented.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.10-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages munin depends on:
ii adduser 3.113+nmu3
ii cron 3.0pl1-124
ii libdate-manip-perl 6.41-1
pn libdigest-md5-perl <none>
ii libfile-copy-recursive-perl 0.38-1
ii libhtml-template-perl 2.95-1
ii libio-socket-inet6-perl 2.69-2
ii liblog-log4perl-perl 1.41-1.1
ii libparse-recdescent-perl 1.967009+dfsg-1
ii librrds-perl 1.4.7-2+b1
pn libstorable-perl <none>
ii liburi-perl 1.60-1
ii munin-common 2.0.17-3
ii perl [libtime-hires-perl] 5.18.1-4
ii perl-modules 5.18.1-4
ii rrdtool 1.4.7-2+b1
ii ttf-dejavu 2.33+svn2514-3
Versions of packages munin recommends:
ii munin-doc 2.0.17-3
ii munin-node 2.0.17-3
Versions of packages munin suggests:
ii apache2-bin [httpd] 2.4.6-3
ii libcgi-fast-perl 5.18.1-4
ii libnet-ssleay-perl 1.55-1+b2
ii lynx-cur [www-browser] 2.8.8dev.16-1
-- Configuration Files:
/etc/munin/apache.conf changed [not included]
/etc/munin/munin.conf changed [not included]
-- no debconf information
--- quota_usage_.in.orig 2013-11-20 13:39:33.000000000 +0100
+++ quota_usage_.in 2013-11-20 13:40:15.000000000 +0100
@@ -19,7 +19,7 @@ use Munin::Plugin;
# We do some magic to allow device strings with underscore to mean a /
# So to monitor /dev/mapper/vol-foo use quota-usage_mapper_vol-foo
my @tmp = split(/_/, $0);
-shift @tmp;
+shift @tmp; shift @tmp;
my $dev = join("/", @tmp);
my %users;