-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grouping in range vector #2884
Comments
Two things:
|
cyriltovena
added a commit
to cyriltovena/loki
that referenced
this issue
Dec 3, 2020
…rations. This essentially allows to aggregate over all dimensions when using by () while without() is a noop. This also makes it possible for max and min range vector aggregation to use grouping, which is simpler than doing max by (foo) max_over_time(...) Examples: - `max_over_time(...) by ()` gives your the max over time accross of all series. - `min_over_time(...) by (namespace)` gives you the min over time per namespace. - `max_over_time(...) without (namespace)` gives you the max over time removing the namespace dimension. PS: I've also refactored a bit how we optimized grouping to make it more clear. Fixes grafana#2884 Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
cyriltovena
added a commit
that referenced
this issue
Dec 7, 2020
) * Allows by/without to be empty and available for max/min_over_time operations. This essentially allows to aggregate over all dimensions when using by () while without() is a noop. This also makes it possible for max and min range vector aggregation to use grouping, which is simpler than doing max by (foo) max_over_time(...) Examples: - `max_over_time(...) by ()` gives your the max over time accross of all series. - `min_over_time(...) by (namespace)` gives you the min over time per namespace. - `max_over_time(...) without (namespace)` gives you the max over time removing the namespace dimension. PS: I've also refactored a bit how we optimized grouping to make it more clear. Fixes #2884 Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com> * nit doc. Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
You still can't group by in a |
currently stuck trying to get a query to do this exact thing -
|
For example:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LogQL v2 introduces new range vector aggregation over labels values instead of logs using unwrap. Values that can be extracted from logs and so high cardinality.
We added by/without grouping clause on non-associative operations (avg_over_time, quantile_over_time, stddev_ove...).
We didn't added this for rate,count_over_time, bytes_rate and even max_over_time, because Prometheus doesn't have this.
This would allow to:
rate() by (cluster)
, instead ofsum by (cluster) (rate())
The text was updated successfully, but these errors were encountered: