Index: icinga2-2.8.2/doc/09-object-types.md
===================================================================
--- icinga2-2.8.2.orig/doc/09-object-types.md
+++ icinga2-2.8.2/doc/09-object-types.md
@@ -516,6 +516,7 @@ Configuration Attributes:
   username                  | String                | **Optional.** Basic auth username if Elasticsearch is hidden behind an HTTP proxy.
   password                  | String                | **Optional.** Basic auth password if Elasticsearch is hidden behind an HTTP proxy.
   enable\_tls               | Boolean               | **Optional.** Whether to use a TLS stream. Defaults to `false`. Requires an HTTP proxy.
+  insecure\_noverify        | Boolean               | **Optional.** Disable TLS peer verification.
   ca\_path                  | String                | **Optional.** Path to CA certificate to validate the remote host. Requires `enable_tls` set to `true`.
   cert\_path                | String                | **Optional.** Path to host certificate to present to the remote host for mutual verification. Requires `enable_tls` set to `true`.
   key\_path                 | String                | **Optional.** Path to host key to accompany the cert\_path. Requires `enable_tls` set to `true`.
@@ -1061,6 +1062,7 @@ Configuration Attributes:
   username                  | String                | **Optional.** InfluxDB user name. Defaults to `none`.
   password                  | String                | **Optional.** InfluxDB user password.  Defaults to `none`.
   ssl\_enable               | Boolean               | **Optional.** Whether to use a TLS stream. Defaults to `false`.
+  ssl\_insecure\_noverify   | Boolean               | **Optional.** Disable TLS peer verification.
   ssl\_ca\_cert             | String                | **Optional.** Path to CA certificate to validate the remote host.
   ssl\_cert                 | String                | **Optional.** Path to host certificate to present to the remote host for mutual verification.
   ssl\_key                  | String                | **Optional.** Path to host key to accompany the ssl\_cert.
Index: icinga2-2.8.2/lib/perfdata/elasticsearchwriter.cpp
===================================================================
--- icinga2-2.8.2.orig/lib/perfdata/elasticsearchwriter.cpp
+++ icinga2-2.8.2/lib/perfdata/elasticsearchwriter.cpp
@@ -547,6 +547,18 @@ Stream::Ptr ElasticsearchWriter::Connect
 			throw ex;
 		}
 
+		if (!GetInsecureNoverify()) {
+			if (!tlsStream->GetPeerCertificate()) {
+				BOOST_THROW_EXCEPTION(std::runtime_error("Elasticsearch didn't present any TLS certificate."));
+			}
+
+			if (!tlsStream->IsVerifyOK()) {
+				BOOST_THROW_EXCEPTION(std::runtime_error(
+					"TLS certificate validation failed: " + std::string(tlsStream->GetVerifyError())
+				));
+			}
+		}
+
 		return tlsStream;
 	} else {
 		return new NetworkStream(socket);
Index: icinga2-2.8.2/lib/perfdata/elasticsearchwriter.ti
===================================================================
--- icinga2-2.8.2.orig/lib/perfdata/elasticsearchwriter.ti
+++ icinga2-2.8.2/lib/perfdata/elasticsearchwriter.ti
@@ -25,6 +25,9 @@ class ElasticsearchWriter : ConfigObject
 	[config] bool enable_tls {
 		default {{{ return false; }}}
 	};
+	[config] bool insecure_noverify {
+		default {{{ return false; }}}
+	};
 	[config] String ca_path;
 	[config] String cert_path;
 	[config] String key_path;
Index: icinga2-2.8.2/lib/perfdata/influxdbwriter.cpp
===================================================================
--- icinga2-2.8.2.orig/lib/perfdata/influxdbwriter.cpp
+++ icinga2-2.8.2/lib/perfdata/influxdbwriter.cpp
@@ -186,6 +186,18 @@ Stream::Ptr InfluxdbWriter::Connect(void
 			throw ex;
 		}
 
+		if (!GetSslInsecureNoverify()) {
+			if (!tlsStream->GetPeerCertificate()) {
+				BOOST_THROW_EXCEPTION(std::runtime_error("InfluxDB didn't present any TLS certificate."));
+			}
+
+			if (!tlsStream->IsVerifyOK()) {
+				BOOST_THROW_EXCEPTION(std::runtime_error(
+					"TLS certificate validation failed: " + std::string(tlsStream->GetVerifyError())
+				));
+			}
+		}
+
 		return tlsStream;
 	} else {
 		return new NetworkStream(socket);
Index: icinga2-2.8.2/lib/perfdata/influxdbwriter.ti
===================================================================
--- icinga2-2.8.2.orig/lib/perfdata/influxdbwriter.ti
+++ icinga2-2.8.2/lib/perfdata/influxdbwriter.ti
@@ -44,6 +44,9 @@ class InfluxdbWriter : ConfigObject
 	[config] bool ssl_enable {
 		default {{{ return false; }}}
 	};
+	[config] bool ssl_insecure_noverify {
+		default {{{ return false; }}}
+	};
 	[config] String ssl_ca_cert {
 		default {{{ return ""; }}}
 	};
