Quick hack to get Munin to graph the cpu temperature.
First of all, install Munin and make sure it’s working.
Then follow these steps:
1) We’ll use cron to write the current temp to a log file. We do this because I wasn’t able to get Munin to directly execute the command (error:
temp.value VCHI initialization failed)
crontab -e and add this line (this has to be on one line):
*/5 * * * * /opt/vc/bin/vcgencmd measure_temp | cut -d "=" -f2 | cut -d "'" -f1 > /tmp/.temp
2) Go to
/etc/munin/plugins/, and create a file
temp, and add this content:
case $1 in
echo -n "temp.value "
Save and exit the editor.
I’m not sure this is needed, but better do it:
chmod +x temp
3) restart munin-node (
4) test if it’s working:
# telnet localhost 4949
Connected to localhost.
Escape character is '^]'.
# munin node at industry.yeri.be
That’s it. Your munin daemon/host should now correctly graph the temperature.
Edit (8/2/2014): updated script can be found here.