From 3ae891bbbaa3f96365f4c9fbe49e5cee26183fbc Mon Sep 17 00:00:00 2001 From: rhatto Date: Mon, 31 Jul 2006 20:45:44 +0000 Subject: initial import git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1 370017ae-e619-0410-ac65-c121f96126d4 --- munin/plugins/hddtemp-simple | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 munin/plugins/hddtemp-simple (limited to 'munin/plugins/hddtemp-simple') 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 -- cgit v1.2.3