Created
June 1, 2015 08:26
-
-
Save scott-edwards-123/290728bf8984e240151a to your computer and use it in GitHub Desktop.
Curl Statement to send a Custom Metric to StackDriver
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
curl https://custom-gateway.stackdriver.com/v1/custom \ | |
-X POST \ | |
-H "Content-Type: application/json", \ | |
-H "x-stackdriver-apikey: {{ StackDriverApiKey }}" \ | |
-d '{"timestamp": '$TimeCollected', "proto_version": 1, "data": [ { "name": "CustomMetricName", "value": '$MetricValue', "instance": "'$InstanceId'", "collected_at": '$TimeCollected' } ] }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment