Skip to content

Commit fbbdd50

Browse files
[manage data] Add ILM intro, clean up ILM section (#458)
Closes elastic/docs-projects#376 Adds an ILM intro page and attempts to reorganize subpages in a logical order: * Concepts (Index lifecycle, Rollover) * Tasks that will be applicable to most users organized roughly chronologically (Configure a policy, Update a policy, Start and stop ILM, Restore a managed data stream or index, Customize built-in policies) * Index management in Kibana doesn't really fit, but I feel like it belongs alongside these other pages * Info on switching to ILM from something else (Manage existing indices, Migrate to index lifecycle management, Migrate index allocation filters to node roles)
1 parent bf97255 commit fbbdd50

File tree

16 files changed

+121
-230
lines changed

16 files changed

+121
-230
lines changed

manage-data/lifecycle/index-lifecycle-management.md

Lines changed: 63 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,83 @@
22
mapped_urls:
33
- https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html
44
- https://www.elastic.co/guide/en/elasticsearch/reference/current/overview-index-lifecycle-management.html
5-
- https://www.elastic.co/guide/en/serverless/current/elasticsearch-differences.html#elasticsearch-differences-serverless-features-replaced
6-
- https://www.elastic.co/guide/en/cloud-enterprise/current/ece-migrate-index-management.html
7-
- https://www.elastic.co/guide/en/cloud/current/ec-configure-index-management.html
8-
- https://www.elastic.co/guide/en/cloud/current/ec-migrate-index-management.html
5+
- https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-concepts.html
96
---
107

118
# Index lifecycle management
129

13-
% What needs to be done: Refine
10+
{{ilm-cap}} ({{ilm-init}}) provides an integrated and streamlined way to manage time-based data such as logs and metrics, making it easier to follow best practices for managing your indices.
1411

15-
% GitHub issue: docs-projects#376
12+
You can configure {{ilm-init}} policies to automatically manage indices according to your performance, resiliency, and retention requirements. For example, you could use {{ilm-init}} to:
1613

17-
% Scope notes: Combine the linked resources. The "migrate to ILM" one is probably outdated now.
14+
* Spin up a new index when an index reaches a certain size or number of documents
15+
* Create a new index each day, week, or month and archive previous ones
16+
* Delete stale indices to enforce data retention standards
1817

19-
% Use migrated content from existing pages that map to this page:
18+
::::{tip}
19+
{{ilm-init}} is not available on {{es-serverless}}.
2020

21-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/index-lifecycle-management.md
22-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/overview-index-lifecycle-management.md
23-
% - [ ] ./raw-migrated-files/docs-content/serverless/elasticsearch-differences.md
24-
% - [ ] ./raw-migrated-files/cloud/cloud-enterprise/ece-migrate-index-management.md
25-
% - [ ] ./raw-migrated-files/cloud/cloud/ec-configure-index-management.md
26-
% - [ ] ./raw-migrated-files/cloud/cloud/ec-migrate-index-management.md
21+
:::{dropdown} Why?
22+
In an {{ecloud}} or self-managed environment, ILM lets you automatically transition indices through data tiers according to your performance needs and retention requirements. This allows you to balance hardware costs with performance. {{es-serverless}} eliminates this complexity by optimizing your cluster performance for you.
2723

28-
% Internal links rely on the following IDs being on this page (e.g. as a heading ID, paragraph ID, etc):
24+
Data stream lifecycle is an optimized lifecycle tool that lets you focus on the most common lifecycle management needs, without unnecessary hardware-centric concepts like data tiers.
25+
:::
26+
::::
2927

30-
$$$ilm-gs-alias-bootstrap$$$
28+
::::{important}
29+
To use {{ilm-init}}, all nodes in a cluster must run the same version. Although it might be possible to create and apply policies in a mixed-version cluster, there is no guarantee they will work as intended. Attempting to use a policy that contains actions that aren’t supported on all nodes in a cluster will cause errors.
30+
::::
3131

32-
$$$manage-time-series-data-without-data-streams$$$
32+
## Actions
3333

34-
$$$ilm-gs-create-policy$$$
34+
{{ilm-init}} policies can trigger actions like:
3535

36-
$$$ilm-gs-apply-policy$$$
36+
* **Rollover**: Creates a new write index when the current one reaches a certain size, number of docs, or age.
37+
* **Shrink**: Reduces the number of primary shards in an index.
38+
* **Force merge**: Triggers a [force merge](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html) to reduce the number of segments in an index’s shards.
39+
* **Delete**: Permanently remove an index, including all of its data and metadata.
40+
* [And more](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-actions.html)
3741

38-
$$$ilm-gs-create-the-data-stream$$$
42+
Each action has options you can use to specify index behavior and characteristics like:
3943

40-
$$$ilm-gs-check-progress$$$
44+
* The maximum shard size, number of documents, or age at which you want to roll over to a new index.
45+
* The point at which the index is no longer being updated and the number of primary shards can be reduced.
46+
* When to force a merge to permanently remove documents marked for deletion.
47+
* The point at which the index can be moved to less performant hardware.
48+
* The point at which the availability is not as critical and the number of replicas can be reduced.
49+
* When the index can be safely deleted.
4150

42-
$$$ilm-gs-alias-apply-policy$$$
51+
For example, if you are indexing metrics data from a fleet of ATMs into Elasticsearch, you might define a policy that says:
4352

44-
$$$ilm-gs-alias-check-progress$$$
53+
1. When the total size of the index’s primary shards reaches 50GB, roll over to a new index.
54+
2. Move the old index into the warm phase, mark it read only, and shrink it down to a single shard.
55+
3. After 7 days, move the index into the cold phase and move it to less expensive hardware.
56+
4. Delete the index once the required 30 day retention period is reached.
57+
58+
**Learn about all available actions in [Index lifecycle actions](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-actions.html).**
59+
60+
## Create and manage {{ilm-init}} policies
61+
62+
You can create and manage index lifecycle policies through [{{kib}} Management](/manage-data/lifecycle/index-lifecycle-management/index-management-in-kibana.md) or the [{{ilm-init}} APIs](https://www.elastic.co/docs/api/doc/elasticsearch/v8/group/endpoint-ilm). For more details on creating and managing index lifecycle policies refer to:
63+
64+
* [Configure a lifecycle policy](/manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md)
65+
* [Update a lifecycle policy](/manage-data/lifecycle/index-lifecycle-management/policy-updates.md)
66+
* [Start and stop index lifecycle management](/manage-data/lifecycle/index-lifecycle-management/start-stop-index-lifecycle-management.md)
67+
* [Restore a managed data stream or index](/manage-data/lifecycle/index-lifecycle-management/restore-managed-data-stream-index.md)
68+
* [Customize built-in policies](/manage-data/lifecycle/index-lifecycle-management/tutorial-customize-built-in-policies.md)
69+
70+
Default {{ilm}} policies are created automatically when you use {{agent}}, {{beats}}, or the {{ls}} {{es}} output plugin to send data to the {{stack}}.
71+
72+
![index lifecycle policies](../../images/elasticsearch-reference-index-lifecycle-policies.png)
73+
74+
::::{tip}
75+
To automatically back up your indices and manage snapshots, use [snapshot lifecycle policies](/deploy-manage/tools/snapshot-and-restore/create-snapshots.md#automate-snapshots-slm).
76+
::::
77+
78+
## Migrate to {{ilm-init}}
79+
80+
For existing hot-warm deployments that are currently using index curation, migrating to ILM gives you more fine-grained control over the lifecycle of each index. Read more in:
81+
82+
* [Manage existing indices](/manage-data/lifecycle/index-lifecycle-management/manage-existing-indices.md)
83+
* [Migrate to index lifecycle management](/manage-data/lifecycle/index-lifecycle-management/migrate-index-management.md)
84+
* [Migrate index allocation filters to node roles](/manage-data/lifecycle/index-lifecycle-management/migrate-index-allocation-filters-to-node-roles.md)

manage-data/lifecycle/index-lifecycle-management/concepts.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
navigation_title: Configure a policy
23
mapped_pages:
34
- https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-lifecycle-policy.html
45
---
@@ -18,7 +19,6 @@ When you enable {{ilm}} for {{beats}} or the {{ls}} {{es}} output plugin, the ne
1819
::::
1920

2021

21-
2222
## Create lifecycle policy [ilm-create-policy]
2323

2424
To create a lifecycle policy from {{kib}}, open the menu and go to **Stack Management > Index Lifecycle Policies**. Click **Create policy**.

raw-migrated-files/cloud/cloud/ec-migrate-index-management.md renamed to manage-data/lifecycle/index-lifecycle-management/migrate-index-management.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
# Migrate to index lifecycle management [ec-migrate-index-management]
1+
---
2+
mapped_pages:
3+
- https://www.elastic.co/guide/en/cloud-enterprise/current/ece-migrate-index-management.html
4+
- https://www.elastic.co/guide/en/cloud/current/ec-configure-index-management.html
5+
- https://www.elastic.co/guide/en/cloud/current/ec-migrate-index-management.html
6+
---
7+
8+
# Migrate to index lifecycle management
29

310
::::{important}
411
Index curation is deprecated. Any deployments using index curation are prompted to migrate to ILM.
512
::::
613

7-
814
The index lifecycle management (ILM) feature of the {{stack}} provides an integrated and streamlined way to manage time-based data, making it easier to follow best practices for managing your indices. Compared to index curation, migrating to ILM gives you more fine-grained control over the lifecycle of each index.
915

1016
For existing hot-warm deployments that are currently using index curation, there are a couple of options for migrating to index lifecycle management (ILM). You can:
1117

1218
* Use the migration process in the console to change an existing deployment to ILM.
1319
* Take a snapshot and restore your data to a new Elastic Stack deployment that has ILM enabled.
1420

15-
To learn more about configuring index lifecycle management for Elasticsearch Service or about all of the features that are available with ILM, see:
16-
17-
* [Create your index lifecyle policy](https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-lifecycle-policy.html)
18-
* [Managing the index lifecycle](https://www.elastic.co/guide/en/elasticsearch/reference/current/index-lifecycle-management.html)
19-
2021
To configure ILM Migration in the console:
2122

23+
::::{tab-set}
24+
25+
:::{tab-item} {{ech}}
2226
1. Log in to the [Elasticsearch Service Console](https://cloud.elastic.co?page=docs&placement=docs-body).
2327
2. From the **Deployments** page, select your deployment.
2428

@@ -27,12 +31,25 @@ To configure ILM Migration in the console:
2731
3. Near the top of the deployment overview, you should get a message to migrate from index curation to index lifecycle management (ILM) along with a **Start migration** button.
2832
4. Select which index curation pattern you wish to migrate.
2933
5. Set the ILM policy name for each data view (formerly *index pattern*).
34+
:::
35+
36+
:::{tab-item} Elastic Cloud Enterprise
37+
1. [Log into the Cloud UI](../../../deploy-manage/deploy/cloud-enterprise/log-into-cloud-ui.md).
38+
2. From the **Deployments** page, select your deployment.
39+
40+
On the deployments page you can narrow your deployments by name, ID, or choose from several other filters. To customize your view, use a combination of filters, or change the format from a grid to a list.
41+
42+
3. Near the top of the deployment overview, you should get a message to migrate from index curation to index lifecycle management (ILM) along with a **Start migration** button.
43+
4. Select which index curation pattern you wish to migrate.
44+
5. Set the ILM policy name for each data view (formerly *index pattern*).
45+
:::
46+
47+
::::
3048

3149
::::{note}
3250
Beginning with Elastic Stack version 8.0, Kibana *index patterns* have been renamed to *data views*. To learn more, check the Kibana [What’s new in 8.0](https://www.elastic.co/guide/en/kibana/8.0/whats-new.html#index-pattern-rename) page.
3351
::::
3452

35-
3653
1. Set the shard allocation attribute for the data view.
3754

3855
* You can set different node attributes per data view to allow for more in-depth configuration in Kibana, or
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
---
2-
navigation_title: "Policy updates"
2+
navigation_title: "Update a policy"
33
mapped_pages:
44
- https://www.elastic.co/guide/en/elasticsearch/reference/current/update-lifecycle-policy.html
55
---
66

7-
8-
9-
# Policy updates [update-lifecycle-policy]
7+
# Update a lifecycle policy
108

119

1210
You can change how the lifecycle of an index or collection of rolling indices is managed by modifying the current policy or switching to a different policy.
@@ -16,7 +14,7 @@ To ensure that policy updates don’t put an index into a state where it can’t
1614
When the index advances to the next phase, it uses the phase definition from the updated policy.
1715

1816

19-
## How changes are applied [ilm-apply-changes]
17+
## How changes are applied [ilm-apply-changes]
2018

2119
When a policy is initially applied to an index, the index gets the latest version of the policy. If you update the policy, the policy version is bumped and {{ilm-init}} can detect that the index is using an earlier version that needs to be updated.
2220

@@ -25,7 +23,7 @@ Changes to `min_age` are not propagated to the cached definition. Changing a pha
2523
For example, if you create a policy that has a hot phase that does not specify a `min_age`, indices immediately enter the hot phase when the policy is applied. If you then update the policy to specify a `min_age` of 1 day for the hot phase, that has no effect on indices that are already in the hot phase. Indices created *after* the policy update won’t enter the hot phase until they are a day old.
2624

2725

28-
## How new policies are applied [ilm-apply-new-policy]
26+
## How new policies are applied [ilm-apply-new-policy]
2927

3028
When you apply a different policy to a managed index, the index completes the current phase using the cached definition from the previous policy. The index starts using the new policy when it moves to the next phase.
3129

manage-data/lifecycle/index-lifecycle-management/start-stop-index-lifecycle-management.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
navigation_title: Start and stop {{ilm-init}}
23
mapped_pages:
34
- https://www.elastic.co/guide/en/elasticsearch/reference/current/start-stop-ilm.html
45
---
@@ -9,13 +10,13 @@ By default, the {{ilm-init}} service is in the `RUNNING` state and manages all i
910

1011
You can stop {{ilm}} to suspend management operations for all indices. For example, you might stop {{ilm}} when performing scheduled maintenance or making changes to the cluster that could impact the execution of {{ilm-init}} actions.
1112

12-
::::{important}
13+
::::{important}
1314
When you stop {{ilm-init}}, [{{slm-init}}](../../../deploy-manage/tools/snapshot-and-restore/create-snapshots.md#automate-snapshots-slm) operations are also suspended. No snapshots will be taken as scheduled until you restart {{ilm-init}}. In-progress snapshots are not affected.
1415
::::
1516

1617

1718

18-
## Get {{ilm-init}} status [get-ilm-status]
19+
## Get {{ilm-init}} status [get-ilm-status]
1920

2021
To see the current status of the {{ilm-init}} service, use the [Get Status API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status):
2122

@@ -32,7 +33,7 @@ Under normal operation, the response shows {{ilm-init}} is `RUNNING`:
3233
```
3334

3435

35-
## Stop {{ilm-init}} [stop-ilm]
36+
## Stop {{ilm-init}} [stop-ilm]
3637

3738
To stop the {{ilm-init}} service and pause execution of all lifecycle policies, use the [Stop API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-stop):
3839

@@ -57,7 +58,7 @@ Once all policies are at a safe stopping point, {{ilm-init}} moves into the `STO
5758
```
5859

5960

60-
## Start {{ilm-init}} [_start_ilm_init]
61+
## Start {{ilm-init}} [_start_ilm_init]
6162

6263
To restart {{ilm-init}} and resume executing policies, use the [Start API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-start). This puts the {{ilm-init}} service in the `RUNNING` state and {{ilm-init}} begins executing policies from where it left off.
6364

0 commit comments

Comments
 (0)