@@ -216,10 +216,22 @@ local utils = import '../lib/utils.libsonnet';
216216 {
217217 alert: 'CPUThrottlingHigh' ,
218218 expr: |||
219- sum(increase(container_cpu_cfs_throttled_periods_total{container!="", %(cadvisorSelector)s, %(cpuThrottlingSelector)s}[5m])) without (id, metrics_path, name, image, endpoint, job, node)
220- / on (%(clusterLabel)s, %(namespaceLabel)s, pod, container, instance) group_left
221- sum(increase(container_cpu_cfs_periods_total{%(cadvisorSelector)s, %(cpuThrottlingSelector)s}[5m])) without (id, metrics_path, name, image, endpoint, job, node)
222- > ( %(cpuThrottlingPercent)s / 100 )
219+ sum without (id, metrics_path, name, image, endpoint, job, node) (
220+ topk by (%(clusterLabel)s, %(namespaceLabel)s, pod, container, instance) (1,
221+ increase(
222+ container_cpu_cfs_throttled_periods_total{container!="", %(cadvisorSelector)s, %(cpuThrottlingSelector)s}
223+ [5m])
224+ )
225+ )
226+ / on (%(clusterLabel)s, %(namespaceLabel)s, pod, container, instance) group_left
227+ sum without (id, metrics_path, name, image, endpoint, job, node) (
228+ topk by (%(clusterLabel)s, %(namespaceLabel)s, pod, container, instance) (1,
229+ increase(
230+ container_cpu_cfs_periods_total{%(cadvisorSelector)s, %(cpuThrottlingSelector)s}
231+ [5m])
232+ )
233+ )
234+ > ( %(cpuThrottlingPercent)s / 100 )
223235 ||| % $._config,
224236 'for' : '15m' ,
225237 labels: {
0 commit comments