Module: check_mk
Branch: master
Commit: 2734981f46ee4533ad9eb5305aac245d0cd569e9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2734981f46ee45…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Wed Apr 25 12:04:47 2018 +0200
5757 FIX esx_vsphere_sensors: ignore 'Unknown' sensors
Previously, sensors where only ignored by the check esx_vsphere_sensors
if the special agent delivered 'unknown'. Now, also the status 'Unknown'
is ignored which is delivered by some systems.
Change-Id: I382a295e4ed49af7faef419173688d52d79eeeb6
---
.werks/5757 | 12 ++++++++++++
agents/special/agent_vsphere | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/5757 b/.werks/5757
new file mode 100644
index 0000000..967ca6e
--- /dev/null
+++ b/.werks/5757
@@ -0,0 +1,12 @@
+Title: esx_vsphere_sensors: ignore 'Unknown' sensors
+Level: 1
+Component: checks
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1524650419
+Class: fix
+
+Previously, sensors where only ignored by the check esx_vsphere_sensors
+if the special agent delivered 'unknown'. Now, also the status 'Unknown'
+is ignored which is delivered by some systems.
diff --git a/agents/special/agent_vsphere b/agents/special/agent_vsphere
index ca5d0d3..7ceffae 100755
--- a/agents/special/agent_vsphere
+++ b/agents/special/agent_vsphere
@@ -1506,7 +1506,7 @@ if not error:
output("<<<esx_vsphere_sensors:sep(59)>>>")
for key in sorted(hostsystems_sensors[hostname].keys()):
data = hostsystems_sensors[hostname][key]
- if data["key"] in ["green",
"unknown", "Green"]:
+ if data["key"].lower() in ["green",
"unknown"]:
continue
output('%s;%s;%s;%s;%s;%s;%s;%s;%s' % (
data["name"].replace(";",
"_"),