Skip to content

Commit 0f3c542

Browse files
authored
Deprecate xpack.watcher.history.cleaner_service.enabled (#37782)
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
1 parent d473bcd commit 0f3c542

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

docs/reference/monitoring/exporters.asciidoc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,6 @@ particularly the monitoring indices. To do so, you can take advantage of the
5656

5757
//TO-DO: Add information about index lifecycle management https://github.com/elastic/x-pack-elasticsearch/issues/2814
5858

59-
When using cluster alerts, {watcher} creates daily `.watcher_history*` indices.
60-
These are not managed by {monitoring} and they are not curated automatically. It
61-
is therefore critical that you curate these indices to avoid an undesirable and
62-
unexpected increase in the number of shards and indices and eventually the
63-
amount of disk usage. If you are using a `local` exporter, you can set the
64-
`xpack.watcher.history.cleaner_service.enabled` setting to `true` and curate the
65-
`.watcher_history*` indices by using the
66-
<<local-exporter-cleaner,cleaner service>>. See <<general-notification-settings>>.
67-
6859
There is also a disk watermark (known as the flood stage
6960
watermark), which protects clusters from running out of disk space. When this
7061
feature is triggered, it makes all indices (including monitoring indices)

docs/reference/settings/monitoring-settings.asciidoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ being monitored, and it cannot be disabled.
105105

106106
IMPORTANT: This setting currently only impacts `local`-type exporters. Indices created using
107107
the `http` exporter will not be deleted automatically.
108-
109-
If both {monitoring} and {watcher} are enabled, you can use this setting to
110-
affect the {watcher} cleaner service too. For more information, see the
111-
`xpack.watcher.history.cleaner_service.enabled` setting in the
112-
<<notification-settings>>.
113108
--
114109

115110
`xpack.monitoring.exporters`::

docs/reference/settings/notification-settings.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ required. For more information, see
3737

3838
`xpack.watcher.history.cleaner_service.enabled`::
3939
added[6.3.0,Default changed to `true`.]
40+
deprecated[7.0.0,Watcher history indices are now managed by the `watch-history-ilm-policy` ILM policy]
4041
+
4142
Set to `true` (default) to enable the cleaner service. If this setting is
4243
`true`, the `xpack.monitoring.enabled` setting must also be set to `true` with

x-pack/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/Monitoring.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ public class Monitoring extends Plugin implements ActionPlugin {
7777
/**
7878
* The ability to automatically cleanup ".watcher_history*" indices while also cleaning up Monitoring indices.
7979
*/
80+
@Deprecated
8081
public static final Setting<Boolean> CLEAN_WATCHER_HISTORY = boolSetting("xpack.watcher.history.cleaner_service.enabled",
81-
true,
82-
Setting.Property.Dynamic, Setting.Property.NodeScope);
82+
true, Setting.Property.Dynamic, Setting.Property.NodeScope, Setting.Property.Deprecated);
8383

8484
protected final Settings settings;
8585
private final boolean enabled;

0 commit comments

Comments
 (0)