Module: check_mk
Branch: master
Commit: 888176bcfcae33c8e037057b6b9dba8a09a650bf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=888176bcfcae33…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Thu Sep 3 10:15:58 2015 +0200
#2565 dell_om_disks now warns if SMART predicts disk failure
---
.werks/2565 | 9 +++++++++
ChangeLog | 1 +
checks/dell_om_disks | 9 ++++++---
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/.werks/2565 b/.werks/2565
new file mode 100644
index 0000000..144587b
--- /dev/null
+++ b/.werks/2565
@@ -0,0 +1,9 @@
+Title: dell_om_disks now warns if SMART predicts disk failure
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1441267878
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index c0bc7c6..f4290cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -71,6 +71,7 @@
* 2425 agent_hp_msa: New special agent to monitor "HP MSA Storage"
devices...
* 2563 ipr400_temp, ipr400_in_voltage: New checks for the Omnitronics IPR400
* 2583 new check datapower_tcp: monitors the number of TCP connections in the various
possible states
+ * 2565 dell_om_disks now warns if SMART predicts disk failure
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
diff --git a/checks/dell_om_disks b/checks/dell_om_disks
index 916fd23..8de635c 100644
--- a/checks/dell_om_disks
+++ b/checks/dell_om_disks
@@ -76,17 +76,20 @@ def check_dell_om_disks(item, _no_params, info):
40 : 'Clear',
}
- for name, dstate, pid, eid, cid, tid, sizeMB, btype, sstate, mt in info:
+ for name, dstate, pid, eid, cid, tid, sizeMB, btype, sstate, smart, mt in info:
ditem = "%s:%s:%s" % ( eid, cid, tid )
if ditem == item:
state = 0
dstate = saveint(dstate)
btype = saveint(btype)
sstate = saveint(sstate)
+ smart = saveint(smart)
mt = saveint(mt)
size = saveint(sizeMB)*1024*1024
msg = ["%s (%s, %s)" % ( name, pid, get_bytes_human_readable(size)
) ]
label = ""
+ if smart == 2:
+ dstate = 34
if dstate in [ 40, 35, 34, 26, 7, 4]:
state = 1
label = "(!)"
@@ -96,7 +99,7 @@ def check_dell_om_disks(item, _no_params, info):
# handle hot spares as OK
if sstate in [ 3, 4 ] and dstate == 1:
- state = 0
+ state = 0
label = ""
msg.append("state %s%s" % ( pdisk_state.get(dstate, 'ukn
(%s)' % dstate ), label))
@@ -128,7 +131,7 @@ check_info["dell_om_disks"] = {
21, # arrayDiskBusType
22, # arrayDiskSpareState
#24, #arrayDiskComponentStatus
- #31, #arrayDiskSmartAlertIndication
+ 31, #arrayDiskSmartAlertIndication
35, # arrayDiskMediaType
]),
"includes" : [ "dell_om.include" ],