BasicStats Aggregator Plugin - Multiple aggregator periods and custom tags

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.

  1. 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 ?
  2. 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.

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:

  period = "30s"
    period = "30s"

  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

Thanks a lot for all your inputs… Let me test it.