Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add previously removed Monitoring settings back for 8.0 #78784

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public List<Setting<?>> getSettings() {
settings.add(EnrichStatsCollector.STATS_TIMEOUT);
settings.addAll(Exporters.getSettings());
settings.add(Monitoring.MIGRATION_DECOMMISSION_ALERTS);
settings.addAll(MonitoringDeprecatedSettings.getSettings());
return Collections.unmodifiableList(settings);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

package org.elasticsearch.xpack.monitoring;

import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property;
import org.elasticsearch.core.TimeValue;

import java.util.Arrays;
import java.util.List;

/**
* A collection of settings that are marked as deprecated and soon to be removed. These settings have been moved here because the features
* that make use of them have been removed from the code. Their removals can be enacted after the standard deprecation period has completed.
*/
public final class MonitoringDeprecatedSettings {
private MonitoringDeprecatedSettings() {}

// ===================
// Deprecated in 7.16:
public static final Setting.AffixSetting<Boolean> TEMPLATE_CREATE_LEGACY_VERSIONS_SETTING =
Setting.affixKeySetting("xpack.monitoring.exporters.","index.template.create_legacy_templates",
(key) -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope, Property.Deprecated));
public static final Setting.AffixSetting<Boolean> USE_INGEST_PIPELINE_SETTING =
Setting.affixKeySetting("xpack.monitoring.exporters.","use_ingest",
key -> Setting.boolSetting(key, true, Property.Dynamic, Property.NodeScope, Property.Deprecated));
public static final Setting.AffixSetting<TimeValue> PIPELINE_CHECK_TIMEOUT_SETTING =
Setting.affixKeySetting("xpack.monitoring.exporters.","index.pipeline.master_timeout",
(key) -> Setting.timeSetting(key, TimeValue.MINUS_ONE, Property.Dynamic, Property.NodeScope, Property.Deprecated));
// ===================

public static List<Setting.AffixSetting<?>> getSettings() {
return Arrays.asList(TEMPLATE_CREATE_LEGACY_VERSIONS_SETTING, USE_INGEST_PIPELINE_SETTING, PIPELINE_CHECK_TIMEOUT_SETTING);
}

}