3 Generate graphs for temperature and humidity by utilizing Munin.
8 0. Keep a logfile with the most recent single line
9 1. Use the munin plugin to generate munin-compatible data from the log file
14 0. Checkout the munin plugin code:
16 $ git clone ssh://git.cweiske.de/~/git/usb-wde1-tools.git
19 1. A process needs to watch the USB interface and log the last
20 line with temperature data into a log file.
21 You can do that manually with
22 $ socat /dev/ttyUSB0,b9600 STDOUT |./munin/log-single-line.sh test.log
24 $ ./dummy-data-generator.php |./munin/log-single-line.sh test.log
26 The most easy way is to run
27 $ cd munin && nohup ./usb-wde1-log-last.sh &
28 once. It backgrounds the logging process and logs into /tmp/usb-wde1-last.
29 This process needs to be started whenever the machine is rebooted.
31 2. Link the munin plugin:
32 $ cd /etc/munin/plugins
33 $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_temperature
34 $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_humidity
36 3. Configure the plugins
37 Edit /etc/munin/plugin-conf.d/munin-node and add the following lines:
39 env.logfile /tmp/usb-wde1-last
42 env.sensor0 Living room
47 $ munin-run usb-wde1_temperature autoconf
49 $ munin-run usb-wde1_temperature config
50 - should display the plugin configuration with all environment variables
52 $ munin-run usb-wde1_temperature
53 - should display the current values from the log file
55 5. You are done - enjoy.