Combine 2 prom queries without Unique value

20 views
Skip to first unread message

Prajakta Solanke

unread,
Oct 14, 2020, 12:57:28 PM10/14/20
to Prometheus Developers
Hello Everyone,

 I am trying to combine 2 queries which do not have unique value among each. Can anybody please help me to find the solution.

Below are the 2 queries.

Query1 : sum by(statefulset)((kube_statefulset_replicas) == (kube_statefulset_status_replicas_ready))

Query2 : (kube_pod_status_phase{phase!="Succeeded"})  ==1)

I have combined 2 queries in past but those were having unique value like below.

sum by(namespace, pod, container) ((avg without(instance) (changes(kube_pod_container_status_restarts_total{namespace=~".*-prod"}[15m])))> 0) + on(pod, namespace) group_left(node) (sum by(pod, namespace, node) (kube_pod_info))

Thanks all in advance.
Reply all
Reply to author
Forward
0 new messages