Module: check_mk
Branch: master
Commit: a9ff9b08608cb20d34695de1be694595d3c471b8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a9ff9b08608cb2…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Dec 2 15:55:38 2015 +0100
#2858 FIX hp_proliant_da_phydrv: Adding disk controller to check items
Older checks were not taking the controller number into account which
was resulting in missing service checks for some disks. We have now
added the controller id to the check item to fix this issue.
You will have to rediscover the affected hosts and eventually update
related rules like disabled services or similar since the service
description is now changed, for example from "HW Phydrv 0" to "HW Phydrv
0/0".
---
.werks/2858 | 15 +++++++++++++++
ChangeLog | 2 ++
checks/hp_proliant_da_phydrv | 17 ++++++++++-------
3 files changed, 27 insertions(+), 7 deletions(-)
diff --git a/.werks/2858 b/.werks/2858
new file mode 100644
index 0000000..f92c27a
--- /dev/null
+++ b/.werks/2858
@@ -0,0 +1,15 @@
+Title: hp_proliant_da_phydrv: Adding disk controller to check items
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i4
+Date: 1449067943
+Class: fix
+
+Older checks were not taking the controller number into account which
+was resulting in missing service checks for some disks. We have now
+added the controller id to the check item to fix this issue.
+
+You will have to rediscover the affected hosts and eventually update
+related rules like disabled services or similar since the service
+description is now changed, for example from "HW Phydrv 0" to "HW Phydrv
0/0".
diff --git a/ChangeLog b/ChangeLog
index 3b4d145..13e90bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -126,6 +126,8 @@
* 2856 FIX: winperf_phydisk: Not discovering on clusters where disk perfcounters are
missing...
* 2875 FIX: citrix_farm.ps1: Add missing end marker of piggy data - fixes problem in
subsequent plugins
* 2857 FIX: fritz.conn: Handling missing connection state infos as UNKNOWN
+ * 2858 FIX: hp_proliant_da_phydrv: Adding disk controller to check items...
+ NOTE: Please refer to the migration notes!
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/hp_proliant_da_phydrv b/checks/hp_proliant_da_phydrv
index 5de5f0e..127ffbb 100644
--- a/checks/hp_proliant_da_phydrv
+++ b/checks/hp_proliant_da_phydrv
@@ -24,9 +24,12 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-# Author: Lars Michelsen <lm(a)mathias-kettner.de>
-
-hp_proliant_da_phydrv_condition_status2nagios = { 'other': 3, 'ok': 0,
'degraded': 2, 'failed': 2 }
+hp_proliant_da_phydrv_condition_status2nagios = {
+ 'other' : 3,
+ 'ok' : 0,
+ 'degraded' : 2,
+ 'failed' : 2,
+}
hp_proliant_da_phydrv_condition = {
0: 'n/a',
1: 'other',
@@ -52,12 +55,12 @@ hp_proliant_da_phydrv_smart_status = {
}
def inventory_hp_proliant_da_phydrv(info):
- if len(info) > 0:
- return [ (line[1], None) for line in info ]
+ return [ (line[0]+'/'+line[1], None) for line in info ]
-def check_hp_proliant_da_phydrv(item, params, info):
+def check_hp_proliant_da_phydrv(item, _no_params, info):
for line in info:
- if line[1] == item:
+ # First condition is for legacy discovered services
+ if line[1] == item or (line[0]+'/'+line[1]) == item:
cntlr_index, index, bay, status, ref_hours, size, condition, bus_number,
smart_status = line
snmp_status = hp_proliant_da_phydrv_status[int(status)]