Skip to content

Instantly share code, notes, and snippets.

@lorentzca
Last active January 29, 2017 07:44
Show Gist options
  • Save lorentzca/964071e0cbba25f9dd8f36aae6ac0a3e to your computer and use it in GitHub Desktop.
Save lorentzca/964071e0cbba25f9dd8f36aae6ac0a3e to your computer and use it in GitHub Desktop.
とにかくmackerelのグラフアノテーション機能をapiから叩いてみたいときに実行するコマンド
curl -X POST -H "X-Api-Key: $MACKEREL_APIKEY" -H "Content-Type:application/json" -d "{\"title\": \"test\", \"description\": \"test-$(date +%Y%m%d%H%M)\", \"from\": $(date +%s), \"to\": $(date +%s), \"service\": \"サービス名\", \"roles\": [\"ロール名\"]}" https://mackerel.io/api/v0/graph-annotations
@lorentzca
Copy link
Author

Requirement

Set mackerel api key

export MACKEREL_APIKEY="XXXXXXXX"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment