From 95547a648f9ae7f9057d11455239ce44c9272131 Mon Sep 17 00:00:00 2001 From: Stephen Lang Date: Thu, 7 Nov 2024 20:00:08 +0000 Subject: [PATCH 1/3] fix: lint failure on CPUThrottlingHigh alert --- alerts/resource_alerts.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerts/resource_alerts.libsonnet b/alerts/resource_alerts.libsonnet index a8a355f76..07ffa990a 100644 --- a/alerts/resource_alerts.libsonnet +++ b/alerts/resource_alerts.libsonnet @@ -200,7 +200,7 @@ alert: 'CPUThrottlingHigh', expr: ||| sum(increase(container_cpu_cfs_throttled_periods_total{container!="", %(cadvisorSelector)s, %(cpuThrottlingSelector)s}[5m])) without (id, metrics_path, name, image, endpoint, job, node) - / + / on (%(clusterLabel)s, %(namespaceLabel)s, pod, container) group_left sum(increase(container_cpu_cfs_periods_total{%(cadvisorSelector)s, %(cpuThrottlingSelector)s}[5m])) without (id, metrics_path, name, image, endpoint, job, node) > ( %(cpuThrottlingPercent)s / 100 ) ||| % $._config, From 78c5bba40fc05e30e03a410146990717ac91efac Mon Sep 17 00:00:00 2001 From: Stephen Lang Date: Fri, 14 Mar 2025 14:53:31 +0000 Subject: [PATCH 2/3] build: re-enable disabled pint check --- .pint.hcl | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .pint.hcl diff --git a/.pint.hcl b/.pint.hcl deleted file mode 100644 index 4a3b44785..000000000 --- a/.pint.hcl +++ /dev/null @@ -1,3 +0,0 @@ -checks { - disabled = ["promql/fragile"] -} From 44f53f41be5672f12c3e2dd3a28eec78dc927451 Mon Sep 17 00:00:00 2001 From: Stephen Lang Date: Fri, 14 Mar 2025 15:04:27 +0000 Subject: [PATCH 3/3] fix(alerts): add instance label to join --- alerts/resource_alerts.libsonnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerts/resource_alerts.libsonnet b/alerts/resource_alerts.libsonnet index a3f1ac2f2..ca98454b2 100644 --- a/alerts/resource_alerts.libsonnet +++ b/alerts/resource_alerts.libsonnet @@ -208,7 +208,7 @@ local utils = import '../lib/utils.libsonnet'; alert: 'CPUThrottlingHigh', expr: ||| sum(increase(container_cpu_cfs_throttled_periods_total{container!="", %(cadvisorSelector)s, %(cpuThrottlingSelector)s}[5m])) without (id, metrics_path, name, image, endpoint, job, node) - / on (%(clusterLabel)s, %(namespaceLabel)s, pod, container) group_left + / on (%(clusterLabel)s, %(namespaceLabel)s, pod, container, instance) group_left sum(increase(container_cpu_cfs_periods_total{%(cadvisorSelector)s, %(cpuThrottlingSelector)s}[5m])) without (id, metrics_path, name, image, endpoint, job, node) > ( %(cpuThrottlingPercent)s / 100 ) ||| % $._config,