Metric outside aggregation window

2019-08-28T20:36:05Z D! [aggregators.basicstats] metric is outside aggregation window; discarding. 2019-08-28 20:35:54.003 +0000 UTC: m: 2019-08-28 20:36:00 +0000 UTC e: 2019-08-28 20:37:00 +0000 UTC
2019-08-28T20:36:05Z D! [aggregators.basicstats] metric is outside aggregation window; discarding. 2019-08-28 20:35:54.003 +0000 UTC: m: 2019-08-28 20:36:00 +0000 UTC e: 2019-08-28 20:37:00 +0000 UTC
2019-08-28T20:36:05Z D! [aggregators.basicstats] metric is outside aggregation window; discarding. 2019-08-28 20:35:54.003 +0000 UTC: m: 2019-08-28 20:36:00 +0000 UTC e: 2019-08-28 20:37:00 +0000 UTC
2019-08-28T20:36:05Z D! [aggregators.basicstats] metric is outside aggregation window; discarding. 2019-08-28 20:35:54.003 +0000 UTC: m: 2019-08-28 20:36:00 +0000 UTC e: 2019-08-28 20:37:00 +0000 UTC
2019-08-28T20:36:05Z D! [aggregators.basicstats] metric is outside aggregation window; discarding. 2019-08-28 20:35:54.003 +0000 UTC: m: 2019-08-28 20:36:00 +0000 UTC e: 2019-08-28 20:37:00 +0000 UTC

I’m using telegraf v1.10.4 and a lot of metrics are getting dropped. Has anyone else experienced this or know how to resolve this? I’m using the basicstats aggregator to calculate sum and this seems to be affecting some of the data points.

There is a way to address this in Telegraf 1.12.0-rc1 with the new grace option, it looks like you have 60s periods and the values being dropped are about 6 seconds old, so you will probably want to set grace = "10s" in the aggregator.

If you can, give it a shot and let me know if it helps.

Wanted to give an update. We were sending an enormous amount of metrics and the lag was about 30s, so we had to apply some other changes, but the grace option did help for the remaining, thanks