Hello all,
Sorry, if this is in the wrong location; I am using Influx v1.8.10.
Leading to another question:
Should I look at moving over to the latest and greatest InfluxDB version and start a fresh, or get this ’ old ’ data down sampled etc on v1.8.10 ?
After a ’ default ’ setup of Icinga2 + InfluxDB a couple of years ago, I now have an InfluxDB of nearly 1tb. (Most checks are at 3min intervals, with over 8k checks ! )
Running on a system with 64gb RAM. (Fast disks, CPU etc)
The influxDB does not start due to out of memory issues.
Increasing the CacheMaxMemorySize to 5g did enable the DB to start for a short period of time, but then it crashed again with memory issues)
I would like to downsample this to fit the following requirement:
1 = 3 mins interval for one week (visible in the linked graphs in IcingaWeb2)
2 = 1 hour interval for one month (Grafana visibility)
3 = 1 day interval for 3 years (Grafana visibility)
4 = delete after 3 years
Here are my thoughts so far:
CREATE DATABASE “icinga2” WITH DURATION 1w1d REPLICATION 1 NAME “rp_1_week”
CREATE RETENTION POLICY “rp_1_month” ON “icinga2” DURATION 4w1d REPLICATION 1
CREATE RETENTION POLICY “rp_1_year” ON “icinga2” DURATION 52w1d REPLICATION 1
CREATE RETENTION POLICY “rp_3_years” ON “icinga2” DURATION 156w REPLICATION 1
CREATE CONTINUOUS QUERY “cq_after_1_week” ON “icinga2” BEGIN SELECT mean(value) AS value,mean(crit) AS crit,mean(warn) AS warn INTO “icinga2”.“rp_1_month”.:MEASUREMENT FROM “icinga2”.“rp_1_week”././ WHERE time < now() -1w GROUP BY time(1h), END
CREATE CONTINUOUS QUERY “cq_after_1_month” ON “icinga2” BEGIN SELECT mean(value) AS value,mean(crit) AS crit,mean(warn) AS warn INTO “icinga2”.“rp_1_year”.:MEASUREMENT FROM “icinga2”.“rp_1_month”././ WHERE time < now() -4w GROUP BY time(1d), END
CREATE CONTINUOUS QUERY “cq_after_1_year” ON “icinga2” BEGIN SELECT mean(value) AS value,mean(crit) AS crit,mean(warn) AS warn INTO “icinga2”.“rp_3_years”.:MEASUREMENT FROM “icinga2”.“rp_1_year”././ WHERE time < now() -52w GROUP BY time(1d), END
The shard and shard duration configuration is not so clear, so it fits all in with the requirements and available system resources.
I have gone through various docus and links and you tube videos, but still have not hit that ’ Ah ha ’ moment…
Any tips or advice ?
Would be much appreciated.
Thanks in advance.