fix readme
authorChristian Weiske <cweiske@cweiske.de>
Mon, 2 Mar 2015 20:06:02 +0000 (21:06 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 2 Mar 2015 20:06:02 +0000 (21:06 +0100)
.gitignore
README.rst

index 397b4a7624e35fa60563a9c03b1213d93f7b6546..f79db177a4434971db82ef725b8d56e86d513227 100644 (file)
@@ -1 +1,2 @@
 *.log
+README.html
index f8d281df45c3b3624619ec47d23353c044867ac8..87a7d4b46f6898a20f8b69a74e896340c9b18ca3 100644 (file)
@@ -12,45 +12,58 @@ Idea
 
 Setup
 =====
-0. Checkout the munin plugin code:
+0. Checkout the munin plugin code::
+
    $ cd /usr/local/src
    $ git clone git://git.cweiske.de/usb-wde1-tools.git
    $ cd usb-wde1-tools
 
 1. A process needs to watch the USB interface and log the last
    line with temperature data into a log file.
-   You can do that manually with
-   $ socat /dev/ttyUSB0,b9600 STDOUT |./munin/log-single-line.sh test.log
+   You can do that manually with ::
+
+     $ socat /dev/ttyUSB0,b9600 STDOUT |./munin/log-single-line.sh test.log
+
+   The most easy way is to run ::
+
+     $ cd munin && nohup ./usb-wde1-log-last.sh &
 
-   The most easy way is to run
-   $ cd munin && nohup ./usb-wde1-log-last.sh &
    once. It backgrounds the logging process and logs into /tmp/usb-wde1-last.
    This process needs to be started whenever the machine is rebooted.
 
-2. Link the munin plugin:
+2. Link the munin plugin::
+
    $ cd /etc/munin/plugins
    $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_temperature
    $ ln -s /usr/local/src/usb-wde1-tools/munin/usb-wde1_ usb-wde1_humidity
 
 3. Configure the plugins
-   Edit /etc/munin/plugin-conf.d/munin-node and add the following lines:
-   [usb-wde1_*]
-   env.logfile /tmp/usb-wde1-last
-   env.host_name House
-   env.sensors 0 1 7
-   env.sensor0 Living room
-   env.sensor1 Kitchen
-   env.sensor7 Outside
-
-4. Try it:
-   $ munin-run usb-wde1_temperature autoconf
-    - should echo "yes"
-   $ munin-run usb-wde1_temperature config
-    - should display the plugin configuration with all environment variables
-      set
-   $ munin-run usb-wde1_temperature
-   $ munin-run usb-wde1_humidity
-    - should display the current values from the log file
+   Edit /etc/munin/plugin-conf.d/munin-node and add the following lines::
+
+     [usb-wde1_*]
+     env.logfile /tmp/usb-wde1-last
+     env.host_name House
+     env.sensors 0 1 7
+     env.sensor0 Living room
+     env.sensor1 Kitchen
+     env.sensor7 Outside
+
+4. Try it::
+
+     $ munin-run usb-wde1_temperature autoconf
+
+   should echo "yes"
+   ::
+
+     $ munin-run usb-wde1_temperature config
+
+   should display the plugin configuration with all environment variables set
+   ::
+
+     $ munin-run usb-wde1_temperature
+     $ munin-run usb-wde1_humidity
+
+   should display the current values from the log file
 
 5. You are done - enjoy.
 
@@ -59,29 +72,35 @@ Setup
 Debugging & Development
 =======================
 The dummy data generator is a small php script that generates log lines
-as they would come from the usb-wde1 usb port:
-$ ./dummy-data-generator.php |./munin/log-single-line.sh test.log
+as they would come from the usb-wde1 usb port::
+
+  $ ./dummy-data-generator.php |./munin/log-single-line.sh test.log
 
-Local (non-installed) plugin setup:
-$ cd munin
-$ ln -s usb-wde1_ usb-wde1_temperature
-$ ln -s usb-wde1_ usb-wde1_humidity
-$ cd ..
+Local (non-installed) plugin setup::
+
+  $ cd munin
+  $ ln -s usb-wde1_ usb-wde1_temperature
+  $ ln -s usb-wde1_ usb-wde1_humidity
+  $ cd ..
 
 
 Running the munin plugin for development purposes is also relatively easy
 since you can pass the environment configuration variables
-from the munin configuration on the command line:
-$ logfile=test.log sensors="0 1 7" ./munin/usb-wde1_temperature
+from the munin configuration on the command line::
+
+  $ logfile=test.log sensors="0 1 7" ./munin/usb-wde1_temperature
 
 When you have problems running the munin plugin, try to
-remove the line 
- env.host_name House
-from file usb-wde1_
+remove the line ::
+
+  env.host_name House
+
+from file ``usb-wde1_``
 
 
 Permission errors
 -----------------
+::
 
     cu: open (/dev/ttyUSB0): Permission denied
     cu: /dev/ttyUSB0: Line in use