Module: check_mk
Branch: master
Commit: 1b2f414ac36a5297a72121e92e563f8291c1dc88
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1b2f414ac36a52…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Jul 14 10:47:38 2016 +0200
3556 FIX agent_vsphere.pysphere: The ESX 4.1 compatible agent version no longer validates
the ssl certificate
---
.werks/3556 | 9 +++++++++
ChangeLog | 1 +
agents/special/agent_vsphere.pysphere | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/.werks/3556 b/.werks/3556
new file mode 100644
index 0000000..4651f11
--- /dev/null
+++ b/.werks/3556
@@ -0,0 +1,9 @@
+Title: agent_vsphere.pysphere: The ESX 4.1 compatible agent version no longer validates
the ssl certificate
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i1
+Date: 1468485885
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 11548af..afaaf7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -307,6 +307,7 @@
* 3692 FIX: f5_bigip_conns: fixed empty data handling
* 3707 FIX: oracle_tablespaces: cleanup...
* 3708 FIX: cisco_vpn_tunnel: fixed missing phase 2 data
+ * 3556 FIX: agent_vsphere.pysphere: The ESX 4.1 compatible agent version no longer
validates the ssl certificate
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/agents/special/agent_vsphere.pysphere
b/agents/special/agent_vsphere.pysphere
index 6fb1847..66c1e36 100755
--- a/agents/special/agent_vsphere.pysphere
+++ b/agents/special/agent_vsphere.pysphere
@@ -224,6 +224,10 @@ try:
if opt_debug:
sys.stderr.write("Connecting to %s%s..." % (host_address, port))
sys.stderr.flush()
+
+ # Disable ssl certificate validation
+ import ssl
+ ssl._create_default_https_context = ssl._create_unverified_context
host.connect(host_address+port, user, secret, sock_timeout=opt_timeout)
if opt_debug:
sys.stderr.write("Connected.\n")