Skip to content

Commit 5571f48

Browse files
committed
ROX-33228: Disable CPUThrottlingHigh alerts for config-reloader
1 parent 411a535 commit 5571f48

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

resources/mixins/kubernetes/generated/alerts.yml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/mixins/kubernetes/mixin.libsonnet

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,26 @@ kubernetes {
4949
group.rules
5050
),
5151
}
52+
else if group.name == 'kubernetes-resources' then
53+
group {
54+
rules: std.map(
55+
function(rule)
56+
if rule.alert == 'CPUThrottlingHigh' then
57+
rule {
58+
// Exclude config-reloader in rhacs-observability namespace from false positive CPU throttling alerts.
59+
expr: |||
60+
sum(increase(container_cpu_cfs_throttled_periods_total{container!="", %(cpuThrottlingSelector)s}[5m])) by (%(clusterLabel)s, container, pod, namespace)
61+
/
62+
sum(increase(container_cpu_cfs_periods_total{%(cpuThrottlingSelector)s}[5m])) by (%(clusterLabel)s, container, pod, namespace)
63+
> ( %(cpuThrottlingPercent)s / 100 )
64+
unless on(%(clusterLabel)s, container, pod, namespace) container_cpu_cfs_throttled_periods_total{namespace="rhacs-observability", container="config-reloader"}
65+
||| % $._config,
66+
}
67+
else
68+
rule,
69+
group.rules
70+
),
71+
}
5272
else if group.name == 'kubernetes-system-kubelet' then
5373
group {
5474
rules: std.filter(

resources/prometheus/generated/kubernetes-mixin-alerts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ spec:
375375
/
376376
sum(increase(container_cpu_cfs_periods_total{namespace!~"openshift-.*"}[5m])) by (cluster, container, pod, namespace)
377377
> ( 25 / 100 )
378+
unless on(cluster, container, pod, namespace) container_cpu_cfs_throttled_periods_total{namespace="rhacs-observability", container="config-reloader"}
378379
"for": "15m"
379380
"labels":
380381
"severity": "info"

0 commit comments

Comments
 (0)