So I’m running InfluxDB Community together with Grafana and collecting metrics from Telegraf from some server cluster and what I’m attempting to do is to only downsample the data that I have collected for the purpose of saving space and retaining the data for much longer. I created a couple of Continuous Queries on my InfluxDB database, meant to replicate the database into another retention policy on the same database. This is because as far as I know, grafana only really queries the same database to gather metrics in their panels.
Yet, it doesn’t work. I can find the measurements in the new RP, but not the field keys that should be included in the measurements.
I did this and crossed my fingers:
cq_5m CREATE CONTINUOUS QUERY cq_5m ON “cluster_database”
SELECT mean() INTO “cluster_database”.“10_week”.:MEASUREMENT FROM “cluster_database”.week././ GROUP BY time(5m), *
I want the database structure and metrics to be replicated almost exactly between retention policies, only difference being the time groupings of the datapoints being longer, effectively only downsampling the data.
Is there a simpler, better or correct way to do this? Maybe a simple continuous query that looks something like DOWNSAMPLE “cluster_database”.week INTO “cluster_database”.“10_week” GROUP BY time(5m)?