I use the InfluxDB remote write/read api described here: Prometheus endpoints support in InfluxDB | InfluxDB OSS 1.7 Documentation to store metrics from a Kubernetes cluster provided by prometheus.
Because I get a lot of data, i use continuous queries to aggregate the metrics and store them in different retention policies.
name duration shardGroupDuration replicaN default resolution
---- -------- ------------------ -------- ------- ----------
autogen 120h0m0s 6h0m0s 1 true 1m
2_months 1344h0m0s 24h0m0s 1 false 15m
2_years 17472h0m0s 336h0m0s 1 false 120m
Now I want prometheus to read from all retention policies so that I can view older data in the grafana dashboards, which use prometheus as data source. The above mentioned documentation doesn’t tell from which retention policy prometheus reads.
Can someone tell me, how the InfluxDB api translates the queries and if all retention policies are queried (or how I could configure prometheus/InfluxDB to do so)?
As described in InfluxDB API reference | InfluxDB OSS 1.7 Documentation a retention policy can be chosen by adding “rp=retentionPolicyName” to the URL if using /write. If this also applies to /api/v1/prom/read, I could just set a remote-read URL for every retention policy.
Can somebody confirm?