many-to-many not allowed error

32 views
Skip to first unread message

saravanan E.M

unread,
Apr 18, 2024, 2:30:49 AM4/18/24
to Prometheus Users
Hi Team

Am getting many-to-many not allowed error while trying to join two time series with role

redis_memory_max_bytes{k8s_cluster_name="$cluster", namespace="$namespace", pod="$pod_name"}
  * on (k8s_cluster_name, namespace, pod) group_left(redis_instance_info)
  (redis_instance_info{role=~"master|slave"})

Kindly help in having the correct query for this.

Thanks
Saravanan

Brian Candler

unread,
Apr 18, 2024, 3:25:22 AM4/18/24
to Prometheus Users
Look at the results of each half of the query separately:

    redis_memory_max_bytes{k8s_cluster_name="$cluster", namespace="$namespace", pod="$pod_name"}

    redis_instance_info{role=~"master|slave"}

You then need to find some set of labels which mean that N entries on the left-hand side always match exactly 1 entry on the right-hand side.
Reply all
Reply to author
Forward
0 new messages