FEAT(alertmanager): add OOMKilled alert rule

- Add PrometheusRule to alert when containers are OOMKilled
- Severity: warning, fires immediately
This commit is contained in:
2026-01-09 15:09:43 +09:00
parent 539f4be497
commit e3c615b5c1
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: oom-alerts
namespace: prometheus
labels:
app: kube-prometheus-stack
release: prometheus
spec:
groups:
- name: oom.rules
rules:
- alert: KubeContainerOOMKilled
annotations:
description: "Container {{ $labels.container }} in pod {{ $labels.namespace }}/{{ $labels.pod }} was OOMKilled."
summary: "Container was OOMKilled"
expr: |
kube_pod_container_status_last_terminated_reason{reason="OOMKilled"} == 1
for: 0m
labels:
severity: warning