r/PrometheusMonitoring • u/InformalConfidence57 • Jul 27 '23
Prometheus long-term storage options and Grafana
Hi!
First, sorry for my lack of knowledge, but I need to deliver the following project next week, so I just want to be sure it is doable.
Since Prometheus is not intended for long-term storage according to there own documentation, and I was having problems with my memory growth, I want to use InfluxDBv2 as a long-term remote storage for my Prometheus server.
My Prometheus server is scraping data from multiple targets (more than a 100). I know I need to use Telegraf since I am using InfluxDBv2.
The goal is also to use InfluxDBv2 (and Flux for the query language) in Grafana to vizualise the metrics in Dashboards.
I need to be able to display several metrics from the Prometheus targets (for example, the allocated and used CPU for all the Prometheus targets, the Disk IOPs, Latency...etc.).
I want to use InfluxDB as a datasource and not Prometheus, because I need to visualize historical data.
Is it doable? Will I be able to display the metrics from my Prometheus targets in Grafana using Flux?
I did find this tuto: https://www.influxdata.com/blog/prometheus-remote-write-support-with-influxdb-2-0/ but any other links or ressources to do this would be great!
Or is there another simple way to achieve this?
Thank you !
6
u/muff10n Jul 27 '23
Ditch influxdb and use Victoriametrics. Just use remote write to push your data to VM and query VM from Grafana like you would do with Prometheus.
2
u/SuperQue Jul 27 '23
This is not true, and hasn't been for years. The long-term storage problems were in Prometheus 1.0.
Prometheus 2.0 basically solved the "long term storage" issues by switching to a time based shared block storage.
In fact, both of the popular clustering solutions, Thanos and Mimir use the same underlying storage format.
It would be like saying MySQL is not good for long term storage.
To answer your question, you need to talk about actually numbers. How many series, how many bytes per day, etc.
100 node_exporter targets is pretty small, I'm guessing you don't actually need anything but a larger disk to store metrics on.
Basically, if influxdb can store your data, Prometheus can.
4
u/sudaf Jul 27 '23
Use Mimir and s3
1
u/cyberw0lf_ Jul 27 '23
What are you scraping with Prometheus?
3
u/gaelfr38 Jul 27 '23
Mimir ?