munin-node: Patch 290-postfix_spooldir gives unwanted output to STDOUT
Rune Nordb��e Skillingstad
rune at skillingstad.no
Mon Oct 13 15:43:48 UTC 2008
Package: munin-node
Version: 1.2.6-4ubuntu1
Severity: normal
Tags: patch
The patch that introduces postconf leads to error messages and wrong
syntax in the plugin.
Example:
# munin-node-configure --shell
# There were some errors:
# Got junk from postfix_mailqueue: /usr/sbin/postconf
The patch uses "which postconf" to check for executable, but as this
command writes to STDOUT, this is also a part of every run of the
plugin.
Example:
# telnet localhost 4949
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
# munin node at localhost
fetch postfix_mailqueue
/usr/sbin/postconf
deferred.value 0
active.value 0
maildrop.value 0
incoming.value 0
corrupt.value 0
hold.value 0
.
munin-update ignores this, so data is still fetched and graphs are
updated.
-- System Information:
Debian Release: lenny/sid
APT prefers intrepid-updates
APT policy: (500, 'intrepid-updates'), (500, 'intrepid-security'), (500, 'intrepid-proposed'), (500, 'intrepid-backports'), (500, 'intrepid'), (500, 'hardy')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.27-7-generic (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to POSIX)
Shell: /bin/sh linked to /bin/dash
Versions of packages munin-node depends on:
ii adduser 3.108ubuntu1 add and remove users and groups
ii gawk 1:3.1.6.dfsg-0ubuntu1 GNU awk, a pattern scanning and pr
ii libnet-server-perl 0.97-1ubuntu1 An extensible, general perl server
ii lsb-base 3.2-14ubuntu2 Linux Standard Base 3.2 init scrip
ii perl 5.10.0-11.1ubuntu2 Larry Wall's Practical Extraction
ii procps 1:3.2.7-9ubuntu1 /proc file system utilities
Versions of packages munin-node recommends:
ii libnet-snmp-perl 5.2.0-1 Script SNMP connections
-- no debconf information
-------------- next part --------------
--- svn/munin/tags/1.2.6/node/node.d/postfix_mailqueue.in 2008-10-13 12:42:11.000000000 +0200
+++ /usr/share/munin/plugins/postfix_mailqueue 2008-10-13 16:19:43.000000000 +0200
@@ -30,8 +30,13 @@
#%# family=auto
#%# capabilities=autoconf
-# Can be set via environment, but default is /var/spool/postfix
-SPOOLDIR=${spooldir:-/var/spool/postfix}
+# Can be set via environment, but default is fetched by postconf (if available,
+# else /var/spool/postfix)
+if which postconf 2>&1 >/dev/null; then
+ SPOOLDIR=${spooldir:-`postconf -h queue_directory`}
+else
+ SPOOLDIR=${spooldir:-/var/spool/postfix}
+fi
# Postfix mqueue management: http://www.postfix.cs.uu.nl/queuing.html
# maildrop: Localy posted mail
More information about the ubuntu-users
mailing list