forked from zabbix/community-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applied MD RAID fixes from 6.0 to 5.0 and 5.4
- Loading branch information
Showing
4 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
Server_Hardware/Other/template_md_raid/5.0/template_md_raid.xml
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<zabbix_export><version>5.0</version><date>2021-11-25T12:36:13Z</date><groups><group><name>Templates</name></group></groups><templates><template><template>MD Soft RAID</template><name>MD Soft RAID</name><groups><group><name>Templates</name></group></groups><applications><application><name>MD</name></application></applications><discovery_rules><discovery_rule><name>MD Discovery</name><key>md.discover</key><delay>3600</delay><item_prototypes><item_prototype><name>MD $1 degraded</name><key>md.degraded[{#MDNAME}]</key><delay>5m</delay><history>3600</history><trends>86400</trends><description>Get number of degraded disks</description><applications><application><name>MD</name></application></applications><trigger_prototypes><trigger_prototype><expression>{last()}>0</expression><name>MD {#MDNAME} is degraded on {HOST.NAME}</name><priority>HIGH</priority></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><name>MD $1 raid disks</name><key>md.raid_disks[{#MDNAME}]</key><delay>3600</delay><history>3600</history><trends>86400</trends><description>Get number of all disks</description><applications><application><name>MD</name></application></applications><trigger_prototypes><trigger_prototype><expression>{diff()}>0</expression><name>MD {#MDNAME} number of disks changed on {HOST.NAME}</name><priority>WARNING</priority></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><name>MD $1 sync action</name><key>md.sync_action[{#MDNAME}]</key><delay>300</delay><history>3600</history><trends>0</trends><value_type>TEXT</value_type><description>Get current sync action</description><applications><application><name>MD</name></application></applications><trigger_prototypes><trigger_prototype><expression>{str(recover)}=1</expression><name>MD {#MDNAME} in recovery mode on {HOST.NAME}</name><priority>INFO</priority></trigger_prototype></trigger_prototypes></item_prototype></item_prototypes><graph_prototypes><graph_prototype><name>MD {#MDNAME} degration</name><graph_items><graph_item><color>1A7C11</color><item><host>MD Soft RAID</host><key>md.degraded[{#MDNAME}]</key></item></graph_item></graph_items></graph_prototype></graph_prototypes></discovery_rule></discovery_rules></template></templates></zabbix_export> | ||
<zabbix_export><version>5.0</version><date>2021-11-25T12:36:13Z</date><groups><group><name>Templates</name></group></groups><templates><template><template>MD Soft RAID</template><name>MD Soft RAID</name><groups><group><name>Templates</name></group></groups><applications><application><name>MD</name></application></applications><discovery_rules><discovery_rule><name>MD Discovery</name><key>md.discover</key><delay>3600</delay><item_prototypes><item_prototype><name>MD {#MDNAME} degraded</name><key>md.degraded[{#MDNAME}]</key><delay>5m</delay><history>3600</history><trends>86400</trends><description>Get number of degraded disks</description><applications><application><name>MD</name></application></applications><trigger_prototypes><trigger_prototype><expression>{last()}>0</expression><name>MD {#MDNAME} is degraded on {HOST.NAME}</name><priority>HIGH</priority></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><name>MD {#MDNAME} raid disks</name><key>md.raid_disks[{#MDNAME}]</key><delay>3600</delay><history>3600</history><trends>86400</trends><description>Get number of all disks</description><applications><application><name>MD</name></application></applications><trigger_prototypes><trigger_prototype><expression>{diff()}>0</expression><name>MD {#MDNAME} number of disks changed on {HOST.NAME}</name><priority>WARNING</priority></trigger_prototype></trigger_prototypes></item_prototype><item_prototype><name>MD {#MDNAME} sync action</name><key>md.sync_action[{#MDNAME}]</key><delay>300</delay><history>3600</history><trends>0</trends><value_type>TEXT</value_type><description>Get current sync action</description><applications><application><name>MD</name></application></applications><trigger_prototypes><trigger_prototype><expression>{str(recover)}=1</expression><name>MD {#MDNAME} in recovery mode on {HOST.NAME}</name><priority>INFO</priority></trigger_prototype></trigger_prototypes></item_prototype></item_prototypes><graph_prototypes><graph_prototype><name>MD {#MDNAME} degration</name><graph_items><graph_item><color>1A7C11</color><item><host>MD Soft RAID</host><key>md.degraded[{#MDNAME}]</key></item></graph_item></graph_items></graph_prototype></graph_prototypes></discovery_rule></discovery_rules></template></templates></zabbix_export> |
5 changes: 5 additions & 0 deletions
5
Server_Hardware/Other/template_md_raid/5.0/userparameter_md.conf
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,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 | ||
|
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
5 changes: 5 additions & 0 deletions
5
Server_Hardware/Other/template_md_raid/5.4/userparameter_md.conf
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,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 | ||
|