users plugin throws warnings

Bug #1052815 reported by Tim Bishop
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
munin
Unknown
Unknown
munin (Debian)
Fix Released
Unknown
munin (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Precise by Daniel Hahler

Bug Description

munin-node-configure -sh
# The following plugins caused errors:
# apache_processes:
# Junk printed to stderr
# users:
# Junk printed to stderr

/usr/share/munin/plugins/users
Use of qw(...) as parentheses is deprecated at /usr/share/munin/plugins/users line 82.
tty.value 0
pty.value 0
pts.value 3
X.value 0
other.value 0

/usr/share/munin/plugins/apache_processes
Use of qw(...) as parentheses is deprecated at /usr/share/munin/plugins/apache_processes line 164.
busy80.value 50
idle80.value 50
free80.value 1167

Tags: patch
Revision history for this message
Kenyon Ralph (kralph) wrote :

You don't say what version of munin you're using, but these have been fixed upstream for a while.

Revision history for this message
Tim Bishop (tdb) wrote :

Sorry, what an obvious thing to forget!

munin-common 1.4.6-3ubuntu3.1
munin-node 1.4.6-3ubuntu3.1

This is on Ubuntu 12.04.1 (precise).

I figured they'd probably have been fixed upstream, but it'd be good to see the fix make its way in to the Ubuntu package.

Daniel Hahler (blueyed)
Changed in munin (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Adam (9-ubuntu-8) wrote :

Well, I don't think that this is fixed, according to http://search.cpan.org/~jesse/perl-5.14.0/pod/perl5135delta.pod#Use_of_qw%28...%29_as_parentheses the qw() function has to be wrapped in parentheses in order to be parsed correctly by perl 5.

If you do grep 'qw(' /usr/share/munin/plugins/* -n in Ubuntu 13.04 you get:

apache_processes:169: foreach my $type (qw(busy idle)) {
asterisk_channelstypes:77:my @CHANNELS = exists $ENV{'channels'} ? split ' ',$ENV{'channels'} : qw(Zap IAX2 SIP);
asterisk_codecs:82:my @CODECS = exists $ENV{'codecs'} ? split ' ',$ENV{'codecs'} : qw(gsm ulaw alaw);
asterisk_codecs:83:my @CODECSX = exists $ENV{'codecsx'} ? split ' ',$ENV{'codecsx'} : qw(0x2 0x4 0x8);
asterisk_sipchannels:80:my @CODECS = exists $ENV{'codecs'} ? split ' ',$ENV{'codecs'} : qw(gsm ulaw alaw);
asterisk_sipchannels:81:my @CODECSX = exists $ENV{'codecsx'} ? split ' ',$ENV{'codecsx'} : qw(0x2 0x4 0x8);
diskstat_:544: qw(major minor devname
diskstats:15:use Storable qw(nfreeze thaw);
diskstats:420: qw(major minor devname
...
and many more.

Revision history for this message
C. Alex Roeber (caroeber) wrote :

how I fixed mine:
sed -i -e 's/qw "busy idle"/(qw("busy idle"))/' /usr/share/munin/plugins/apache_processes
sed -i -e 's/qw(tty pty pts X other)/(qw(tty pty pts X other))/' /usr/share/munin/plugins/users

Revision history for this message
Thomas Heidrich (gnuheidix) wrote :

The Munin reference ticket: http://munin-monitoring.org/ticket/1161

This bug is still in munin-node (1.4.6-3ubuntu3.4). The attached patch works for me brilliantly.

summary: - Perl warnings break plugins
+ users plugin throws warnings
tags: added: patch
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch from reference ticket" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

Revision history for this message
Christian Reis (kiko) wrote :

As noted in comment #4, the fix for this is quite straightforward; just wrap the qw calls (i.e. the argument to foreach) in parenthesis. It's fixed in Trusty, btw.

Changed in munin (Ubuntu):
status: Triaged → Fix Released
Changed in munin (Debian):
status: Unknown → Fix Released
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.