sum(sum(kube_pod_info{cluster_id="$region",node=~"$node"} * on(pod, namespace) group_right(node) kube_pod_status_phase{cluster_id="$region"}) by (node,phase)) by (phase)
sum(kube_pod_status_phase{cluster_id="$region"} * on (namespace,pod) group_left(node) kube_pod_info{cluster_id="$region",node=~"$node"}) by (node,phase)
--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/aede4847-2944-42b1-bbb9-fa1aeffdeed2%40googlegroups.com.
max(count(kube_pod_info{cluster_id="$region",node=~"$node"}) * on(pod,namespace) group_left(phase) kube_pod_status_phase{cluster_id="$region"}) by (phase)
The second query looks right (and works if I plug it into my Prometheus) – I don't know what Grafana is doing with it though. I would recommend solving one problem at a time; does the query work as you expect when you use the built in Prometheus query UI? If so, it is a problem with the panel configuration. If not, you can tweak it there, then come back to the panel once you have the underlying data in shape./MR
On Tue, Jun 2, 2020 at 10:35 PM Poussier William <william...@gmail.com> wrote:
--I have simplified the query to the following:
sum(kube_pod_status_phase{cluster_id="$region"} * on (namespace,pod) group_left(node) kube_pod_info{cluster_id="$region",node=~"$node"}) by (node,phase)
Still facing the same issue, there is two series in the return.Grafana is displaying the following as table:
The values of the kube_pod_info series here are actually representing the right data value per node for the "Running" phase.
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 promethe...@googlegroups.com.