Module: check_mk
Branch: master
Commit: b26288c96850f6f1f3580ccb87d40578546ee8d1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b26288c96850f6…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Thu Dec 3 13:37:21 2015 +0100
#1309 FIX multipath: Fixed name handling of multipaths
Old Versions of Check_MK added in some cases a whitespace at the end of the path name.
This has been fixed a while ago, but lead to the problem that the multipath check not
longer
detected this paths. Now the check can handle again the old names. This means you can make
an update
without to get an error, but you should do a rediscovery betimes to clean the thinks in
the background (autochecks) up.
Please note that the Check_MK Discovery Service will detect the multipath devices again
and it looks like they have the same name,
so do not wonder. It's cause of the autochecks.
---
.werks/1309 | 16 ++++++++++++++++
ChangeLog | 4 +++-
checks/multipath | 6 ++++--
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/.werks/1309 b/.werks/1309
new file mode 100644
index 0000000..89ffbec
--- /dev/null
+++ b/.werks/1309
@@ -0,0 +1,16 @@
+Title: multipath: Fixed name handling of multipaths
+Level: 1
+Component: checks
+Compatible: incomp
+Version: 1.2.7i4
+Date: 1449145724
+Class: fix
+
+Old Versions of Check_MK added in some cases a whitespace at the end of the path name.
+This has been fixed a while ago, but lead to the problem that the multipath check not
longer
+detected this paths. Now the check can handle again the old names. This means you can
make an update
+without to get an error, but you should do a rediscovery betimes to clean the thinks in
the background (autochecks) up.
+
+Please note that the Check_MK Discovery Service will detect the multipath devices again
and it looks like they have the same name,
+so do not wonder. It's cause of the autochecks.
+
diff --git a/ChangeLog b/ChangeLog
index 5128363..7da5580 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,8 +52,8 @@
* 2803 netapp_api_volumes: clustered volumes now longer show the current node name in
the service description...
NOTE: Please refer to the migration notes!
* 2780 cisco_vss: detect this check on newer (15.1) devices
- * 2866 ewon: Added support for monitoring Wagner OxyReduct devices with their data
exposed through an ewon router...
* 2874 netstat_an.bat: Restrict output of connections to TCP, safes performance
+ * 2866 ewon: Added support for monitoring Wagner OxyReduct devices with their data
exposed through an ewon router...
* 2660 FIX: fixed windows agent using the wrong working directory...
* 2664 FIX: ps: Speedup in situation with many matching processes...
* 2661 FIX: windows agent: fixed incomplete process list...
@@ -133,6 +133,8 @@
* 2876 FIX: mk_logwatch: Avoid parsing lines that are currently being written by
application...
* 2806 FIX: oracle_rman: introduced missing WATO, allows configuration of backup age
* 2883 FIX: default.php template: fixed id_string while creating default template,
e.g. for custom checks
+ * 1309 FIX: multipath: Fixed name handling of multipaths...
+ NOTE: Please refer to the migration notes!
Multisite:
* 2684 Added icons for downloading agent data / walks of hosts...
diff --git a/checks/multipath b/checks/multipath
index 6ddd4be..7e2a24e 100644
--- a/checks/multipath
+++ b/checks/multipath
@@ -283,8 +283,10 @@ def inventory_multipath(parsed):
def check_multipath(item, target_numpaths, parsed):
# Keys in parsed are the UUIDs. First assume that we are
# looking for a UUID. Then fall back to aliases
- if item in parsed:
- mmap = parsed[item]
+ # item.rstrip(): Check_MK Versions < 1.2.8 created autochecks with a whitespace
+ # at the end of the item. With this fix we prevent serval hundreds of UKN after
Update.
+ if item.rstrip() in parsed:
+ mmap = parsed[item.rstrip()]
else:
for mmap in parsed.values():
if mmap.get("alias") == item: