From 2aaf2344d41acb7fc93b123c72f9b33ff30a13dc Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Sun, 6 Feb 2011 11:21:35 +0100 Subject: [PATCH] begin munin plugin --- munin/usb-wde1.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 munin/usb-wde1.sh 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 -- 2.30.2