Telegraf Final Aggregator Metric is outside of aggregation window

Hi,

I’m trying to use the final aggregator plugin on a stream coming from JSON documents from kafka.
The only think I want to do is getting the last measurement in a time interval of 1m in order to aggregate the data before pushing it to a InfluxDB cloud. Unfortunately the Basicstats aggregator does not support a last operation, the issue is still open for a while: Basicstats aggregator: add "last" in stats · Issue #6263 · influxdata/telegraf · GitHub. So I have to use the final aggregator, which looks like it should do what I want.
The only output I get though, is these error messages:

2021-02-11T07:15:19Z D! [aggregators.final] Metric is outside aggregation window; discarding. 2021-02-11 07:22:34.673 +0000 UTC: m: 2021-02-11 08:15:00 +0100 CET e: 2021-02-11 08:16:00 +0100 CET g: 10s

I am playing around with various settings of period, series_timeout, grace and even delay but never get something else than this. Unfortunately the documentation is very terse.

So if I’m not totally wrong, series_timeout must be the interval 1m in which I want to aggregate data
For this use case I want only the aggregated measurement, so drop_original=true
But now, period, intuitively I’d set it to 1m as well but then it finishes. What does the output above mean, I mean where do these timestamps come from? The record has one timestamp.
How do I have to set these parameters in order to get it working, anyone any idea or more examples?

[[aggregators.final]]
period = “1m”
delay = “2m”
drop_original = true
series_timeout = “1m”
grace = “10s”

Thanks a lot, Peter

try setting grace much higher. something like grace = "10m"