This commit is contained in:
cn 2013-06-02 23:14:07 +02:00
commit 71fd2c6c64
2 changed files with 39 additions and 0 deletions

16
README.md Normal file
View File

@ -0,0 +1,16 @@
munin-pcsensor
==============
Creates Munin graphs from the data delivered from an attached TEMPer USB Thermometer.
For data collection the `pcsensor` utility is needed (by default it resides in */usr/local/bin/*), it can be obtained in source or binary form from different places like [here](https://github.com/jeroensteenhuis/pcsensor).
Script was tested with pcsensor version 1.0.1.
Install
-------
Clone this repository or download the pcsensor file and create a
symlink as *root* in /etc/munin/plugins by using e.g.:
cd /etc/munin/plugins; ln -s /path/to/pcsensor
**Don't forget to restart your munin-node deamon.**

23
pcsensor Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
# Where is pcsensor located?
PCSENSOR="/usr/local/bin/pcsensor"
if [ ! -e ${PCSENSOR} ]; then
echo "pcsensor executable not found" >&2
exit -1
fi
if [ "${1}" = "config" ]; then
echo "graph_title TEMPer USB Thermometer"
echo "graph_scale no"
echo "graph_vlabel Celsius"
echo "graph_category sensors"
echo "graph_info This graph shows the temperature reported by the first attached TEMPer USB Thermometer"
echo "temp.label temperatue"
echo "temp.type GAUGE"
else
echo -n "temp.value "
${PCSENSOR} -cm | head -n1
fi