Module: check_mk
Branch: master
Commit: 2380fc15d808433155b2fbc55a5ddf25736178a1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2380fc15d80843…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Apr 30 10:58:52 2014 +0200
FIX dell_om_disks: Handle hotspares more correctly
---
.werks/158 | 8 ++++++++
ChangeLog | 3 ++-
checks/dell_om_disks | 9 +++++----
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/.werks/158 b/.werks/158
new file mode 100644
index 0000000..e4bacde
--- /dev/null
+++ b/.werks/158
@@ -0,0 +1,8 @@
+Title: dell_om_disks: Handle hotspares more correctly
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1398848314
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 1273e28..3da90c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,10 +56,11 @@
* 0810 FIX: fritz.link: Not inventorizing "unconfigured" interfaces
anymore
* 0154 FIX: zfsget: Fixed inventory of filesystems
* 0155 FIX: mssql_counters: harded check agains odd agent output
- * 0157 FIX: apc_symmetra_test: Fixed case of unkown last test date
* 0907 FIX: windows agent: register_service: fixed ImagePath registry entry...
* 0608 FIX: oracle_asm_diskgroup: check now also handles older oracle version 11.1.0
+ * 0157 FIX: apc_symmetra_test: Fixed case of unkown last test date
* 0910 FIX: brocade.power: fixed an error where the check reports an UNKNOWN on power
supply failure...
+ * 0158 FIX: dell_om_disks: Handle hotspares more correctly
Multisite:
* 0779 Hostgroups (Summary): Empty hostgroups are no longer shown (can be re-enabled
by filter)
diff --git a/checks/dell_om_disks b/checks/dell_om_disks
index c7b5727..7bf2349 100644
--- a/checks/dell_om_disks
+++ b/checks/dell_om_disks
@@ -93,14 +93,15 @@ def check_dell_om_disks(item, _no_params, info):
elif dstate not in [ 3 ]:
state = 2
label = "(!!)"
- msg.append("state %s%s" % ( pdisk_state.get(dstate, 'ukn
(%s)' % dstate ), label ))
- msg.append("Bus Type: %s" % bus_type.get(btype,'unk (%s)' %
btype) )
- # handle global hot spares as OK
- if sstate == 3 and dstate == 1:
+ # handle hot spares as OK
+ if sstate in [ 3, 4 ] and dstate == 1:
state = 0
label = ""
+ msg.append("state %s%s" % ( pdisk_state.get(dstate, 'ukn
(%s)' % dstate ),
+ msg.append("Bus Type: %s" % bus_type.get(btype,'unk (%s)' %
btype) )
+
if sstate != 5:
msg.append("Spare State: %s" % spare_state.get(sstate, 'ukn
(%s)' %sstate ))
if mt != 0: