Skip to content

Commit

Permalink
extra-alerts: Disable PodMemoryUsageLimit alert for "kube-system" nam…
Browse files Browse the repository at this point in the history
…espace
  • Loading branch information
deponian committed Apr 12, 2024
1 parent f8ddbf5 commit 5a20f38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion charts/extra-alerts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 0.5.0 (29.04.2024)
# 0.6.0 (12.04.2024)
- Disable PodMemoryUsageLimit alert for "kube-system" namespace

# 0.5.0 (09.04.2024)
- Update kube-prometheus-stack to 58.0.0

# 0.4.0 (05.12.2023)
Expand Down
2 changes: 1 addition & 1 deletion charts/extra-alerts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: extra-alerts
description: A Helm chart with some tuned extra PrometheusRules from kube-prometheus-stack chart
appVersion: "58.0.0" # kube-prometheus-stack version
version: 0.5.0
version: 0.6.0
maintainers:
- name: Ilya Cherepanov
email: [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ spec:
description: 'Pod: {{`{{`}} $labels.pod {{`}}`}}, namespace: {{`{{`}} $labels.namespace {{`}}`}} memory usage {{`{{`}} printf "%.2f" $value {{`}}`}}% more than 85% of its limit for 1h'
summary: Pod uses more than 85% of its memory limit.
expr: |-
sum(label_replace(container_memory_working_set_bytes{container!="", namespace=~"{{ $targetNamespace }}"}, "pod", "$1", "pod", "(.*)")) by (pod, namespace)
sum(label_replace(container_memory_working_set_bytes{container!="", namespace!="kube-system", "pod", "$1", "pod", "(.*)")) by (pod, namespace)
/
sum(kube_pod_container_resource_limits{resource="memory", namespace=~"{{ $targetNamespace }}"}) by (pod,namespace) * 100 > 85
sum(kube_pod_container_resource_limits{resource="memory", namespace!="kube-system"}) by (pod,namespace) * 100 > 85
for: 60m
labels:
severity: warning
Expand All @@ -103,9 +103,9 @@ spec:
description: 'Pod: {{`{{`}} $labels.pod {{`}}`}}, namespace: {{`{{`}} $labels.namespace {{`}}`}} memory usage {{`{{`}} printf "%.2f" $value {{`}}`}}% more than 95% of its limit for 5m'
summary: Pod uses more than 95% of its memory limit.
expr: |-
sum(label_replace(container_memory_working_set_bytes{container!="", namespace=~"{{ $targetNamespace }}"}, "pod", "$1", "pod", "(.*)")) by (pod, namespace)
sum(label_replace(container_memory_working_set_bytes{container!="", namespace!="kube-system"}, "pod", "$1", "pod", "(.*)")) by (pod, namespace)
/
sum(kube_pod_container_resource_limits{resource="memory", namespace=~"{{ $targetNamespace }}"}) by (pod,namespace) * 100 > 95
sum(kube_pod_container_resource_limits{resource="memory", namespace!="kube-system"}) by (pod,namespace) * 100 > 95
for: 5m
labels:
severity: warning
Expand Down

0 comments on commit 5a20f38

Please sign in to comment.