Hi All,
I am trying to add an alert rule, which raises an alert when %utilization of container cpu usage is above a certain threshold. Our scrape interval is 1min
Following is expression, i started with:
sum(rate (container_cpu_usage_seconds_total{container=~'.+'}[4m])*100) by (namespace,container,pod) > 80
Here we saw "sum(irate (container_cpu_usage_seconds_total{container=~'.+'}[2m])*100) by (namespace,container,pod) > 80", it is showing values as greater than 100. Below is the snapshot:
(sum(rate(container_cpu_usage_seconds_total{image!="", container!="POD"}[4m])) by (pod, container, namespace) / sum(container_spec_cpu_quota{ image!="", container!="POD"}/container_spec_cpu_period{ image!="", container!="POD"}) by (pod, container,namespace) ) * 100 > 80
Here also we see the values showing greater than 100. Can you please let us know how to get the percentage of cpu utilization per container?
Thanks n Regards,
Chalapathi.