Package: munin-node
Version: 1.2.5-1
Severity: normal
Tags: patch

Munin "graph server" quit session when nfsd daemon is disabled
*and* /etc/munin/plugins/nfsd still exists, resulting incomplete
informations on the machine (ie, df_inode is not filled).

I guess munin-node outputs "xxvalue [really nothing]" in "fetch"
operation.

So, a workaround I found (verified) Is to not output line at all when
the value is null, so the answer to "fetch nfsd" is an "RFC 822" style
dot when nfsd daemon does not run.

The drawback is that you have to check the last update timestamp on the
graph (on the web server) for nfsd.

We may also set "0" as value, but I think it will be more confusing, and
more, not exact.

A workaround will be to set a new "boolean" value, maybe "nfsd.active".

Note I didn't re-link nfs_client to /etc/munin/plugins, so the problem
could be the same for it.

So, here is the patch:
diff -u /usr/share/munin/plugins/nfsd nfsd
###########################################################################
--- /usr/share/munin/plugins/nfsd       2006-10-17 14:49:41.000000000 +0200
+++ nfsd        2008-07-15 00:42:37.000000000 +0200
@@ -65,9 +65,9 @@
 i=4;

 for a in $proc; do
-       echo -n "$a.value "
-       grep proc3 $NFSD \
-               | cut -f $i -d ' ' \
-               | awk '{print $1}'
-       i=$(expr $i + 1)
+       val=`grep proc3 $NFSD 2>/dev/null \
+               | cut -f $i -d ' ' \
+               | awk '{print $1}'`
+       i=$(expr $i + 1)
+       test "empty$val" != "empty" && echo "$a.value $val"
 done
###########################################################################


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: arm (armv5tel)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-ixp4xx
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages munin-node depends on:
ii  adduser                    3.102         Add and remove users and groups
ii  libnet-server-perl         0.94-1        An extensible, general perl server
ii  lsb-base                   3.1-23.2etch1 Linux Standard Base 3.1 init scrip
ii  perl                       5.8.8-7etch3  Larry Wall's Practical Extraction 
ii  procps                     1:3.2.7-3     /proc file system utilities

Versions of packages munin-node recommends:
ii  libnet-snmp-perl              5.2.0-1    Script SNMP connections

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to