I could not find a conclusive guide on how to set this up so i thought i would post my notes in case it helped anyone else.
Install munin as per normal.
Within the munin plugins folder
- Code: Select all
/etc/munin/plugins
Write a new file, I called mine "temp"
Copy the below into the file
- Code: Select all
#!/bin/sh
case $1 in
config)
cat <<'EOM'
graph_title Temperature
graph_vlabel temp in C
graph_args --base 1000 -l 0
graph_category Temperature
temp.label Temperature
temp.warning 60
temp.critical 85
EOM
exit 0;;
esac
temp=`sudo /opt/vc/bin/vcgencmd measure_temp | cut -d"=" -f 2 | cut -d"'" -f 1`
echo "temp.value "$temp""
Then you need to change the sudoers file to allow the command to run, i kept getting
- Code: Select all
VCHI initialization failed
- Code: Select all
sudo visudo
Change the below
- Code: Select all
#includedir /etc/sudoers.d
pi ALL=(ALL) NOPASSWD: ALL
to
- Code: Select all
#includedir /etc/sudoers.d
pi ALL=(ALL) NOPASSWD: ALL
nobody ALL=(ALL) NOPASSWD: /opt/vc/bin/vcgencmd
To save and quit
Ctrl+x
y
Enter
its now ready to test
- Code: Select all
munin-run temp
It should display the current temperature of your pi, after 5 min the new graph should show up in the munin web screens.
Code snippets are pulled from lots of different sites on the web I would give credit but I have forgotten where it all come from
Commends, Criticism, Improvements are all welcome
