[D-community-commits] r361 - in trunk/fai-config-dir: files/usr/share/munin/plugins/ipmi_sensor_ package_config scripts/DEFAULT

holger at alioth.debian.org holger at alioth.debian.org
Wed Oct 29 13:50:56 UTC 2008


Author: holger
Date: 2008-10-29 13:50:55 +0000 (Wed, 29 Oct 2008)
New Revision: 361

Modified:
   trunk/fai-config-dir/files/usr/share/munin/plugins/ipmi_sensor_/DEFAULT
   trunk/fai-config-dir/package_config/DEFAULT
   trunk/fai-config-dir/scripts/DEFAULT/31-munin-node
Log:
installs depends, configure the plugin correctly and hackishly fix the plugins so it works if a sensor exists more than once, like on this dell hardware... :)

Modified: trunk/fai-config-dir/files/usr/share/munin/plugins/ipmi_sensor_/DEFAULT
===================================================================
--- trunk/fai-config-dir/files/usr/share/munin/plugins/ipmi_sensor_/DEFAULT	2008-10-29 13:17:28 UTC (rev 360)
+++ trunk/fai-config-dir/files/usr/share/munin/plugins/ipmi_sensor_/DEFAULT	2008-10-29 13:50:55 UTC (rev 361)
@@ -129,9 +129,9 @@
 		end
 		(name, value, unit, status, lower_non_recov, lower_crit, lower_non_crit, upper_non_crit, upper_crit, upper_non_recov) = items
 		nname = normalize_sensor name;
-		if names.has_key?(nname)
-			bail_out "Sensor name #{name} (normalized to #{nname}) appears more than once in ipmitool output."
-		end
+		if ! names.has_key?(nname)
+#			bail_out "Sensor name #{name} (normalized to #{nname}) appears more than once in ipmitool output."
+#		end
 		names[nname] = 1
 		data << {
 			:name => name,
@@ -146,6 +146,7 @@
 			:upper_non_recov => upper_non_recov,
 			:line => line
 		}
+		end
 	end
 
 	write_cache data

Modified: trunk/fai-config-dir/package_config/DEFAULT
===================================================================
--- trunk/fai-config-dir/package_config/DEFAULT	2008-10-29 13:17:28 UTC (rev 360)
+++ trunk/fai-config-dir/package_config/DEFAULT	2008-10-29 13:50:55 UTC (rev 361)
@@ -8,9 +8,12 @@
 fail2ban
 
 # hw related if we ever choose to split this from DEFAULT
+# (used for munin monitoring)
 PACKAGES aptitude-r
-lm-sensors
+ipmitool ruby libyaml-ruby
+#lm-sensors
 
+
 PACKAGES remove
 portmap nfs-common
 

Modified: trunk/fai-config-dir/scripts/DEFAULT/31-munin-node
===================================================================
--- trunk/fai-config-dir/scripts/DEFAULT/31-munin-node	2008-10-29 13:17:28 UTC (rev 360)
+++ trunk/fai-config-dir/scripts/DEFAULT/31-munin-node	2008-10-29 13:50:55 UTC (rev 361)
@@ -1,12 +1,12 @@
 #! /bin/sh
 
 #
-#        (c) 2007 Holger Levsen         holger at layer-acht.org
+#        (c) 2007,2008 Holger Levsen         holger at layer-acht.org
 #        GPL2 licenced
 #
 
 # deploy custom plugins
-fcopy -r /usr/share/munin/plugins/
+fcopy -r -m root,root,0755 /usr/share/munin/plugins/
 fcopy -r /etc/munin/
 
 # remove unwanted plugins
@@ -19,24 +19,10 @@
   $ROOTCMD ln -s /usr/share/munin/plugins/$i /etc/munin/plugins/$i
 done
 
-###
-### we use ipmitool/ipmi_sensor_ here (see above)
-###
-#
-# if sensors is configured (has to be done manually by running sensors-detect)
-# enable the munin plugins
-#
-#if $(sensors >/dev/null 2>&1) ; then
-# # only enable plugins if sensors provide data
-# export SENSORTEMP=$(mktemp)
-# sensors 2> /dev/null > $SENSORTEMP
-# grep -q -i fan $SENSORTEMP                  && ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_fan
-# grep -q -i temp $SENSORTEMP                 && ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_temp
-# grep V $SENSORTEMP | grep max | grep -q min && ln -s /usr/share/munin/plugins/sensors_ /etc/munin/plugins/sensors_volt
-# rm $SENSORTEMP
-#else
-# echo WARNING: sensors not configured properly. please run sensors-detect and load the modules.
-#fi
+# configure ipmi_sensor_
+for i in u_volts u_degrees_c u_rpm u_amps u_watts ; do 
+  $ROOTCMD ln -s /usr/share/munin/plugins/ipmi_sensor_ /etc/munin/plugins/ipmi_sensor_$i 
+done
 
 # restart munin-node
 $ROOTCMD /etc/init.d/munin-node restart




More information about the D-community-commits mailing list