Skip to content

Instantly share code, notes, and snippets.

View scott-edwards-123's full-sized avatar

Scott Edwards scott-edwards-123

View GitHub Profile
@scott-edwards-123
scott-edwards-123 / SendMetricToStackDriver
Created June 1, 2015 08:26
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' } ] }'