Fixed return state in case of paths in standby
Message-ID: <53bab1c4.YtRUO7S3dSB4aegm%bk(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: c9a6d767bd6ae502a0f75d8d1f92f94337fc5d93
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c9a6d767bd6ae5…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Jul 7 16:40:36 2014 +0200
FIX esx_vsphere_hostsystem.multipath: Fixed return state in case of paths in standby
Thru a typo, the check used the count of paths in standby as status code. This is fixed
now.
---
.werks/177 | 9 +++++++++
ChangeLog | 1 +
checks/esx_vsphere_hostsystem | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/177 b/.werks/177
new file mode 100644
index 0000000..37599c7
--- /dev/null
+++ b/.werks/177
@@ -0,0 +1,9 @@
+Title: esx_vsphere_hostsystem.multipath: Fixed return state in case of paths in standby
+Level: 1
+Component: checks
+Class: fix
+State: unknown
+Version: 1.2.5i5
+Date: 1404743995
+
+Thru a typo, the check used the count of paths in standby as status code. This is fixed
now.
diff --git a/ChangeLog b/ChangeLog
index ca4fb27..d867d28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,7 @@
* 0626 FIX: veeam_jobs: agent now supports output lines longer than 80 chars
* 1072 FIX: printer_supply: fix colors of Perf-O-Meter on HP OfficeJet...
* 0950 FIX: check_mkevents: now able to resolve the hostname of the remote hosts...
+ * 0177 FIX: esx_vsphere_hostsystem.multipath: Fixed return state in case of paths in
standby...
Multisite:
* 1013 Sort host names naturally, e.g. foobar11 comes after foobar2...
diff --git a/checks/esx_vsphere_hostsystem b/checks/esx_vsphere_hostsystem
index 09c6160..7c556ec 100644
--- a/checks/esx_vsphere_hostsystem
+++ b/checks/esx_vsphere_hostsystem
@@ -255,7 +255,7 @@ def check_esx_vsphere_hostsystem_multipath(item, params, info):
if state_infos["standby"][1] > 0 and \
state_infos["standby"][1] !=
state_infos["active"][1]:
standby_label = "(!)"
- state = max(state_infos["standby"][1], state)
+ state = max(state_infos["standby"][0], state)
else:
state = 0
for state_name, state_values in state_infos.items():