@AndreKR From what I can see, this query should work.
Not directly, but you should be able to use it to calculate the disk size of a bucket. This metric reports the disk size of shards, but your approach of grouping by the bucket and summing should return the sum of all shards associated with the bucket.
These likely just represent the size of each shard over time.
I think to actually get the results you’re looking for (changes over time; not the current state), you’d do this:
That query gives completely different results depending on whether I query the last hour or the last week. I think that is because aggregateWindow(every: v.windowPeriod, fn: sum, createEmpty: false) will sum up more than one report when v.windowPeriod becomes longer than the scrape interval (which I think is 10 seconds).
Ok, you should probably explicitly set every to 10s. v.windowPeriod is derived from the the time range queried divided by the number of pixels available in the cell so the dashboard only displays enough data to render a point per pixel. You may lose some query efficiency as you query larger time ranges, but the behavior should stay the same.