diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2011-02-06 11:21:35 +0100 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2011-02-06 11:21:35 +0100 |
| commit | 2aaf2344d41acb7fc93b123c72f9b33ff30a13dc (patch) | |
| tree | 7eba5de1c2b111ac3150bd3f487bc6529c80cf4f | |
| parent | 92adea5c7e553da27074eb5aafbceb4fc6b814a5 (diff) | |
| download | usb-wde1-tools-2aaf2344d41acb7fc93b123c72f9b33ff30a13dc.tar.gz usb-wde1-tools-2aaf2344d41acb7fc93b123c72f9b33ff30a13dc.zip | |
begin munin plugin
| -rwxr-xr-x | munin/usb-wde1.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/munin/usb-wde1.sh b/munin/usb-wde1.sh new file mode 100755 index 0000000..7052112 --- /dev/null +++ b/munin/usb-wde1.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# -*- sh -*- + +: << =cut + +=head1 NAME + +usb-wde1 - Munin plugin to report usb-wde1 temperature and humidity data + +=head1 CONFIGURATION + +=head2 EXAMPLE CONFIGURATION + + [usb-wde1] + env.logfile /var/log/usb-wde1.log + env.sensor0 Living room + env.sensor1 Kitchen + +=head1 MAGIC MARKERS + + #%# family=manual + #%# capabilities=autoconf suggest + +=cut + +# suggest, config +# params: +# - logfile +# - sensor names +# - type (temperature / humidity + +if [ "$1" = "autoconf" ]; then + if [ -r "$logfile" ]; then + echo yes + else + echo "no (Logfile \"$logfile\" does not exist)" + fi + exit 0 +fi + +if [ "$1" = "suggest" ]; then + echo temperature + echo humidity + exit 0 +fi |
