Skip to content

Instantly share code, notes, and snippets.

@jmarbach
Last active October 18, 2023 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmarbach/805fd0d455d9a40cc4309078deb889b4 to your computer and use it in GitHub Desktop.
Save jmarbach/805fd0d455d9a40cc4309078deb889b4 to your computer and use it in GitHub Desktop.
Sending Prometheus metrics to Grafana Cloud using the Influx Line Protocol and cURL
API_KEY="<user_id>:<api-key>"
URL="https://influx[...].grafana.net/api/v1/push/influx/write"
curl -X \
POST -H \
"Authorization: Bearer $API_KEY" -H \
"Content-Type: application/json" "$URL" \
-d "test,bar_label=abc,source=grafana_cloud_docs metric=35.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment