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:
[image: image.png]
Later after referring to the below ticket:
https://github.com/google/cadvisor/issues/2026, changed the expression to
the below:
*(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.
--
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/CABXnQPvDNC-pR%2BiMZMTa9tUv7BPA8OQhcttkiUYe%2BBfEqua7CQ%40mail.gmail.com.