-
Notifications
You must be signed in to change notification settings - Fork 30
/
template_md_6.0.yaml
90 lines (87 loc) · 3.79 KB
/
template_md_6.0.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
zabbix_export:
version: '6.0'
date: '2024-04-22T21:28:36Z'
groups:
- uuid: 7df96b18c230490a9a0a9e2307226338
name: Templates
templates:
- uuid: a8d9676aaeae4719867f3127b90c1497
template: 'Template MD Soft RAID'
name: 'Template MD Soft RAID'
description: 'Monitoring of MD Soft RAID'
groups:
- name: Templates
discovery_rules:
- uuid: bd8ea661ae4b4eff9e93c830771f5b19
name: 'MD Discovery'
key: 'vfs.dir.get[/sys/class/block,^md]'
delay: '3600'
item_prototypes:
- uuid: 61bdf950e6c9471c919a9f549b02fa20
name: 'MD {#MDNAME} degraded'
key: 'vfs.file.contents[/sys/block/{#MDNAME}/md/degraded]'
delay: 5m
history: '3600'
trends: '86400'
description: 'Get number of degraded disks'
tags:
- tag: Application
value: MD
trigger_prototypes:
- uuid: dcec7b366a6b4af9ae54e1d2dd36cf2e
expression: 'last(/Template MD Soft RAID/vfs.file.contents[/sys/block/{#MDNAME}/md/degraded])>0'
name: 'MD {#MDNAME} is degraded on {HOST.NAME}'
priority: HIGH
- uuid: 34537ac721304c0ea4192777528fba95
name: 'MD {#MDNAME} raid disks'
key: 'vfs.file.contents[/sys/block/{#MDNAME}/md/raid_disks]'
delay: '3600'
history: '3600'
trends: '86400'
description: 'Get number of all disks'
tags:
- tag: Application
value: MD
trigger_prototypes:
- uuid: 3fc59fa9c7634edda3a0dccc5c972224
expression: '(last(/Template MD Soft RAID/vfs.file.contents[/sys/block/{#MDNAME}/md/raid_disks],#1)<>last(/Template MD Soft RAID/vfs.file.contents[/sys/block/{#MDNAME}/md/raid_disks],#2))>0'
name: 'MD {#MDNAME} number of disks changed on {HOST.NAME}'
priority: WARNING
- uuid: b34710292d384172a02c977d76d00c63
name: 'MD {#MDNAME} sync action'
key: 'vfs.file.contents[/sys/block/{#MDNAME}/md/sync_action]'
delay: '300'
history: '3600'
trends: '0'
value_type: TEXT
description: 'Get current sync action'
tags:
- tag: Application
value: MD
trigger_prototypes:
- uuid: 149e9a1904314c6ab55a569f0d104ccb
expression: 'find(/Template MD Soft RAID/vfs.file.contents[/sys/block/{#MDNAME}/md/sync_action],,"like","check")=1'
name: 'MD {#MDNAME} in check mode on {HOST.NAME}'
priority: INFO
- uuid: 09ec79b6b5624ddb8f85ac209a672e5a
expression: 'find(/Template MD Soft RAID/vfs.file.contents[/sys/block/{#MDNAME}/md/sync_action],,"like","recover")=1'
name: 'MD {#MDNAME} in recovery mode on {HOST.NAME}'
priority: INFO
graph_prototypes:
- uuid: cbda8d3f566a4c9494e8e5284e69b469
name: 'MD {#MDNAME} degration'
graph_items:
- color: 1A7C11
item:
host: 'Template MD Soft RAID'
key: 'vfs.file.contents[/sys/block/{#MDNAME}/md/degraded]'
preprocessing:
- type: JAVASCRIPT
parameters:
- |
d = JSON.parse(value);
discovery = []
for (dev in d) {
discovery.push({ "{#MDNAME}" : d[dev].basename });
}
return JSON.stringify(discovery);