mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-21 18:41:03 +00:00
Small bugfixed on cleware.
This commit is contained in:
parent
6fe3a2fe4a
commit
b0f2565a40
1 changed files with 19 additions and 9 deletions
|
@ -1,15 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Written by Lars Falk-Petersen, cleware@falk-petersen.no
|
# Written by Lars Falk-Petersen <cleware@falk-petersen.no>
|
||||||
# Version 0.3. To be used with http://www.vanheusden.com/clewarecontrol/
|
# Version 0.4. See https://github.com/ways
|
||||||
|
# To be used with http://www.vanheusden.com/clewarecontrol/
|
||||||
# Clewarecontrol device serial must be set in config file:
|
# Clewarecontrol device serial must be set in config file:
|
||||||
|
|
||||||
# #Put the following lines in /etc/munin/plugin-conf.d/cleware
|
# #Put the following lines in /etc/munin/plugin-conf.d/cleware
|
||||||
# [cleware*]
|
# [cleware*]
|
||||||
# #device serial. find it by running: clewarecontrol -l
|
# #device serial. find it by running: clewarecontrol -l
|
||||||
# env.serial 7778
|
# env.serial 7778
|
||||||
# #path of clewarecontrol
|
# #path of clewarecontrol
|
||||||
# env.bin /usr/bin/clewarecontrol
|
# env.bin /usr/bin/clewarecontrol
|
||||||
|
#
|
||||||
|
# Munin must be able to read and write to the device.
|
||||||
|
# Run the following as root:
|
||||||
|
# # chgrp munin /dev/usb/hiddev0
|
||||||
|
# # chmod g+rw /dev/usb/hiddev0
|
||||||
|
#
|
||||||
|
# If that works, you have to make it permanent. On Ubuntu:
|
||||||
|
# Create this file: /etc/udev/rules.d/99-hidraw-permissions.rules
|
||||||
|
# #Allow munin to read hidraws from Cleware
|
||||||
|
# SUBSYSTEM=="usb", KERNEL=="hiddev*", GROUP="munin", MODE="0660"
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
config)
|
config)
|
||||||
|
@ -32,11 +43,10 @@ if [ ! $serial ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$bin -c 1 -ag > /dev/null 2>&1
|
$bin -d $serial -c 1 -ag > /dev/null 2>&1
|
||||||
|
|
||||||
echo -n "temp.value "
|
echo -n "temp.value "
|
||||||
$bin -d $serial -b -c 1 -rt
|
$bin -d $serial -b -c 1 -rt
|
||||||
|
|
||||||
echo -n "hum.value "
|
echo -n "hum.value "
|
||||||
$bin -d $serial -b -c 1 -rh
|
$bin -d $serial -b -c 1 -rh
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue