Skip to content

Instantly share code, notes, and snippets.

@scott-edwards-123
Created June 1, 2015 08:26
Show Gist options
  • Save scott-edwards-123/290728bf8984e240151a to your computer and use it in GitHub Desktop.
Save scott-edwards-123/290728bf8984e240151a to your computer and use it in GitHub Desktop.
Curl Statement to send a Custom Metric to StackDriver
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