Hi All,
I am trying out Telegraf (v1.5.0), influxDB (v1.4.2) on Windows 10 Pro for the first time.
For our use case we need to aggregate data for mutiple intervals - hourly, daily, weekly, monthly, yearly etc.
So would like to know the best and efficient way to implement the same.
Can I add multiple section for BasicStats Aggregator Plugin [[aggregators.basicstats]] ? How do I specify multiple period (hourly, daily etc) in the same configuration file ?
or Should we use multiple instances of telegraf ? Is it possible to add custom tags (as per aggregator data interval) for each time series ?
Any help would be highly appreciated.
Thanks,
Arti
To directly answer your questions, you can have multiple basicstats aggregators, each one can have different options and you can add tags if you like:
[[aggregators.basicstats]]
period = "30s"
[aggregators.basicstats.tags]
period = "30s"
[[aggregators.basicstats]]
period = "60s"
You may want to look over the examples the configuration documentation.
However, I don’t think this technique is suitable for such long time periods as a day, I would recommend using Kapacitor to do the aggregations after the raw values are stored in InfluxDB instead. This link should help you get started: Using Kapacitor as a continous query engine | Kapacitor 1.4 Documentation