aboutsummaryrefslogtreecommitdiff
path: root/munin/plugins/hddtemp-simple
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-07-31 20:45:44 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2006-07-31 20:45:44 +0000
commit3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc (patch)
tree59f0163f13e99eefb959385243c564c5662bc5c2 /munin/plugins/hddtemp-simple
downloadslackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.gz
slackbuilds-3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc.tar.bz2
initial import
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'munin/plugins/hddtemp-simple')
-rw-r--r--munin/plugins/hddtemp-simple31
1 files changed, 31 insertions, 0 deletions
diff --git a/munin/plugins/hddtemp-simple b/munin/plugins/hddtemp-simple
new file mode 100644
index 00000000..bc13e013
--- /dev/null
+++ b/munin/plugins/hddtemp-simple
@@ -0,0 +1,31 @@
+#!/bin/bash
+#
+# hddtemp munin plugin
+# feedback: rhatto at riseup.net | gpl
+#
+# configuration example:
+#
+# [hddtemp]
+# user root
+# env.devices hda hdb
+# env.hddtemp /path/to/hddtemp
+#
+
+if [ "$1" == "config" ]; then
+ cat << EOF
+graph_title HDD Temperatures
+graph_vlabel Celsius
+graph_category sensors
+EOF
+ for dev in $devices; do
+ echo $dev.label $dev
+ done
+ exit 0
+else
+ if [ -z "$hddtemp" ]; then
+ hddtemp="/usr/sbin/hddtemp"
+ fi
+ for device in $devices; do
+ echo $device.value `$hddtemp -n /dev/$device`
+ done
+fi