Module: check_mk
Branch: master
Commit: 44cf19c81394be4a3c381a41b464670ec9af027e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44cf19c81394be…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Fri Nov 4 11:45:14 2016 +0100
3952 FIX diskstat: fixed bug if multipath devices having an alias
Previously detectiong of multipath devices has only been working if there is no alias for
these devices. This Bug is now fixed.
---
.werks/3952 | 9 +++++++++
ChangeLog | 1 +
checks/diskstat | 8 +++++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.werks/3952 b/.werks/3952
new file mode 100644
index 0000000..503870a
--- /dev/null
+++ b/.werks/3952
@@ -0,0 +1,9 @@
+Title: diskstat: fixed bug if multipath devices having an alias
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i2
+Date: 1478255992
+Class: fix
+
+Previously detectiong of multipath devices has only been working if there is no alias for
these devices. This Bug is now fixed.
diff --git a/ChangeLog b/ChangeLog
index 39a5f8d..c203be1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -47,6 +47,7 @@
* 3741 FIX: omd_status: Fix labelling and structure of several metric graphs
* 3986 FIX: esx_vsphere_counters.uptime: fixed incorrect alert when receiving
corrupted counter data...
* 3987 FIX: Check_MK Agent Access: Windows agent reported incorrect only from value
+ * 3952 FIX: diskstat: fixed bug if multipath devices having an alias...
Multisite:
* 3959 Two new filters for the comment view: author and comment text field
diff --git a/checks/diskstat b/checks/diskstat
index 981e358..b2681d2 100644
--- a/checks/diskstat
+++ b/checks/diskstat
@@ -304,7 +304,8 @@ def diskstat_convert_info(parsed):
# with multipath names like "SDataCoreSANsymphony_DAT07-fscl"
if multipath_info:
for uuid, multipath in multipath_info.items():
- if multipath["device"] in converted_disks:
+ if multipath["device"] in converted_disks or \
+ "DM %s" % multipath["alias"] in converted_disks:
for path in multipath["paths"]:
if path in converted_disks:
del converted_disks[path]
@@ -313,6 +314,11 @@ def diskstat_convert_info(parsed):
converted_disks[uuid] = converted_disks[multipath["device"]]
del converted_disks[multipath["device"]]
+ if "DM %s" % multipath["alias"] in converted_disks:
+ alias = "DM %s" % multipath["alias"]
+ converted_disks[uuid] = converted_disks[alias]
+ del converted_disks[alias]
+
# Remove any left-over device mapper devices that are not part of a
# known multipath device, LVM device or whatever
for device in converted_disks.keys():