2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00
contrib-munin/plugins/other/cleware

43 lines
902 B
Plaintext
Raw Normal View History

2010-03-17 11:48:24 +01:00
#!/bin/bash
# Written by Lars Falk-Petersen, cleware@falk-petersen.no
# Version 0.2. To be used with http://www.vanheusden.com/clewarecontrol/
# Clewarecontrol device serial must be set in config file:
# #Put the following lines in /etc/munin/plugin-conf.d/cleware
2010-03-17 11:48:24 +01:00
# [cleware]
# #device serial. find it by running: clewarecontrol -l
# env.serial 7778
# #path of clewarecontrol
# env.bin /usr/bin/clewarecontrol
2010-03-17 11:48:24 +01:00
case $1 in
config)
cat <<'EOM'
graph_title Temperature And Humidity
graph_vlabel C / %
graph_category sensors
temp.label Temperature
hum.label Humidity
graph_order temp hum
graph_args --base 1000
EOM
exit 0;;
esac
[ ! $bin ] && bin="clewarecontrol"
if [ ! $serial ]; then
echo "Serial not set! Hint: Read the top of this script."
exit 1
fi
$bin -ag > /dev/null 2>&1
2010-03-17 11:48:24 +01:00
echo -n "temp.value "
$bin -d $serial -b -rt
2010-03-17 11:48:24 +01:00
echo -n "hum.value "
$bin -d $serial -b -rh
2010-03-17 11:48:24 +01:00