Skip to content

Commit

Permalink
Move individual alerts under group
Browse files Browse the repository at this point in the history
  • Loading branch information
sed-i committed Oct 29, 2024
1 parent 2790c84 commit b642c34
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
19 changes: 11 additions & 8 deletions src/prometheus_alert_rules/high_cpu_iowait.rule
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
alert: HostCpuHighIowait
expr: avg by (instance) (rate(node_cpu_seconds_total{mode="iowait"}[5m])) * 100 > 10
for: 0m
labels:
severity: warning
annotations:
summary: Host CPU high iowait (instance {{ $labels.instance }})
description: "CPU iowait > 10%. A high iowait means that you are disk or network bound.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
groups:
- name: HostCpu
rules:
- alert: HostCpuHighIowait
expr: avg by (instance) (rate(node_cpu_seconds_total{mode="iowait"}[5m])) * 100 > 10
for: 0m
labels:
severity: warning
annotations:
summary: Host CPU high iowait (instance {{ $labels.instance }})
description: "CPU iowait > 10%. A high iowait means that you are disk or network bound.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
19 changes: 11 additions & 8 deletions src/prometheus_alert_rules/oomkill.rule
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
alert: HostOomKillDetected
expr: increase(node_vmstat_oom_kill[1h]) > 0
for: 0m
labels:
severity: warning
annotations:
summary: Host OOM kill detected (instance {{ $labels.instance }})
description: "OOM kill detected\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
groups:
- name: HostMemory
rules:
- alert: HostOomKillDetected
expr: increase(node_vmstat_oom_kill[1h]) > 0
for: 0m
labels:
severity: warning
annotations:
summary: Host OOM kill detected (instance {{ $labels.instance }})
description: "OOM kill detected\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"

0 comments on commit b642c34

Please sign in to comment.