So, the correct command to send multiple metrics in one request using curl is: curl -d $'test,test_label=test_label_value direct_metric=22\ntest_1,test_label_1=test_label_value direct_metric=23' -i -u <username>:<key> https://influx-prod-01-eu-west-0.grafana.net/api/v1/push/influx/write
Have you been able to send any metrics to Prometheus (hosted on Grafana Cloud)? If yes, how were they sent? Do you have plans to use any other datasources with Grafana besides Prometheus?
Just trying to figure you where you are in your journey so either me or others can help.
Correct, I am trying to send metrics directly to Prometheus (part of our Grafana Cloud free plan) using curl like you described in previous posts in this thread here.
In previous posts, you already said, sending to influx in Grafana cloud should work even with free plan.
Other metrics are shown in Prometheus. But the other metrics are scraped by a grafana agent running in the Kubernetes cluster. Additionally, I want to send metrics directly because scraping does not make sense for them.
I also tried Graphite for the metrics data source. But since graphite does only accept metrics with timestamps in the past 1 hour, this does not fit perfectly our use case. We may want to push historic metrics.
I use Telegraf → InfluxDB (locally hosted) → Grafana Cloud
Your setup is Telegraf ->Prometheus Cloud → Grafana Cloud
I can try to set up something simple in my test system this week and try to figure out how to work thru the error message you mentioned.
In addition to Telegraf, you also mentioned Grafana agent. Are those metrics also flowing into Prometheus, and do you have any issues with that signal chain? If it works, then is Telegraf even necessary in your setup?
Just to give you more food for thought…
Influx DB also has a cloud product that can be used with Grafana.
Is there any reason you have chosen Prometheus as your database instead of InfluxDB? Both are excellent.
Is all of this data coming from K8s, or is there other data elsewhere that you plan to scrape?
No, incorrect. I said nothing about Telefgraf, nor InfluxDB.
I want to send metrics directly from my application (any client sending http request) to prometheus to store custom metrics, that cannot be scraped (because the app is not available via http).
My setup is client with http request / curl -> Prometheus Cloud -> Grafana Cloud
The whole thread here is about sending metrics directly to Prometheus, without scraping.
No, only javascript but not with node.js environment. The app gets triggered 4-8 times a day and shall collect metrics in the past 4 hours and push them to Prometheus. Mainly an offline use case.
I might found the root issue of my problems with the example of pushing metrics into Prometheus.
I just saw that we already reached the limit of 10k metrics in our free plan. Somehow, we are sending lots of different metrics with our Kubernetes cluster installation.
With the knowledge of reaching the limit, the error 400 bad metrics write request makes sense.
I just tested it with a colleague in a different account and the request is accepted.
So my task for tomorrow will, either start the paid subscription without having the limit of 10k metrics or reduce the send metrics.
But still strange that, foo_metric,bar_label=abc cpu_load="54.1"
returns a 204, but you cannot find the metrics in Grafana with Explore, then.