You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,22 +10,23 @@ products:
10
10
11
11
# Configure a lifecycle policy [set-up-lifecycle-policy]
12
12
13
-
An [{{ilm}}](/manage-data/lifecycle/index-lifecycle-management.md) ({{ilm-init}}) policy defines how your indices are managed over time, automating when and how they transition as they age.
13
+
An [{{ilm}}](/manage-data/lifecycle/index-lifecycle-management.md) ({{ilm-init}}) policy defines how your indices are managed over time, automating when and how they transition as they age. You can use {{ilm-init}} to manage both data streams and standalone indices. When used with the latter, some additional configuration is required compared to the more automated process for data streams. This page describes the steps to configure an {{ilm-init}} lifecycle policy for both scenarios.
14
+
15
+
:::{note}
16
+
This page is specifically about using {{ilm-init}} with indices or data streams. If you're looking for a simpler, less feature-rich lifecycle management option for data streams only, refer to [Data stream lifecycle](/manage-data/lifecycle/data-stream.md). Check [Data lifecycle](/manage-data/lifecycle.md) to compare these lifecycle management options.
17
+
:::
18
+
14
19
15
20
**Consider these aspects when configuring an {{ilm-init}} policy:**
16
21
17
-
* For {{ilm-init}} to manage an index, you need to specify a valid policy in the `index.lifecycle.name` index setting.
22
+
* For {{ilm-init}} to manage an index or data stream, you need to specify a valid policy in the `index.lifecycle.name` index setting.
18
23
19
-
* To configure a lifecycle policy for [rolling indices](rollover.md) or data streams, you create the policy and add it to the [index template](../../data-store/templates.md).
24
+
* To configure a lifecycle policy for [rolling indices](rollover.md) or data streams, you create the policy and add it to the [index template](../../data-store/templates.md). Data streams are generally recommended in favor of rolling indices due to the lesser amount of manual configuration required. When you use {{ilm-init}} with rolling indices, you need to perform the additional steps of creating an initial managed index (ensuring that it is named appropriately) and assigning an alias to it, as described in [Step 3](#create-initial-index) on this page.
20
25
21
26
* To use a policy to manage a single index, you can specify a lifecycle policy when you create the index, or apply a policy directly to an existing index.
22
27
23
28
* {{ilm-init}} policies are stored in the global cluster state and can be included in snapshots by setting `include_global_state` to `true` when you [take the snapshot](../../../deploy-manage/tools/snapshot-and-restore/create-snapshots.md). When the snapshot is restored, all of the policies in the global state are restored and any local policies with the same names are overwritten.
24
29
25
-
:::{note}
26
-
This page is specifically about {{ilm-init}}. If you're looking for a simpler lifecycle management option for data streams, refer to [Data stream lifecycle](/manage-data/lifecycle/data-stream.md). Check [Data lifecycle](/manage-data/lifecycle.md) to compare these lifecycle management options.
27
-
:::
28
-
29
30
## Overview [ilm-configure-overview]
30
31
31
32
To set up ILM to manage one or more indices, the general procedure is as follows:
@@ -35,7 +36,7 @@ To set up ILM to manage one or more indices, the general procedure is as follows
35
36
36
37
If you're configuring ILM for rolling indices and not using [data streams](../../data-store/data-streams.md), you additionally need to:
37
38
38
-
3.[Create an initial managed index](#create-initial-index)
39
+
3.[Create an initial managed index and alias](#create-initial-index)
39
40
40
41
You can perform these actions in {{kib}} or using the {{es}} API.
41
42
@@ -207,7 +208,7 @@ PUT _index_template/my_template
207
208
:::
208
209
::::
209
210
210
-
## Create an initial managed index [create-initial-index]
211
+
## Create an initial managed index and alias [create-initial-index]
211
212
212
213
When you set up policies for your own rolling indices and are not using the recommended [data streams](../../data-store/data-streams.md), you must manually create the first index managed by a policy and designate it as the write index.
213
214
@@ -250,7 +251,7 @@ Now you can start indexing data to the rollover alias specified in the lifecycle
250
251
:sync: api
251
252
Use the [Create an index API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create) to create the initial managed index.
252
253
253
-
The following request creates the `test-000001` index. Because it matches the index pattern specified in `my_template`, {{es}} automatically applies the settings from that template.
254
+
The following request creates the `test-000001` index, with the alias `test-alias`. Because the index name matches the index pattern specified in `my_template`, {{es}} automatically applies the settings from that template.
0 commit comments