-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmart.yaml
42 lines (42 loc) · 2.1 KB
/
smart.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
groups:
- name: smart
rules:
- alert: ReallocatedEventCount
annotations:
message: "{{ $labels.device }} {{ $labels.instance }}磁盘坏道归一值小于阈值"
summary: ReallocatedEventCount Blow The Threshold.
expr: |
sum (smartctl_device_attribute{attribute_name="Reallocated_Event_Count",attribute_value_type='value'} ) by(instance,device)
- sum (smartctl_device_attribute{attribute_name="Reallocated_Event_Count",attribute_value_type='thresh'}) by(instance,device) <0
for: 10m
labels:
severity: CRITICAL
- alert: ReallocatedEventCount
annotations:
message: "{{ $labels.device }} {{ $labels.instance }}磁盘坏道大于10 "
summary: ReallocatedEventCount Blow The Threshold.
expr: |
sum (smartctl_device_attribute{attribute_name="Reallocated_Event_Count",attribute_value_type='raw'} ) by(instance,device) > 10
for: 10m
labels:
severity: WARNING
- alert: TemperatureHigh
annotations:
message: "{{ $labels.device }} {{ $labels.instance }}磁盘温度归一值的小于阈值"
summary: Temperature_Celsius Blow The Threshold.
expr: |
sum (smartctl_device_attribute{attribute_name="Temperature_Celsius",attribute_value_type='value'} ) by(instance,device)
- sum (smartctl_device_attribute{attribute_name="Temperature_Celsius",attribute_value_type='thresh'}) by(instance,device) <0
for: 10m
labels:
severity: CRITICAL
- alert: AvailableReservedSpace
annotations:
message: "{{ $labels.device }} {{ $labels.instance }}预留的磁盘空间小于阈值."
summary: Available Reserved Space Is Not Enough.
expr: |
sum (smartctl_device_attribute{attribute_name="Available_Reservd_Space",attribute_value_type='value'} ) by(instance,device)
- sum (smartctl_device_attribute{attribute_name="Available_Reservd_Space",attribute_value_type='thresh'}) by(instance,device)
for: 10m
labels:
severity: CRITICAL