I’m trying to push data through HTTP API directly to Grafana Cloud from a custom script which takes care on collecting and pre-aggregating relevant data.
To send the data I use the approach documented here:
Example request (I added a timestamp at the end)
curl -X POST -H “Authorization: Bearer $API_KEY” -H “Content-Type: text/plain” “xyz.grafana.net/api/v1/push/influx/write” -d “test,bar_label=abc metric=35.3 1702670700000000000”
This works fine to send fresh data but unfortunately does not work if I send data with an old timestamp. In this case I get:
{“code”:“invalid”,“message”:“bad metrics write request”}
How could I send historic data? Is this possible through the /api/v1/push/influx/write endpoint? Or do I need to take a different approach? E.g. setting up a Prometheus DB and import data there.