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 (from parent 1:
ef196cc
)
munin plugin should basically work nwo
author
Christian Weiske
<cweiske@cweiske.de>
Sun, 6 Feb 2011 19:31:38 +0000
(20:31 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Sun, 6 Feb 2011 19:31:38 +0000
(20:31 +0100)
munin/usb-wde1_
patch
|
blob
|
history
diff --git
a/munin/usb-wde1_
b/munin/usb-wde1_
index f58cc9bff8f61b35bf3251df34951dfd41154539..bbfc5ee710a9e418033ed7069d209a08dd1851ac 100755
(executable)
--- a/
munin/usb-wde1_
+++ b/
munin/usb-wde1_
@@
-87,4
+87,28
@@
if [ "$1" = "config" ]; then
done
exit 0
done
exit 0
-fi
\ No newline at end of file
+fi
+
+#split by semicolons
+OLDIFS="$IFS"
+IFS=";"
+read -r startzeichen zustand zeitstempel\
+ t0 t1 t2 t3 t4 t5 t6 t7\
+ h0 h1 h2 h3 h4 h5 h6 h7\
+ tc hc ws ns rain checksum\
+ < "$logfile"
+IFS=$OLDIFS
+
+#FIXME: check timestamp
+
+if [ "$TYPE" = "temperature" ]; then
+ varprefix=t
+else
+ varprefix=h
+fi
+
+
+for i in $sensors; do
+ eval "value=\$$varprefix$i"
+ echo "sensor$i.value $value"
+done