Hi all,
I am looking for metric expression for CPU usage of pod in percentage in 
kubernetes. I found following expression from the blog but the result is 
coming in seconds instead of percentage. Kindly suggest how we can get CPU 
utilization in percentage, Thanks

sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", 
image!="", container_name!="POD"}[5m])) by (pod_name, container_name) / 
sum(container_spec_cpu_quota{name!~".*prometheus.*", image!="", 
container_name!="POD"}/container_spec_cpu_period{name!~".*prometheus.*", 
image!="", container_name!="POD"}) by (pod_name, container_name)

-- 
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/e4a2ee92-cb4c-42eb-b1b9-6ad2d83a78a8n%40googlegroups.com.

Reply via email to