HI guys,
Grafana v10.4.7 (8d068faebe)
My case is to setup an alert to check if my service deployed to different clusters has the same release-id. The metrics are exposed to two data sources so that I have two queries A and B:
A: group(
kube_deployment_labels{namespace=“namespace”, label_component=~“mysvc”,clustername=“cluster1”})
by (clustername, label_component,label_release_id)
A result:
{clustername=“cluster1”, label_component=“mysvc”, label_release_id=“main.b99.aabcd”} 1
B: group(
kube_deployment_labels{namespace=“namespace”, label_component=~“mysvc”,clustername=“cluster2”})
by (clustername, label_component,label_release_id)
B result:
{clustername=“cluster1”, label_component=“mysvc”, label_release_id=“main.b98.32dfd”} 1
I am using Math expression with $A==$B and expected 0 as A has different label_release_id with B, but the final result is 1 and it shows warning:
2 items dropped from union(s): [“$A == $B”: ($A: {clustername=cluster1, label_component=mysvc, label_release_id=main.b99.aabcd}) ($B: {clustername=cluster2, label_component=mysvc, label_release_id=main.b98.32dfd})]
I expect to be able to compare labels comprehensively instead of just comparing aggregate values. Can anyone help? Thanks.