Hi all, I need to write a promql query which scrapes cpu load from all pods within a cluster for grafana. it should generate an alert once the cpu percentage is greater than 70%

hi all, I need to write a promql query which scrapes cpu load from all pods within a cluster for grafana. it should generate an alert once the cpu percentage is greater than 70%. Can someone help me with this ?

I tried this is there any better way we can optimize the same?

any new queries from ur side is also much appreciated :slight_smile:
sum by (pod) (irate(container_cpu_usage_seconds_total{container!=“POD”}[5m])) / sum(kube_pod_container_resource_limits{resource=“cpu”})