Skip to content

Instantly share code, notes, and snippets.

@Don42
Last active May 2, 2016 17:03
Show Gist options
  • Save Don42/944304339ebbb22cd9d3b7fbc553cf26 to your computer and use it in GitHub Desktop.
Save Don42/944304339ebbb22cd9d3b7fbc553cf26 to your computer and use it in GitHub Desktop.
# Run this via cron
/usr/local/bin/filtered_sensors.sh > /var/lib/node_exporter/textfile_collector/lmsensors.prom.$$ && mv /var/lib/node_exporter/textfile_collector/lmsensors.prom.$$ /var/lib/node_exporter/textfile_collector/lmsensors.prom
#/bin/sh
sensors | perl -nle 's/Core\s(\d+): \s* \+(\d+) \..*/node_cpu_temp{cpu="\1"} \2/x and print'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment