Module: check_mk
Branch: master
Commit: c1660acabb4fd1e6bfe078338c020c9e65f9f302
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c1660acabb4fd1…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Jun 8 13:50:21 2017 +0200
4777 FIX esx_vsphere_sensors: Fixed wrong interpretation of ESX sensor health state
'UNKNOWN'
Change-Id: I4cc350341dfa6cbb86736e271288bb2a6a07dcfe
---
.werks/4777 | 11 +++++++++++
checks/esx_vsphere_sensors | 6 +++---
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/4777 b/.werks/4777
new file mode 100644
index 0000000..82ae709
--- /dev/null
+++ b/.werks/4777
@@ -0,0 +1,11 @@
+Title: esx_vsphere_sensors: Fixed wrong interpretation of ESX sensor health state
'UNKNOWN'
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1496922381
+
+
diff --git a/checks/esx_vsphere_sensors b/checks/esx_vsphere_sensors
index 45a5be8..a071d8f 100644
--- a/checks/esx_vsphere_sensors
+++ b/checks/esx_vsphere_sensors
@@ -48,13 +48,13 @@ def check_esx_vsphere_sensors(_no_item, params, info):
health_key = health_key.lower()
if health_key == "green":
continue # usually not output by agent anyway
- infos.append("%s: %s (%s)" % (name, health_label, health_summary))
+ infos.append("%s: %s (%s)" % (name, health_label, health_summary))
sensor_state = 0
if health_key == "yellow":
sensor_state = 1
elif health_key == "unknown":
- sensor_state = 1
+ sensor_state = 3
else:
sensor_state = 2
@@ -69,7 +69,7 @@ def check_esx_vsphere_sensors(_no_item, params, info):
sensor_state_modified = True
state = max(state, sensor_state)
- infos[-1] += ["", "(!)", "(!!)",
"(!)"][state]
+ infos[-1] += ["", "(!)", "(!!)",
"(?)"][state]
infos[-1] += extra_info
if state > 0 or sensor_state_modified: