You have lots of sub-expressions there. Try breaking them down into parts
until you find where the error is: you can enter them into the PromQL web
interface.
A * on (uuu) group_left(vvv) B
A * on (uuu) group_left(vvv) B * on (www) group_left(xxx) C
A * on (uuu) group_left(vvv) B * on (www) group_left(xxx) C * on (yyy)
group_left(zzz) D
... etc
Then when you find the error, perform the LHS and RHS queries separately,
and inspect the labels.
The error is telling you that you have multiple instances of the same
combination of labels on both sides of one of those operators. With an
expression like
A * on (foo,bar) group_left(...) B
then every value of B must have a distinct (unique) combination of labels
foo and bar, if there is at least one match on the A side. That is, one or
more "A" must match exactly one "B", and the matching involves the on(...)
labels.
The solution could involve adding extra labels to the on(...) clause, but
it really depends on what metrics you have there.
On Tuesday, 25 July 2023 at 13:57:09 UTC+1 Rakesh Kollakandi 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/600b8865-6302-4ee2-914f-17403d0ce013n%40googlegroups.com.