Skip to content

Commit

Permalink
Add OOMKiller Alert
Browse files Browse the repository at this point in the history
Linux has been tracking OOMKiller stats in /proc/vmstat since Kernel 2.6.36.
node_exporter also provides this statistic as part of standard exposed
metrics.

If a host hits an OOM state, it's likely that an alert should be
generated, so that it could be reviewed for hardware or system resource
faults.
  • Loading branch information
tomswartz07 committed Jan 3, 2024
1 parent e5d8197 commit 1965cc3
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,16 @@ groups:
annotations:
description: 'Memory available for target {{ $labels.job }} is at {{ $value }}%'

- alert: OOMKiller
expr: changes(node_vmstat_oom_kill[5m]) != 0
for: 1m
labels:
service: system
severity: warning
severity_num: 200
annotations:
description: 'Out of Memory Killer has triggered on {{ $labels.job }}'

- alert: SwapUsage
expr: (100 - (100 * (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes))) > 60
for: 1m
Expand Down

0 comments on commit 1965cc3

Please sign in to comment.