Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upsupport stddev for matrix with group bys #5385
Comments
This comment has been minimized.
This comment has been minimized.
|
We don't mix cross-sectional and longitudinal aggregations. What you probably want here is a recording rule with the cross-sectional, and then do the over_time on that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alburthoffman commentedMar 20, 2019
Proposal
Use case. Why is this important?
stddev is quite useful function. and sometimes we want to caculate it for a given time window with group bys. But it turns out that prometheus could support it easily.
Bug Report
What did you do?
simply speaking, I want to do something like this
stddev_over_time(metric[10m]) by (pool, colo)What did you expect to see?
it will group by metrics with pool and colo, then caculate stddev for last 10m for each group.
What did you see instead? Under which circumstances?
an error which means prometheus doesnot support it.
Environment
lastest prometheus version
any other ideas like
avg(metric) by (pool, colo)first, wont get the correct stddev value.the only solution here for now is to create a new metric which is as same as the old one but only has pool and colo dimensions, and the running
stddev_over_time(metric_with_pool_colo_dimensions_only[10m])so is there a better way to support this? or we can enhance stddev to aggregate matrix?