From 04c6503ff34f563e5570d9c5af4d0101a4c283e5 Mon Sep 17 00:00:00 2001 From: Lee Hinman Date: Wed, 23 Jan 2019 10:39:50 -0700 Subject: [PATCH] Deprecate xpack.watcher.history.cleaner_service.enabled This deprecates the `xpack.watcher.history.cleaner_service.enabled` setting, since all newly created `.watch-history` indices in 7.0 will use ILM to manage their retention. In 8.0 the setting itself and cleanup actions will be removed. Resolves #32041 --- docs/reference/monitoring/exporters.asciidoc | 9 --------- docs/reference/settings/monitoring-settings.asciidoc | 5 ----- docs/reference/settings/notification-settings.asciidoc | 1 + .../org/elasticsearch/xpack/monitoring/Monitoring.java | 4 ++-- 4 files changed, 3 insertions(+), 16 deletions(-) diff --git a/docs/reference/monitoring/exporters.asciidoc b/docs/reference/monitoring/exporters.asciidoc index a1d4bc08ae73f..fee09015dbbd9 100644 --- a/docs/reference/monitoring/exporters.asciidoc +++ b/docs/reference/monitoring/exporters.asciidoc @@ -56,15 +56,6 @@ particularly the monitoring indices. To do so, you can take advantage of the //TO-DO: Add information about index lifecycle management https://github.com/elastic/x-pack-elasticsearch/issues/2814 -When using cluster alerts, {watcher} creates daily `.watcher_history*` indices. -These are not managed by {monitoring} and they are not curated automatically. It -is therefore critical that you curate these indices to avoid an undesirable and -unexpected increase in the number of shards and indices and eventually the -amount of disk usage. If you are using a `local` exporter, you can set the -`xpack.watcher.history.cleaner_service.enabled` setting to `true` and curate the -`.watcher_history*` indices by using the -<>. See <>. - There is also a disk watermark (known as the flood stage watermark), which protects clusters from running out of disk space. When this feature is triggered, it makes all indices (including monitoring indices) diff --git a/docs/reference/settings/monitoring-settings.asciidoc b/docs/reference/settings/monitoring-settings.asciidoc index 59a766d4dd0ca..c633088bc5ed4 100644 --- a/docs/reference/settings/monitoring-settings.asciidoc +++ b/docs/reference/settings/monitoring-settings.asciidoc @@ -105,11 +105,6 @@ being monitored, and it cannot be disabled. IMPORTANT: This setting currently only impacts `local`-type exporters. Indices created using the `http` exporter will not be deleted automatically. - -If both {monitoring} and {watcher} are enabled, you can use this setting to -affect the {watcher} cleaner service too. For more information, see the -`xpack.watcher.history.cleaner_service.enabled` setting in the -<>. -- `xpack.monitoring.exporters`:: diff --git a/docs/reference/settings/notification-settings.asciidoc b/docs/reference/settings/notification-settings.asciidoc index 2f14dd276b849..c3f0ca3b8ce36 100644 --- a/docs/reference/settings/notification-settings.asciidoc +++ b/docs/reference/settings/notification-settings.asciidoc @@ -37,6 +37,7 @@ required. For more information, see `xpack.watcher.history.cleaner_service.enabled`:: added[6.3.0,Default changed to `true`.] +deprecated[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy] + Set to `true` (default) to enable the cleaner service. If this setting is `true`, the `xpack.monitoring.enabled` setting must also be set to `true` with diff --git a/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java b/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java index 2913a0ec9c0df..b054eca1cc319 100644 --- a/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java +++ b/x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java @@ -77,9 +77,9 @@ public class Monitoring extends Plugin implements ActionPlugin { /** * The ability to automatically cleanup ".watcher_history*" indices while also cleaning up Monitoring indices. */ + @Deprecated public static final Setting CLEAN_WATCHER_HISTORY = boolSetting("xpack.watcher.history.cleaner_service.enabled", - true, - Setting.Property.Dynamic, Setting.Property.NodeScope); + true, Setting.Property.Dynamic, Setting.Property.NodeScope, Setting.Property.Deprecated); protected final Settings settings; private final boolean enabled;