File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,24 @@ groups:
24
24
summary: "Prometheus exporter at {{ $labels.instance }} reports low memory"
25
25
description: "Available memory is {{ $value }} GiB."
26
26
27
+ - alert: LowSwapSpace
28
+ expr: (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes) < {% endraw %}{{ alertmanager_node_free_swap_warning_threshold_ratio }}{% raw %}
29
+ for: 1m
30
+ labels:
31
+ severity: warning
32
+ annotations:
33
+ summary: "Swap space at {{ $labels.instance }} reports low memory"
34
+ description: "Available swap space is {{ $value | humanizePercentage }}. Running out of swap space causes OOM Kills."
35
+
36
+ - alert: LowSwapSpace
37
+ expr: (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes) < {% endraw %}{{ alertmanager_node_free_swap_critical_threshold_ratio }}{% raw %}
38
+ for: 1m
39
+ labels:
40
+ severity: critical
41
+ annotations:
42
+ summary: "Swap space at {{ $labels.instance }} reports low memory"
43
+ description: "Available swap space is {{ $value | humanizePercentage }}. Running out of swap space causes OOM Kills."
44
+
27
45
- alert: HostOomKillDetected
28
46
expr: increase(node_vmstat_oom_kill[5m]) > 0
29
47
for: 5m
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ alertmanager_low_memory_threshold_gib: 5
12
12
# link. Change to false to disable this alert.
13
13
alertmanager_warn_network_bond_single_link : true
14
14
15
+ # Threshold to trigger an LowSwapSpace alert on swap space depletion (ratio).
16
+ # When the ratio of free swap space is lower than each of these values, warning
17
+ # and critical alerts will be triggered respectively.
18
+ alertmanager_node_free_swap_warning_threshold_ratio : 0.25
19
+ alertmanager_node_free_swap_critical_threshold_ratio : 0.1
20
+
15
21
# ##############################################################################
16
22
# Exporter configuration
17
23
You can’t perform that action at this time.
0 commit comments