8 usb-wde1 - Munin plugin to report usb-wde1 temperature and humidity data
11 The plugin offers two modes: temperature and humidity graphing.
13 Symlink usb-wde1_ as "usb-wde1_temperature" and/or "usb-wde1_humidity".
15 =head2 EXAMPLE CONFIGURATION
17 [usb-wde1_temperature]
18 env.logfile /var/log/usb-wde1.log
20 env.sensors 0 1 2 3 4 7
21 env.sensor0 Living room
27 #%# capabilities=autoconf suggest
31 TYPE=`basename $0 | sed 's/^.*_//g'`
33 if [ "$1" = "autoconf" ]; then
34 if [ ! -r "$logfile" ]; then
35 echo "no (Logfile \"$logfile\" does not exist)"
36 elif [ "$TYPE" != "temperature" -a "$TYPE" != "humidity" ]; then
37 echo "no (Type \"$TYPE\" not supported, try \"./usb-wde1_ suggest\")"
43 elif [ "$1" = "suggest" ]; then
54 if [ "$sensors" = "" ]; then
55 sensors="0 1 2 3 4 5 6 7"
59 code="sensor$i=\${sensor$i:=Sensor $i}"
62 # FIXME: Warning/critical values
65 if [ "$1" = "config" ]; then
66 if [ "$host_name" != "" ]; then
67 echo "host_name $host_name"
69 if [ "$TYPE" = "temperature" ]; then
70 echo 'graph_title Temperature'
71 echo 'graph_args --base 1000 --lower-limit -30 --upper-limit 60'
72 echo 'graph_vlabel Temperature'
73 echo 'graph_info Shows the temperature of different thermometers'
75 echo 'graph_title Humidity'
76 echo 'graph_args --base 1000 --lower-limit 0 --upper-limit 100'
77 echo 'graph_vlabel Humidity'
78 echo 'graph_info Shows the air humidity of different thermometers (in %)'
81 echo 'graph_category sensors'
83 #FIXME: warning/critical values
85 eval "name=\$sensor$i"
86 echo "sensor$i.label $name"