From 9c3257e1588a2e1d10cac8c2e5af098cbb690a3e Mon Sep 17 00:00:00 2001 From: Chris Earle Date: Fri, 9 Feb 2018 15:53:27 -0500 Subject: [PATCH] [Monitoring] Register affixed Header Setting (elastic/x-pack-elasticsearch#3893) This adds the `HEADERS_SETTING` as setting reported by the Monitoring plugin, which was changed in 6.2. It also adds an IT to ensure that it is not missed in the future (existing integration tests were passing in the Settings and not being validated by the cluster!). Original commit: elastic/x-pack-elasticsearch@d6f0b4b50381db75495ce8b626ccedd7d99dca52 --- .../xpack/monitoring/exporter/http/HttpExporter.java | 2 +- .../xpack/monitoring/exporter/http/HttpExporterIT.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java index 42f29a83a81..2b846ca20c1 100644 --- a/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java +++ b/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporter.java @@ -671,6 +671,6 @@ public class HttpExporter extends Exporter { public static List> getSettings() { return Arrays.asList(HOST_SETTING, TEMPLATE_CREATE_LEGACY_VERSIONS_SETTING, AUTH_PASSWORD_SETTING, AUTH_USERNAME_SETTING, BULK_TIMEOUT_SETTING, CONNECTION_READ_TIMEOUT_SETTING, CONNECTION_TIMEOUT_SETTING, PIPELINE_CHECK_TIMEOUT_SETTING, - PROXY_BASE_PATH_SETTING, SNIFF_ENABLED_SETTING, TEMPLATE_CHECK_TIMEOUT_SETTING, SSL_SETTING); + PROXY_BASE_PATH_SETTING, SNIFF_ENABLED_SETTING, TEMPLATE_CHECK_TIMEOUT_SETTING, SSL_SETTING, HEADERS_SETTING); } } diff --git a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java index a23755cfaf1..1ced4cd7208 100644 --- a/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java +++ b/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpExporterIT.java @@ -115,7 +115,8 @@ public class HttpExporterIT extends MonitoringIntegTestCase { .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringService.INTERVAL.getKey(), "-1") .put("xpack.monitoring.exporters._http.type", "http") - .put("xpack.monitoring.exporters._http.ssl.truststore.password", "foobar") + .put("xpack.monitoring.exporters._http.ssl.truststore.password", "foobar") // ensure that ssl can be used by settings + .put("xpack.monitoring.exporters._http.headers.ignored", "value") // ensure that headers can be used by settings .put("xpack.monitoring.exporters._http.enabled", false) .build(); }