[Monitoring] Change xpack.monitoring.collection.exporters to xpack.monitoring.exporters
Removes the exporters from the collection settings. Original commit: elastic/x-pack-elasticsearch@e721e5cb6d
This commit is contained in:
parent
2bca7d2f74
commit
ac43e72aec
|
@ -154,12 +154,12 @@ project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each
|
|||
integTest {
|
||||
cluster {
|
||||
setting 'xpack.monitoring.collection.interval', '3s'
|
||||
setting 'xpack.monitoring.collection.exporters._http.type', 'http'
|
||||
setting 'xpack.monitoring.collection.exporters._http.enabled', 'false'
|
||||
setting 'xpack.monitoring.collection.exporters._http.ssl.truststore.path', clientKeyStore.name
|
||||
setting 'xpack.monitoring.collection.exporters._http.ssl.truststore.password', 'keypass'
|
||||
setting 'xpack.monitoring.collection.exporters._http.auth.username', 'monitoring_agent'
|
||||
setting 'xpack.monitoring.collection.exporters._http.auth.password', 'changeme'
|
||||
setting 'xpack.monitoring.exporters._http.type', 'http'
|
||||
setting 'xpack.monitoring.exporters._http.enabled', 'false'
|
||||
setting 'xpack.monitoring.exporters._http.ssl.truststore.path', clientKeyStore.name
|
||||
setting 'xpack.monitoring.exporters._http.ssl.truststore.password', 'keypass'
|
||||
setting 'xpack.monitoring.exporters._http.auth.username', 'monitoring_agent'
|
||||
setting 'xpack.monitoring.exporters._http.auth.password', 'changeme'
|
||||
|
||||
setting 'xpack.security.transport.ssl.enabled', 'true'
|
||||
setting 'xpack.security.http.ssl.enabled', 'true'
|
||||
|
|
|
@ -74,8 +74,8 @@ public class SmokeTestMonitoringWithSecurityIT extends ESIntegTestCase {
|
|||
URI uri = new URI("https", null, httpAddress.getHostString(), httpAddress.getPort(), "/", null, null);
|
||||
|
||||
Settings exporterSettings = Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._http.enabled", true)
|
||||
.put("xpack.monitoring.collection.exporters._http.host", uri.toString())
|
||||
.put("xpack.monitoring.exporters._http.enabled", true)
|
||||
.put("xpack.monitoring.exporters._http.host", uri.toString())
|
||||
.build();
|
||||
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(exporterSettings));
|
||||
}
|
||||
|
@ -83,8 +83,8 @@ public class SmokeTestMonitoringWithSecurityIT extends ESIntegTestCase {
|
|||
@After
|
||||
public void disableExporter() {
|
||||
Settings exporterSettings = Settings.builder()
|
||||
.putNull("xpack.monitoring.collection.exporters._http.enabled")
|
||||
.putNull("xpack.monitoring.collection.exporters._http.host")
|
||||
.putNull("xpack.monitoring.exporters._http.enabled")
|
||||
.putNull("xpack.monitoring.exporters._http.host")
|
||||
.build();
|
||||
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(exporterSettings));
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
metric: [ settings ]
|
||||
|
||||
- is_true: nodes
|
||||
- is_true: nodes.$master.settings.xpack.monitoring.collection.exporters._http.type
|
||||
- is_true: nodes.$master.settings.xpack.monitoring.exporters._http.type
|
||||
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.collection.exporters._http.auth.username
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.collection.exporters._http.auth.password
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.collection.exporters._http.ssl.truststore.path
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.collection.exporters._http.ssl.truststore.password
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.exporters._http.auth.username
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.exporters._http.auth.password
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.exporters._http.ssl.truststore.path
|
||||
- is_false: nodes.$master.settings.xpack.monitoring.exporters._http.ssl.truststore.password
|
||||
|
|
|
@ -122,7 +122,7 @@ public class MonitoringSettings extends AbstractComponent {
|
|||
* Settings/Options per configured exporter
|
||||
*/
|
||||
public static final Setting<Settings> EXPORTERS_SETTINGS =
|
||||
groupSetting(collectionKey("exporters."), Property.Dynamic, Property.NodeScope);
|
||||
groupSetting(key("exporters."), Property.Dynamic, Property.NodeScope);
|
||||
|
||||
public static List<Setting<?>> getSettings() {
|
||||
return Arrays.asList(INDICES,
|
||||
|
@ -140,7 +140,7 @@ public class MonitoringSettings extends AbstractComponent {
|
|||
}
|
||||
|
||||
public static List<String> getSettingsFilter() {
|
||||
return Arrays.asList("xpack.monitoring.collection.exporters.*.auth.*", "xpack.monitoring.collection.exporters.*.ssl.*");
|
||||
return Arrays.asList(key("exporters.*.auth.*"), key("exporters.*.ssl.*"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -536,7 +536,7 @@ public class HttpExporter extends Exporter {
|
|||
try {
|
||||
HttpExporterUtils.parseHostWithPath(host, "");
|
||||
} catch (URISyntaxException | MalformedURLException e) {
|
||||
throw new SettingsException("[xpack.monitoring.collection.exporters] invalid host: [" + host + "]." +
|
||||
throw new SettingsException("[xpack.monitoring.exporters] invalid host: [" + host + "]." +
|
||||
" error: [" + e.getMessage() + "]");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public abstract class AbstractExporterTemplateTestCase extends MonitoringIntegTe
|
|||
.put(MonitoringSettings.INTERVAL.getKey(), "-1");
|
||||
|
||||
for (Map.Entry<String, String> setting : exporterSettings().getAsMap().entrySet()) {
|
||||
settings.put("xpack.monitoring.collection.exporters._exporter." + setting.getKey(), setting.getValue());
|
||||
settings.put("xpack.monitoring.exporters._exporter." + setting.getKey(), setting.getValue());
|
||||
}
|
||||
return settings.build();
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
package org.elasticsearch.xpack.monitoring.agent.exporter;
|
||||
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterName;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
|
@ -16,7 +15,6 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.settings.SettingsException;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
import org.elasticsearch.xpack.common.init.proxy.ClientProxy;
|
||||
import org.elasticsearch.xpack.monitoring.MonitoredSystem;
|
||||
import org.elasticsearch.xpack.monitoring.MonitoringSettings;
|
||||
import org.elasticsearch.xpack.monitoring.agent.exporter.local.LocalExporter;
|
||||
|
@ -46,7 +44,6 @@ import static org.hamcrest.Matchers.instanceOf;
|
|||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.notNullValue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
|
@ -170,8 +167,8 @@ public class ExportersTests extends ESTestCase {
|
|||
final AtomicReference<Settings> settingsHolder = new AtomicReference<>();
|
||||
|
||||
Settings nodeSettings = Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._name0.type", "_type")
|
||||
.put("xpack.monitoring.collection.exporters._name1.type", "_type")
|
||||
.put("xpack.monitoring.exporters._name0.type", "_type")
|
||||
.put("xpack.monitoring.exporters._name1.type", "_type")
|
||||
.build();
|
||||
clusterSettings = new ClusterSettings(nodeSettings, new HashSet<>(Arrays.asList(MonitoringSettings.EXPORTERS_SETTINGS)));
|
||||
when(clusterService.getClusterSettings()).thenReturn(clusterSettings);
|
||||
|
@ -192,8 +189,8 @@ public class ExportersTests extends ESTestCase {
|
|||
assertThat(settings, hasEntry("_name1.type", "_type"));
|
||||
|
||||
Settings update = Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._name0.foo", "bar")
|
||||
.put("xpack.monitoring.collection.exporters._name1.foo", "bar")
|
||||
.put("xpack.monitoring.exporters._name0.foo", "bar")
|
||||
.put("xpack.monitoring.exporters._name1.foo", "bar")
|
||||
.build();
|
||||
clusterSettings.applySettings(update);
|
||||
assertThat(settingsHolder.get(), notNullValue());
|
||||
|
@ -211,8 +208,8 @@ public class ExportersTests extends ESTestCase {
|
|||
factories.put("mock", factory);
|
||||
factories.put("mock_master_only", masterOnlyFactory);
|
||||
Exporters exporters = new Exporters(Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._name0.type", "mock")
|
||||
.put("xpack.monitoring.collection.exporters._name1.type", "mock_master_only")
|
||||
.put("xpack.monitoring.exporters._name0.type", "mock")
|
||||
.put("xpack.monitoring.exporters._name1.type", "mock_master_only")
|
||||
.build(), factories, clusterService);
|
||||
exporters.start();
|
||||
|
||||
|
@ -236,8 +233,8 @@ public class ExportersTests extends ESTestCase {
|
|||
factories.put("mock", factory);
|
||||
factories.put("mock_master_only", masterOnlyFactory);
|
||||
Exporters exporters = new Exporters(Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._name0.type", "mock")
|
||||
.put("xpack.monitoring.collection.exporters._name1.type", "mock_master_only")
|
||||
.put("xpack.monitoring.exporters._name0.type", "mock")
|
||||
.put("xpack.monitoring.exporters._name1.type", "mock_master_only")
|
||||
.build(), factories, clusterService);
|
||||
exporters.start();
|
||||
|
||||
|
@ -266,7 +263,7 @@ public class ExportersTests extends ESTestCase {
|
|||
logger.info("--> creating {} exporters", nbExporters);
|
||||
Settings.Builder settings = Settings.builder();
|
||||
for (int i = 0; i < nbExporters; i++) {
|
||||
settings.put("xpack.monitoring.collection.exporters._name" + String.valueOf(i) + ".type", "record");
|
||||
settings.put("xpack.monitoring.exporters._name" + String.valueOf(i) + ".type", "record");
|
||||
}
|
||||
|
||||
factories.put("record", CountingExporter::new);
|
||||
|
|
|
@ -95,10 +95,10 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
|
||||
Settings.Builder builder = Settings.builder()
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.collection.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.collection.exporters._http.connection.keep_alive", false)
|
||||
.put("xpack.monitoring.collection.exporters._http.update_mappings", false);
|
||||
.put("xpack.monitoring.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.exporters._http.connection.keep_alive", false)
|
||||
.put("xpack.monitoring.exporters._http.update_mappings", false);
|
||||
|
||||
internalCluster().startNode(builder);
|
||||
|
||||
|
@ -133,23 +133,23 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
// disable exporting to be able to use non valid hosts
|
||||
Settings.Builder builder = Settings.builder()
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.collection.exporters._http.host", "test0");
|
||||
.put("xpack.monitoring.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.exporters._http.host", "test0");
|
||||
|
||||
String nodeName = internalCluster().startNode(builder);
|
||||
|
||||
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder()
|
||||
.putArray("xpack.monitoring.collection.exporters._http.host", "test1")));
|
||||
.putArray("xpack.monitoring.exporters._http.host", "test1")));
|
||||
assertThat(getExporter(nodeName).hosts, Matchers.arrayContaining("test1"));
|
||||
|
||||
// wipes the non array settings
|
||||
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder()
|
||||
.putArray("xpack.monitoring.collection.exporters._http.host", "test2")
|
||||
.put("xpack.monitoring.collection.exporters._http.host", "")));
|
||||
.putArray("xpack.monitoring.exporters._http.host", "test2")
|
||||
.put("xpack.monitoring.exporters._http.host", "")));
|
||||
assertThat(getExporter(nodeName).hosts, Matchers.arrayContaining("test2"));
|
||||
|
||||
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder()
|
||||
.putArray("xpack.monitoring.collection.exporters._http.host", "test3")));
|
||||
.putArray("xpack.monitoring.exporters._http.host", "test3")));
|
||||
assertThat(getExporter(nodeName).hosts, Matchers.arrayContaining("test3"));
|
||||
}
|
||||
|
||||
|
@ -157,10 +157,10 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
|
||||
Settings.Builder builder = Settings.builder()
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.collection.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.collection.exporters._http.connection.keep_alive", false)
|
||||
.put("xpack.monitoring.collection.exporters._http.update_mappings", false);
|
||||
.put("xpack.monitoring.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.exporters._http.connection.keep_alive", false)
|
||||
.put("xpack.monitoring.exporters._http.update_mappings", false);
|
||||
|
||||
logger.info("--> starting node");
|
||||
|
||||
|
@ -221,7 +221,7 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
assertNotNull("Unable to start the second mock web server", secondWebServer);
|
||||
|
||||
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(
|
||||
Settings.builder().putArray("xpack.monitoring.collection.exporters._http.host",
|
||||
Settings.builder().putArray("xpack.monitoring.exporters._http.host",
|
||||
secondWebServer.getHostName() + ":" + secondWebServer.getPort())).get());
|
||||
|
||||
// a new exporter is created on update, so we need to re-fetch it
|
||||
|
@ -274,9 +274,9 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
public void testUnsupportedClusterVersion() throws Exception {
|
||||
Settings.Builder builder = Settings.builder()
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.collection.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.collection.exporters._http.connection.keep_alive", false);
|
||||
.put("xpack.monitoring.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.exporters._http.connection.keep_alive", false);
|
||||
|
||||
logger.info("--> starting node");
|
||||
|
||||
|
@ -302,10 +302,10 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
public void testDynamicIndexFormatChange() throws Exception {
|
||||
Settings.Builder builder = Settings.builder()
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.collection.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.collection.exporters._http.connection.keep_alive", false)
|
||||
.put("xpack.monitoring.collection.exporters._http.update_mappings", false);
|
||||
.put("xpack.monitoring.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.exporters._http.host", webServer.getHostName() + ":" + webServer.getPort())
|
||||
.put("xpack.monitoring.exporters._http.connection.keep_alive", false)
|
||||
.put("xpack.monitoring.exporters._http.update_mappings", false);
|
||||
|
||||
String agentNode = internalCluster().startNode(builder);
|
||||
|
||||
|
@ -356,7 +356,7 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
String newTimeFormat = randomFrom("YY", "YYYY", "YYYY.MM", "YYYY-MM", "MM.YYYY", "MM");
|
||||
logger.info("--> updating index time format setting to {}", newTimeFormat);
|
||||
assertAcked(client().admin().cluster().prepareUpdateSettings().setTransientSettings(Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._http.index.name.time_format", newTimeFormat)));
|
||||
.put("xpack.monitoring.exporters._http.index.name.time_format", newTimeFormat)));
|
||||
|
||||
|
||||
logger.info("--> exporting a second event");
|
||||
|
@ -402,9 +402,9 @@ public class HttpExporterTests extends MonitoringIntegTestCase {
|
|||
|
||||
Settings.Builder builder = Settings.builder()
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.collection.exporters._http.host", host)
|
||||
.put("xpack.monitoring.collection.exporters._http.connection.keep_alive", false);
|
||||
.put("xpack.monitoring.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.exporters._http.host", host)
|
||||
.put("xpack.monitoring.exporters._http.connection.keep_alive", false);
|
||||
|
||||
String agentNode = internalCluster().startNode(builder);
|
||||
HttpExporter exporter = getExporter(agentNode);
|
||||
|
|
|
@ -65,8 +65,8 @@ public class LocalExporterTests extends MonitoringIntegTestCase {
|
|||
|
||||
public void testSimpleExport() throws Exception {
|
||||
internalCluster().startNode(Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.collection.exporters._local.enabled", true)
|
||||
.put("xpack.monitoring.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.exporters._local.enabled", true)
|
||||
.build());
|
||||
securedEnsureGreen();
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class LocalExporterTests extends MonitoringIntegTestCase {
|
|||
|
||||
public void testTemplateCreation() throws Exception {
|
||||
internalCluster().startNode(Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.exporters._local.type", LocalExporter.TYPE)
|
||||
.build());
|
||||
securedEnsureGreen();
|
||||
|
||||
|
@ -111,8 +111,8 @@ public class LocalExporterTests extends MonitoringIntegTestCase {
|
|||
String timeFormat = randomFrom("YY", "YYYY", "YYYY.MM", "YYYY-MM", "MM.YYYY", "MM");
|
||||
|
||||
internalCluster().startNode(Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.collection.exporters._local." + LocalExporter.INDEX_NAME_TIME_FORMAT_SETTING, timeFormat)
|
||||
.put("xpack.monitoring.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.exporters._local." + LocalExporter.INDEX_NAME_TIME_FORMAT_SETTING, timeFormat)
|
||||
.build());
|
||||
securedEnsureGreen();
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class LocalExporterTests extends MonitoringIntegTestCase {
|
|||
|
||||
logger.debug("--> updates the timestamp");
|
||||
timeFormat = randomFrom("dd", "dd.MM.YYYY", "dd.MM");
|
||||
updateClusterSettings(Settings.builder().put("xpack.monitoring.collection.exporters._local.index.name.time_format", timeFormat));
|
||||
updateClusterSettings(Settings.builder().put("xpack.monitoring.exporters._local.index.name.time_format", timeFormat));
|
||||
exporter = getLocalExporter("_local"); // we need to get it again.. as it was rebuilt
|
||||
indexName = ".monitoring-es-" + MonitoringTemplateUtils.TEMPLATE_VERSION + "-"
|
||||
+ DateTimeFormat.forPattern(timeFormat).withZoneUTC().print(doc.getTimestamp());
|
||||
|
@ -144,8 +144,8 @@ public class LocalExporterTests extends MonitoringIntegTestCase {
|
|||
|
||||
public void testLocalExporterFlush() throws Exception {
|
||||
internalCluster().startNode(Settings.builder()
|
||||
.put("xpack.monitoring.collection.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.collection.exporters._local.enabled", true)
|
||||
.put("xpack.monitoring.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.exporters._local.enabled", true)
|
||||
.build());
|
||||
securedEnsureGreen();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ClusterStateTests extends MonitoringIntegTestCase {
|
|||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put(MonitoringSettings.COLLECTORS.getKey(), ClusterStateCollector.NAME)
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", "local")
|
||||
.put("xpack.monitoring.exporters.default_local.type", "local")
|
||||
.put("node.attr.custom", randomInt)
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class ClusterStatsTests extends MonitoringIntegTestCase {
|
|||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put(MonitoringSettings.COLLECTORS.getKey(), ClusterStatsCollector.NAME)
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", "local")
|
||||
.put("xpack.monitoring.exporters.default_local.type", "local")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class IndexRecoveryTests extends MonitoringIntegTestCase {
|
|||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put(MonitoringSettings.INDICES.getKey(), INDEX_PREFIX + "*")
|
||||
.put(MonitoringSettings.COLLECTORS.getKey(), IndexRecoveryCollector.NAME)
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", "local")
|
||||
.put("xpack.monitoring.exporters.default_local.type", "local")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class IndexStatsTests extends MonitoringIntegTestCase {
|
|||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put(MonitoringSettings.COLLECTORS.getKey(), IndexStatsCollector.NAME)
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", "local")
|
||||
.put("xpack.monitoring.exporters.default_local.type", "local")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ public class IndicesStatsTests extends MonitoringIntegTestCase {
|
|||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put(MonitoringSettings.COLLECTORS.getKey(), IndicesStatsCollector.NAME)
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", "local")
|
||||
.put("xpack.monitoring.exporters.default_local.type", "local")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public class MultiNodesStatsTests extends MonitoringIntegTestCase {
|
|||
return Settings.builder()
|
||||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", "local")
|
||||
.put("xpack.monitoring.exporters.default_local.type", "local")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class NodeStatsTests extends MonitoringIntegTestCase {
|
|||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put(MonitoringSettings.COLLECTORS.getKey(), NodeStatsCollector.NAME)
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.exporters.default_local.type", LocalExporter.TYPE)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class ShardsTests extends MonitoringIntegTestCase {
|
|||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put(MonitoringSettings.COLLECTORS.getKey(), ShardsCollector.NAME)
|
||||
.put(MonitoringSettings.INDICES.getKey(), INDEX_PREFIX + "*")
|
||||
.put("xpack.monitoring.collection.exporters.default_local.type", "local")
|
||||
.put("xpack.monitoring.exporters.default_local.type", "local")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class LocalIndicesCleanerTests extends AbstractIndicesCleanerTestCase {
|
|||
protected Settings nodeSettings(int nodeOrdinal) {
|
||||
return Settings.builder()
|
||||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put("xpack.monitoring.collection.exporters._local.type", LocalExporter.TYPE)
|
||||
.put("xpack.monitoring.exporters._local.type", LocalExporter.TYPE)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -35,13 +35,13 @@ public class MonitoringSettingsFilterTests extends MonitoringIntegTestCase {
|
|||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(NetworkModule.HTTP_ENABLED.getKey(), true)
|
||||
.put(MonitoringSettings.INTERVAL.getKey(), "-1")
|
||||
.put("xpack.monitoring.collection.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.collection.exporters._http.enabled", false)
|
||||
.put("xpack.monitoring.collection.exporters._http.auth.username", "_user")
|
||||
.put("xpack.monitoring.collection.exporters._http.auth.password", "_passwd")
|
||||
.put("xpack.monitoring.collection.exporters._http.ssl.truststore.path", "/path/to/truststore")
|
||||
.put("xpack.monitoring.collection.exporters._http.ssl.truststore.password", "_passwd")
|
||||
.put("xpack.monitoring.collection.exporters._http.ssl.hostname_verification", true)
|
||||
.put("xpack.monitoring.exporters._http.type", "http")
|
||||
.put("xpack.monitoring.exporters._http.enabled", false)
|
||||
.put("xpack.monitoring.exporters._http.auth.username", "_user")
|
||||
.put("xpack.monitoring.exporters._http.auth.password", "_passwd")
|
||||
.put("xpack.monitoring.exporters._http.ssl.truststore.path", "/path/to/truststore")
|
||||
.put("xpack.monitoring.exporters._http.ssl.truststore.password", "_passwd")
|
||||
.put("xpack.monitoring.exporters._http.ssl.hostname_verification", true)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -69,13 +69,13 @@ public class MonitoringSettingsFilterTests extends MonitoringIntegTestCase {
|
|||
for (Object node : nodes.values()) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> settings = (Map<String, Object>) ((Map<String, Object>) node).get("settings");
|
||||
assertThat(extractValue("xpack.monitoring.collection.exporters._http.type", settings), equalTo("http"));
|
||||
assertThat(extractValue("xpack.monitoring.collection.exporters._http.enabled", settings), equalTo("false"));
|
||||
assertNullSetting(settings, "xpack.monitoring.collection.exporters._http.auth.username");
|
||||
assertNullSetting(settings, "xpack.monitoring.collection.exporters._http.auth.password");
|
||||
assertNullSetting(settings, "xpack.monitoring.collection.exporters._http.ssl.truststore.path");
|
||||
assertNullSetting(settings, "xpack.monitoring.collection.exporters._http.ssl.truststore.password");
|
||||
assertNullSetting(settings, "xpack.monitoring.collection.exporters._http.ssl.hostname_verification");
|
||||
assertThat(extractValue("xpack.monitoring.exporters._http.type", settings), equalTo("http"));
|
||||
assertThat(extractValue("xpack.monitoring.exporters._http.enabled", settings), equalTo("false"));
|
||||
assertNullSetting(settings, "xpack.monitoring.exporters._http.auth.username");
|
||||
assertNullSetting(settings, "xpack.monitoring.exporters._http.auth.password");
|
||||
assertNullSetting(settings, "xpack.monitoring.exporters._http.ssl.truststore.path");
|
||||
assertNullSetting(settings, "xpack.monitoring.exporters._http.ssl.truststore.password");
|
||||
assertNullSetting(settings, "xpack.monitoring.exporters._http.ssl.hostname_verification");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue