Module: check_mk
Branch: master
Commit: e117da53156b96fe980f437ba535c2be33f4d8af
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e117da53156b96…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Sep 22 10:49:26 2017 +0200
5310 dell_idrac_virtdisks: Added raid level information
Change-Id: Ie6058a41d71cd8810f821c6ed8f758f95ad5d84e
---
.werks/5310 | 10 ++++++++++
checkman/dell_idrac_virtdisks | 6 +++---
checks/dell_idrac_virtdisks | 16 +++++++++++++++-
3 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/.werks/5310 b/.werks/5310
new file mode 100644
index 0000000..67135e2
--- /dev/null
+++ b/.werks/5310
@@ -0,0 +1,10 @@
+Title: dell_idrac_virtdisks: Added raid level information
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1506070066
+Class: feature
+
+
diff --git a/checkman/dell_idrac_virtdisks b/checkman/dell_idrac_virtdisks
index dc39144..1d1a673 100644
--- a/checkman/dell_idrac_virtdisks
+++ b/checkman/dell_idrac_virtdisks
@@ -4,9 +4,9 @@ catalog: hw/server/dell
license: GPL
distribution: check_mk
description:
- This checks monitors the disk and component status of a Dell iDrac and
- gives information about the number of physical disks which can be lost
- before the$ virtual disk loses its redundancy.
+ This checks monitors the disk, raid level and component status of a
+ Dell iDrac and gives information about the number of physical disks
+ which can be lost before the$ virtual disk loses its redundancy.
The check goes CRIT if the disk fails or is degraded or if the component
reports critical or non-recoverable.
diff --git a/checks/dell_idrac_virtdisks b/checks/dell_idrac_virtdisks
index 39f76f6..dcee4dd 100644
--- a/checks/dell_idrac_virtdisks
+++ b/checks/dell_idrac_virtdisks
@@ -59,9 +59,22 @@ def check_dell_idrac_virtdisks(item, _no_params, info):
"5" : (2, "critical"),
"6" : (2, "non-recoverable"),
},
+ "raidlevel" : {
+ "1" : "none",
+ "2" : "Raid-0",
+ "3" : "Raid-1",
+ "4" : "Raid-5",
+ "5" : "Raid-6",
+ "6" : "Raid-10",
+ "7" : "Raid-50",
+ "8" : "Raid-60",
+ },
+
}
- for name, disk_state, component_state, redundancy in info:
+ for name, disk_state, raid_level, component_state, redundancy in info:
if item == name:
+ yield 0, "Raid level: %s" %
map_states["raidlevel"][raid_level]
+
for what, what_key in [
(disk_state, "Disk"),
(component_state, "Component")]:
@@ -79,6 +92,7 @@ check_info["dell_idrac_virtdisks"] = {
"snmp_info" :
(".1.3.6.1.4.1.674.10892.5.5.1.20.140.1.1", [
"2", # virtualDiskName
"4", # virtualDiskState
+ "13", # virtualDiskRaidLevel
"20", # virtualComponentStatus
"34", # virtualDiskRemainingRedundancy
]),