mirror of
https://github.com/cmur2/munin-pcsensor.git
synced 2024-12-22 02:54:26 +01:00
Fiat lux
This commit is contained in:
commit
71fd2c6c64
16
README.md
Normal file
16
README.md
Normal 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
23
pcsensor
Executable 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
|
Loading…
Reference in New Issue
Block a user