Hi Carlos,
On 4/12/20 4:06 AM, Carlos Mercado wrote:
> What I was trying is first to get all the pods running in the cluster
> with query:
>
> sum by (pod) (kube_pod_info)
>
> Then I am getting the list of pods with limits set:
>
> sum by (pod)(kube_pod_container_resource_limits{resource="cpu"})
>
> Is there a way to compare these two results and get the list of pods
> with no limits?
This should be possible with the "unless" operator:
sum by (pod) (kube_pod_info) unless sum by (pod)
(kube_pod_container_resource_limits{resource="cpu"})
Note: If you add more labels to one of the sides, you will need an
additional on(pod) clause after "unless".
Kind regards,
Christian
--
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/2714b67a-eda3-19c1-da10-dd5189b24ef0%40hoffmann-christian.info.