Grafana: Dynamic Retentions (InfluxDB): Unterschied zwischen den Versionen

Aus Wiki-WebPerfect
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
If you plan to store metric data in an InfluxDB for a long time, you have to downsample the data (reduce the granularity to increase the scalability). More about downsampling: [[InfluxDB: Downsampling]]
+
If you plan to store metric data in an InfluxDB for a long time, you have to downsample the data (reduce the granularity to increase the scalability). More about downsampling: [[InfluxDB: Downsampling]] <br>
 +
Downsampling in InfluxDB means you create a new "database/bucket" and write the downsampled data into it. This leads to problems with dashboards.
 +
 
 +
= Problem explanation =
 +
We assume: You have three different retention policies/configurations.
 +
*rp_30d:  Retention = 30 Days, Granularity = raw
 +
*rp_90d:  Retention = 90 Days, Granularity = 1h
 +
*rp_365d: Retention = 365 Days, Granularity = 12h
 +
 
 +
If we create a dashboard, for example in Grafana, we have to specify the bucket (InfluxDB 2.x) or the retention-policy (InfluxDB 1.x) in our query.
  
  

Version vom 6. Januar 2021, 14:34 Uhr

If you plan to store metric data in an InfluxDB for a long time, you have to downsample the data (reduce the granularity to increase the scalability). More about downsampling: InfluxDB: Downsampling
Downsampling in InfluxDB means you create a new "database/bucket" and write the downsampled data into it. This leads to problems with dashboards.

Problem explanation

We assume: You have three different retention policies/configurations.

  • rp_30d: Retention = 30 Days, Granularity = raw
  • rp_90d: Retention = 90 Days, Granularity = 1h
  • rp_365d: Retention = 365 Days, Granularity = 12h

If we create a dashboard, for example in Grafana, we have to specify the bucket (InfluxDB 2.x) or the retention-policy (InfluxDB 1.x) in our query.



Grafana template variables for dynamic retention policies on InfluxDB 2.x

In InfluxDB 2.x retention policies are no longer seperate objects like in InfluxDB 1.x. In InfluxDB 2.x retention is an bucket configuration.



Grafana template variables for dynamic retention policies on InfluxDB 1.x

01-dynamic retention policies.png