Over time functions are not supporting by/without syntax. Which is the mathematical difference between using avg_over_time(metric[1h]) and avg(metric[1h])? Can a over time function be replaced with a function (in this case avg) with the same results? Thanks!
PromQL avg vs avg_over_time
27.5k Views Asked by RJtokenring At
3
The
avg_over_time(m[d])
function performs the following:m
d
preceding every point on the graph.The
avg(m)
function performs the following:m
As you can see,
avg_over_time()
andavg()
are quite different functions -avg_over_time()
calculates distinct average values for every selected time series, whileavg()
calculates average values across the selected time series.