Hello @peg,
Usually downsampling involves working with recent data or streaming or real time data which is why
|> range(start: -task.every)
is used.
It looks like you’re performing historical downsampling of all of your data, which I wouldn’t suggest doing for your task. This task will probably fail as your data increases with time. In other words using start:0
is considered bad practice.
Are you able to query that data without a task?
from(bucket: “icinga”)
|> range(start: 2024-02-28T13:35:00Z, stop: 2024-03-14T00:00:00Z)
|> aggregateWindow(every: 2d, fn: mean)
What does the above query return? First verify that you are getting query between those ranges. Then that the aggWindow function is operating as you expect.
The way that I usually debug tasks is to just try to run the query outside of task.
after you run that query once and have performed the historical downsampling I would change to start: -task.every
so that your task can be more performant and not have to recalculate and rewrite a bunch of old data every time.