Skip to content

Instantly share code, notes, and snippets.

@koemu
Last active February 13, 2016 05:50
Show Gist options
  • Save koemu/baf02d03b6462d0b1d54 to your computer and use it in GitHub Desktop.
Save koemu/baf02d03b6462d0b1d54 to your computer and use it in GitHub Desktop.
Get Raspberry pi temperature for Mackerel
# Please append this lines to your config file.
[plugin.metrics.raspberrypi_env_temp]
command = "/usr/local/bin/raspberrypi_env_temp.py"
type = "metric"
#!/bin/bash
DATE=$(date +%s)
echo -e "raspberry_pi.env.temp.cpu\t$(vcgencmd measure_temp | awk -F= '{print $2}' | awk -F\' '{print $1}')\t${DATE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment