Hi,
I'm trying to query my pods metrics by their label instead of the pod name.
I've tried to use the following query:
*sum*
* (max(kube_pod_labels{label_app="query"}) by (label_app, pod)*
* **
* on(pod)*
* group_right(label_app)*
* label_replace(*
* sum by(pod) (*
*
rate(container_cpu_usage_seconds_total{namespace="default"}[1m])*
* ), "pod", "$1", "pod", "(.+)"*
* )*
*) by (label_app)*
The result here was: *0.005788935803884404*
While runng the following query by pod name:
*sum by (pod) (rate(container_cpu_usage_seconds_total{job="kubelet",
pod="query-75576b478c-ckcqk"}[1m]))*
Resulted with: *0.006083688360254887*
Any idea why there's such a difference in the values between the two
queries and how to avoid that?
Thanks in advance
--
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/57733f87-7e24-4f3c-a364-cb67ebdc33c7n%40googlegroups.com.