-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow using group_left(*) and group_right(*) as a special case for co…
…pying all the labels from `one` side of `many-to-one` operations Also allow specifying an optional prefix to add to copied label names from the other side of binary operator via `group_left(...) prefix "..."` syntax. The labels specified inside `on(...)` aren't copied. For example, the following query copies all the labels from kube_namepsace_labels metric to kube_pod_info, while adding "ns_" prefix to the copied labels: kube_pod_info * on(namespace) group_left(*) prefix "ns_" kube_namespace_labels This allows solving the following questions: - https://stackoverflow.com/questions/76661818/how-to-add-namespace-labels-to-pod-labels-in-prometheus - https://stackoverflow.com/questions/76653997/how-can-i-make-a-new-copy-of-kube-namespace-labels-metric-with-a-different-name
- Loading branch information
Showing
2 changed files
with
86 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters