Skip to content

Instantly share code, notes, and snippets.

@jmarbach
Created February 9, 2023 20:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmarbach/f3785c9d59ed003b39163e06109485cb to your computer and use it in GitHub Desktop.
Save jmarbach/f3785c9d59ed003b39163e06109485cb to your computer and use it in GitHub Desktop.
Sending Graphite metrics to Grafana Cloud with cURL
#!/usr/bin/bash
API_KEY="<user_id>:<api-key>"
URL="https://[...].grafana.net/graphite/metrics"
curl -X POST -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" "$URL" -d '[{
"name": "test.metric",
"interval": 10,
"value": 12.345,
"tags": ["foo=bar", "source=grafana_cloud_docs"],
"time": 1534685580
}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment