Package: munin
Version: 1.2.5-2
Severity: normal
Tags: patch
Hi,
because I couldn't find a way to configure the hddtemp_smartctl plugin
for a cciss type raid controller, I wrote a small patch to allow
overriding the device value per drive, too. (The device needs to be
/dev/cciss/c0d0 for all drives connected to that controller in my case.)
Andreas
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable'), (300, 'unstable'), (130,
'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Index: munin-1.2.5/node/node.d/hddtemp_smartctl.in
===================================================================
--- munin-1.2.5.orig/node/node.d/hddtemp_smartctl.in 2008-03-05
10:45:06.000000000 +0100
+++ munin-1.2.5/node/node.d/hddtemp_smartctl.in 2008-03-05 10:47:50.000000000
+0100
@@ -7,16 +7,21 @@
# smartctl -- path to smartctl executable
# drives -- List drives to monitor. E.g. "env.drives hda hdc".
# type_$dev -- device type for one drive, e.g. "env.type_sda
3ware,0"
+# dev_$dev -- devive path for one drive, e.g. "env.dev_cciss6
cciss/c0d0"
# args_$dev -- additional arguments to smartctl for one drive,
# e.g. "env.args_hda -v 194,10xCelsius"
# Use this to make the plugin use the --all or -a
option
# if your disk will not return it's temperature when
# only the -A option is used.
#
-# Note for users of RAID controllers (smartmontools currently only
-# supports 3ware): you can specify the drives attached to your RAID
+# Note for users of RAID controllers:
+# you can specify the drives attached to your RAID
# controller(s) as raiddev_num (e.g. sda_0). Then you must specify the
# type like this: type_sda_0 3ware,0.
+# For a cciss RAID controller use e.g.:
+# env.drives cciss6
+# env.type_cciss6 cciss,6
+# env.dev_cciss6 cciss/c0d0
#
# $Log$
# Revision 1.1.2.5 2005/03/03 10:22:25 lupe
@@ -146,6 +151,7 @@
foreach (@drives) {
my $dev;
$dev = $_ =~ /(.*)(?:_\d+)/ ? $1 : $_;
+ $dev = $ENV{'dev_'.$_} if exists $ENV{'dev_'.$_};
my $cmd = $smartctl.' -A ';
$cmd .= $ENV{'args_'.$_}.' ' if exists $ENV{'args_'.$_};
$cmd .= '-d '.$ENV{'type_'.$_}.' ' if exists $ENV{'type_'.$_};