diff --git a/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java index 13e4c4b327c..6f4b7889c9d 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/monitoring/MonitoringSettings.java @@ -93,12 +93,6 @@ public class MonitoringSettings extends AbstractComponent { public static final Setting INDEX_RECOVERY_ACTIVE_ONLY = boolSetting(collectionKey("index.recovery.active_only"), false, Property.Dynamic, Property.NodeScope) ; - /** - * List of collectors allowed to collect data (default to all) - */ - public static final Setting> COLLECTORS = - listSetting(collectionKey("collectors"), Collections.emptyList(), Function.identity(), Property.NodeScope); - /** * The default retention duration of the monitoring history data. *

@@ -129,7 +123,6 @@ public class MonitoringSettings extends AbstractComponent { INDEX_STATS_TIMEOUT, INDICES_STATS_TIMEOUT, INDEX_RECOVERY_ACTIVE_ONLY, - COLLECTORS, CLUSTER_STATE_TIMEOUT, CLUSTER_STATS_TIMEOUT, HISTORY_DURATION, diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java index 941f62f1dee..d22d64e1df2 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringSettingsIntegTests.java @@ -18,7 +18,6 @@ import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; -import java.util.Collections; import java.util.List; import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked; @@ -34,7 +33,6 @@ public class MonitoringSettingsIntegTests extends MonitoringIntegTestCase { private final TimeValue clusterStatsTimeout = newRandomTimeValue(); private final TimeValue recoveryTimeout = newRandomTimeValue(); private final Boolean recoveryActiveOnly = randomBoolean(); - private final String[] collectors = randomStringArray(); @Override protected Settings nodeSettings(int nodeOrdinal) { @@ -62,7 +60,6 @@ public class MonitoringSettingsIntegTests extends MonitoringIntegTestCase { .put(MonitoringSettings.CLUSTER_STATS_TIMEOUT.getKey(), clusterStatsTimeout) .put(MonitoringSettings.INDEX_RECOVERY_TIMEOUT.getKey(), recoveryTimeout) .put(MonitoringSettings.INDEX_RECOVERY_ACTIVE_ONLY.getKey(), recoveryActiveOnly) - .putArray(MonitoringSettings.COLLECTORS.getKey(), collectors) .build(); } @@ -85,16 +82,15 @@ public class MonitoringSettingsIntegTests extends MonitoringIntegTestCase { logger.info("--> testing monitoring dynamic settings update"); Settings.Builder transientSettings = Settings.builder(); - final Setting[] monitoringSettings = new Setting[] { + final Setting[] monitoringSettings = new Setting[]{ MonitoringSettings.INDICES, - MonitoringSettings.INTERVAL, - MonitoringSettings.INDEX_RECOVERY_TIMEOUT, - MonitoringSettings.INDEX_STATS_TIMEOUT, - MonitoringSettings.INDICES_STATS_TIMEOUT, - MonitoringSettings.INDEX_RECOVERY_ACTIVE_ONLY, - MonitoringSettings.COLLECTORS, - MonitoringSettings.CLUSTER_STATE_TIMEOUT, - MonitoringSettings.CLUSTER_STATS_TIMEOUT }; + MonitoringSettings.INTERVAL, + MonitoringSettings.INDEX_RECOVERY_TIMEOUT, + MonitoringSettings.INDEX_STATS_TIMEOUT, + MonitoringSettings.INDICES_STATS_TIMEOUT, + MonitoringSettings.INDEX_RECOVERY_ACTIVE_ONLY, + MonitoringSettings.CLUSTER_STATE_TIMEOUT, + MonitoringSettings.CLUSTER_STATS_TIMEOUT}; for (Setting setting : monitoringSettings) { if (setting.isDynamic()) { Object updated = null; diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java index b1d7c9205ad..da5e1c18c10 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/exporter/ExportersTests.java @@ -57,8 +57,8 @@ public class ExportersTests extends ESTestCase { InternalClient client = mock(InternalClient.class); clusterService = mock(ClusterService.class); - clusterSettings = new ClusterSettings(Settings.EMPTY, new HashSet<>(Arrays.asList(MonitoringSettings.COLLECTORS, - MonitoringSettings.INTERVAL, MonitoringSettings.EXPORTERS_SETTINGS))); + clusterSettings = new ClusterSettings(Settings.EMPTY, + new HashSet<>(Arrays.asList(MonitoringSettings.INTERVAL, MonitoringSettings.EXPORTERS_SETTINGS))); when(clusterService.getClusterSettings()).thenReturn(clusterSettings); // we always need to have the local exporter as it serves as the default one diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java index db69509965f..ad30b68ae55 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterInfoTests.java @@ -13,7 +13,6 @@ import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.license.License; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStatsCollector; import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.resolver.MonitoringIndexNameResolver; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; @@ -41,7 +40,6 @@ public class ClusterInfoTests extends MonitoringIntegTestCase { return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") - .put(MonitoringSettings.COLLECTORS.getKey(), ClusterStatsCollector.NAME) .build(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java index 1d884e489db..255535c91fc 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStateTests.java @@ -15,7 +15,6 @@ import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.xpack.monitoring.MonitoredSystem; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStateCollector; import org.elasticsearch.xpack.monitoring.exporter.MonitoringTemplateUtils; import org.elasticsearch.xpack.monitoring.resolver.MonitoringIndexNameResolver; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; @@ -44,7 +43,6 @@ public class ClusterStateTests extends MonitoringIntegTestCase { return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") - .put(MonitoringSettings.COLLECTORS.getKey(), ClusterStateCollector.NAME) .put("xpack.monitoring.exporters.default_local.type", "local") .put("node.attr.custom", randomInt) .build(); diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java index 49567a0903c..12364e40807 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/cluster/ClusterStatsTests.java @@ -12,7 +12,6 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.cluster.ClusterStatsCollector; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.junit.After; @@ -31,7 +30,6 @@ public class ClusterStatsTests extends MonitoringIntegTestCase { return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") - .put(MonitoringSettings.COLLECTORS.getKey(), ClusterStatsCollector.NAME) .put("xpack.monitoring.exporters.default_local.type", "local") .build(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java index 58e03a24d5c..3748729d54e 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexRecoveryTests.java @@ -12,7 +12,6 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.indices.IndexRecoveryCollector; import org.elasticsearch.xpack.monitoring.resolver.MonitoringIndexNameResolver; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.junit.After; @@ -37,7 +36,6 @@ public class IndexRecoveryTests extends MonitoringIntegTestCase { .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") .put(MonitoringSettings.INDICES.getKey(), INDEX_PREFIX + "*") - .put(MonitoringSettings.COLLECTORS.getKey(), IndexRecoveryCollector.NAME) .put("xpack.monitoring.exporters.default_local.type", "local") .build(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java index 9d32505aeeb..b99fd0ec03f 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndexStatsTests.java @@ -12,7 +12,6 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.indices.IndexStatsCollector; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.junit.After; @@ -29,7 +28,6 @@ public class IndexStatsTests extends MonitoringIntegTestCase { return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") - .put(MonitoringSettings.COLLECTORS.getKey(), IndexStatsCollector.NAME) .put("xpack.monitoring.exporters.default_local.type", "local") .build(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java index cff3f0503a2..c45c7b2a203 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/indices/IndicesStatsTests.java @@ -12,7 +12,6 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.indices.IndicesStatsCollector; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.junit.After; @@ -29,7 +28,6 @@ public class IndicesStatsTests extends MonitoringIntegTestCase { return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") - .put(MonitoringSettings.COLLECTORS.getKey(), IndicesStatsCollector.NAME) .put("xpack.monitoring.exporters.default_local.type", "local") .build(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java index 30bf4156e5d..f0cbb6e26b4 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/node/NodeStatsTests.java @@ -12,7 +12,6 @@ import org.elasticsearch.search.SearchHit; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.node.NodeStatsCollector; import org.elasticsearch.xpack.monitoring.exporter.local.LocalExporter; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.junit.After; @@ -33,7 +32,6 @@ public class NodeStatsTests extends MonitoringIntegTestCase { return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") - .put(MonitoringSettings.COLLECTORS.getKey(), NodeStatsCollector.NAME) .put("xpack.monitoring.exporters.default_local.type", LocalExporter.TYPE) .build(); } diff --git a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java index a0c24d421d8..ab13c4304fb 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/monitoring/resolver/shards/ShardsTests.java @@ -18,7 +18,6 @@ import org.elasticsearch.search.aggregations.bucket.terms.StringTerms; import org.elasticsearch.test.ESIntegTestCase.ClusterScope; import org.elasticsearch.test.ESIntegTestCase.Scope; import org.elasticsearch.xpack.monitoring.MonitoringSettings; -import org.elasticsearch.xpack.monitoring.collector.shards.ShardsCollector; import org.elasticsearch.xpack.monitoring.test.MonitoringIntegTestCase; import org.junit.After; @@ -44,7 +43,6 @@ public class ShardsTests extends MonitoringIntegTestCase { return Settings.builder() .put(super.nodeSettings(nodeOrdinal)) .put(MonitoringSettings.INTERVAL.getKey(), "-1") - .put(MonitoringSettings.COLLECTORS.getKey(), ShardsCollector.NAME) .put(MonitoringSettings.INDICES.getKey(), INDEX_PREFIX + "*") .put("xpack.monitoring.exporters.default_local.type", "local") .build();