-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add alert rules based on mdadm metrics (#208)
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
groups: | ||
- name: mdadm | ||
rules: | ||
- alert: RaidDisksFailed | ||
expr: node_md_disks{state="failed"} > 0 | ||
for: 0m | ||
labels: | ||
severity: critical | ||
annotations: | ||
summary: "{{ $value }} disks failed on device {{ $labels.device }}.(instance {{ $labels.instance }})" | ||
description: >- | ||
Disks failed on raid device {{ $labels.device }}. | ||
VALUE = {{ $value }} | ||
LABELS = {{ $labels }} | ||
|
||
- alert: RaidDisksSpare | ||
expr: node_md_disks{state="spare"} > 0 | ||
for: 0m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: "{{ $value }} disks marked as spare on device {{ $labels.device }}.(instance {{ $labels.instance }})" | ||
description: >- | ||
Disks marked as spare on raid device {{ $labels.device }}. | ||
VALUE = {{ $value }} | ||
LABELS = {{ $labels }} | ||
|
||
- alert: RaidDeviceInactive | ||
expr: node_md_state{state="inactive"} > 0 | ||
for: 0m | ||
labels: | ||
severity: critical | ||
annotations: | ||
summary: RAID device {{ $labels.device }} in inactive state.(instance {{ $labels.instance }}) | ||
description: >- | ||
RAID device {{ $labels.device }} in inactive state. | ||
VALUE = {{ $value }} | ||
LABELS = {{ $labels }} | ||
|
||
- alert: RaidDeviceRecovering | ||
expr: node_md_state{state="recovering"} > 0 | ||
for: 0m | ||
labels: | ||
severity: warning | ||
annotations: | ||
summary: RAID device {{ $labels.device }} in recovering state.(instance {{ $labels.instance }}) | ||
description: >- | ||
RAID device {{ $labels.device }} in recovering state. | ||
VALUE = {{ $value }} | ||
LABELS = {{ $labels }} |