Created
February 27, 2018 00:01
-
-
Save kenchan/dcf0e563c087677a4edf444a1603896b to your computer and use it in GitHub Desktop.
This file contains 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
/home/pi/bin/speedtest-cli --server 14623 --json | jq --arg date $(date "+%s") '[{name: "speed_test.download", value: (.download / 1000000), time: $date|tonumber}, {name: "speed_test.upload", value: (.upload / 1000000), time: $date|tonumber}]' | curl -X POST -H "X-Api-Key: #{API_KEY}" -H "Content-Type: application/json" https://api.mackerelio.com/api/v0/services/Home/tsdb -d @- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment