By *seasoning” I mean a metric that fluctuates near periodically, e.g. number of players reaches its peak at Saturday and Sunday.
Suppose I have a matric my_metric
with period of one week. How to calculate the mean of its values at the same time of the previous 3 weeks (mathematically, v[n-1w] + v[n-2w] + v[n-3w]
) ?
Tried
avg_over_time({my_metric}[3w:1w])
, but its sample rate becomes 1 week, while I need it to be more meaningful for monitoring, e.g 5m or 10m.
sum(agv_over_time(my_metric[1w] offset 1w))
(and the offset 2w and 3w) is the average within a consecutive week, not the same points of 3 weeks.