Skip to content

Commit

Permalink
Merge pull request zabbix#66 from GIJack/fix_md_raid
Browse files Browse the repository at this point in the history
Fix md raid template
  • Loading branch information
oscar120584 authored Apr 8, 2022
2 parents 69f6c02 + 194f752 commit 2857cb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ zabbix_export:
item_prototypes:
-
uuid: 61bdf950e6c9471c919a9f549b02fa20
name: 'MD $1 degraded'
name: 'MD {#MDNAME} degraded'
key: 'md.degraded[{#MDNAME}]'
delay: 5m
history: '3600'
Expand All @@ -40,7 +40,7 @@ zabbix_export:
priority: HIGH
-
uuid: 34537ac721304c0ea4192777528fba95
name: 'MD $1 raid disks'
name: 'MD {#MDNAME} raid disks'
key: 'md.raid_disks[{#MDNAME}]'
delay: '3600'
history: '3600'
Expand All @@ -58,7 +58,7 @@ zabbix_export:
priority: WARNING
-
uuid: b34710292d384172a02c977d76d00c63
name: 'MD $1 sync action'
name: 'MD {#MDNAME} sync action'
key: 'md.sync_action[{#MDNAME}]'
delay: '300'
history: '3600'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
UserParameter=md.discover,ls /sys/class/block | awk 'BEGIN{printf "{\"data\":["}; /^md[0-9]+$/ {printf c"{\"{#MDNAME}\":\""$1"\"}";c=","}; END{print "]}"}'
UserParameter=md.degraded[*],cat /sys/block/$1/md/degraded
UserParameter=md.sync_action[*],cat /sys/block/$1/md/sync_action
UserParameter=md.raid_disks[*],cat /sys/block/$1/md/raid_disks

0 comments on commit 2857cb4

Please sign in to comment.