Last active
October 1, 2020 04:41
-
-
Save lukasmalkmus/410232035c3e831cb780347e77ae5382 to your computer and use it in GitHub Desktop.
Add this single line to your crontab and enable the textfile collector. Collects the temperature of the CPU in degree celsius.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# crontab -e | |
* * * * * /opt/vc/bin/vcgencmd measure_temp | awk -F"=" '{print $2}' | awk -F"'" '{print "node_cpu_temperature " $1}' > /var/lib/node_exporter/textfile_collector/cpu_temp.prom.$$ && mv /var/lib/node_exporter/textfile_collector/cpu_temp.prom.$$ /var/lib/node_exporter/textfile_collector/cpu_temp.prom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment