Besides Brian's answers, it can greatly help to use PromLens (
https://github.com/prometheus/promlens, see promlens.com for some
screenshots/videos) to analyze complex expressions like this. Using
PromLens, you can click on any part of the query to run it separately, and
you can look at binary operators in an "Explain" tab that shows you the
matching behavior. Currently it only shows you the matching when there is
no error, but I'm working on a complete revamp of that binary operator
visualizer to show matchings for all error cases as well. Eventually we
also hope to put the same functionality into Prometheus itself, but the
benefit of PromLens as a standalone tool is that you can run it against any
PromQL-compatible system, not just Prometheus itself.

On Tue, Jul 25, 2023 at 2:57 PM Rakesh Kollakandi <[email protected]>
wrote:

> Hi,
>
> I have a query like below:
>
> (kubelet_volume_stats_used_bytes * on (namespace,persistentvolumeclaim)
> group_left(storageclass, provisioner) (kube_persistentvolumeclaim_info * on
> (storageclass)  group_left(provisioner) kube_storageclass_info
> {provisioner=~"(.*rbd.csi.ceph.com)|(.*cephfs.csi.ceph.com)"})) /
> (kubelet_volume_stats_capacity_bytes * on (namespace,persistentvolumeclaim)
> group_left(storageclass, provisioner) (kube_persistentvolumeclaim_info * on
> (storageclass)  group_left(provisioner) kube_storageclass_info
> {provisioner=~"(.*rbd.csi.ceph.com)|(.*cephfs.csi.ceph.com)"})) > 0.75
>
> this query failed and report an error like below,
>
> many-to-many matching not allowed: matching labels must be unique on one
> side
>
> Has anyone dealt with this specific error and can you recommend something?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/a42b0758-bc55-4f1b-9698-45186b978e65n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/a42b0758-bc55-4f1b-9698-45186b978e65n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Julius Volz
PromLabs - promlabs.com

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAObpH5wBmg6QnnGn6PtZKbGPqCLtyRXBA73T677h9xbbr0W3dQ%40mail.gmail.com.

Reply via email to