git.cweiske.de
/
usb-wde1-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34039bf
)
munin plugin: sensor names in config
author
Christian Weiske
<cweiske@cweiske.de>
Sun, 6 Feb 2011 18:56:13 +0000
(19:56 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Sun, 6 Feb 2011 18:56:13 +0000
(19:56 +0100)
munin/usb-wde1_
patch
|
blob
|
history
diff --git
a/munin/usb-wde1_
b/munin/usb-wde1_
index c077ea285280c5b919fc6984d640dd8c8d3532de..f58cc9bff8f61b35bf3251df34951dfd41154539 100755
(executable)
--- a/
munin/usb-wde1_
+++ b/
munin/usb-wde1_
@@
-46,8
+46,20
@@
elif [ "$1" = "suggest" ]; then
exit 0
fi
exit 0
fi
-
+###############
#load variables
#load variables
+###############
+
+# Sensors to display
+if [ "$sensors" = "" ]; then
+ sensors="0 1 2 3 4 5 6 7"
+fi
+# Sensor names
+for i in $sensors; do
+ code="sensor$i=\${sensor$i:=Sensor $i}"
+ eval $code
+done
+# FIXME: Warning/critical values
if [ "$1" = "config" ]; then
if [ "$1" = "config" ]; then
@@
-69,6
+81,10
@@
if [ "$1" = "config" ]; then
echo 'graph_category sensors'
#FIXME: warning/critical values
echo 'graph_category sensors'
#FIXME: warning/critical values
+ for i in $sensors; do
+ eval "name=\$sensor$i"
+ echo "sensor$i.label $name"
+ done
exit 0
fi
\ No newline at end of file
exit 0
fi
\ No newline at end of file