-
Notifications
You must be signed in to change notification settings - Fork 159
Expand "Configure a lifecycle policy" docs #1906
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
Merged
Merged
Changes from 33 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
a288748
Rework 'Configure a lifecycle policy'
kilfoyle 694c55e
Expand 'Configure a lifecycle policy' docs
kilfoyle 9ccf2be
typo fix
kilfoyle a9ebfce
Updates for review feedback
kilfoyle d6c1431
Small fix
kilfoyle 51d70a7
Apply Stef's suggestions and fix links
kilfoyle 689b1f8
one more link fix
kilfoyle a8a5c3f
Small fixes
kilfoyle 365caef
Update 'View ILM status' example to System Int indices
kilfoyle 94494e2
Add note about datastream lifecycle management at top
kilfoyle 7123e9b
Merge branch 'main' into 1572/ilm-create-template
kilfoyle b9f9662
Add note about built-in ILM policies
kilfoyle 4f0e90b
Fix list of topics on ILM main page; fix note about custom ILM
kilfoyle a732e04
Merge branch 'main' into 1572/ilm-create-template
kilfoyle 0e1472f
Update manage-data/lifecycle/index-lifecycle-management/policy-apply.md
kilfoyle 1f3f91e
Fix link
kilfoyle 91d1515
Fix warning about managed templates; add link to tutorial
kilfoyle a026aa4
Provide an example (downsampling) of an index action
kilfoyle 856c9b7
improve screenshot; add downsample graphic
kilfoyle ccc114f
Add steps for adding ILM policy to existing index templates
kilfoyle dc11cd9
Fix recommendation about Beats, Agent, LS ILM
kilfoyle 7e67f28
fixup
kilfoyle 307e512
Change 'age, size, or number of docs' to 'age' for clarity
kilfoyle f82f365
fixup
kilfoyle dee00a8
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 0105a9a
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle b548238
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 52a9c48
Move data retention mention into note
kilfoyle 3cf8293
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 3086179
Update manage-data/lifecycle/index-lifecycle-management/policy-update…
kilfoyle 5b31625
Update manage-data/lifecycle/index-lifecycle-management/policy-update…
kilfoyle 9f1756c
Update manage-data/lifecycle/index-lifecycle-management/policy-update…
kilfoyle 4ad3550
Merge branch 'main' into 1572/ilm-create-template
kilfoyle ce29ff3
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle da40e86
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle d45a1b1
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle f1ad284
Update manage-data/lifecycle/index-lifecycle-management/policy-update…
kilfoyle 90f0152
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 6c1d0bd
Update manage-data/lifecycle/index-lifecycle-management/policy-update…
kilfoyle e1492ea
Update manage-data/lifecycle/index-lifecycle-management/policy-update…
kilfoyle 81815d2
Update manage-data/lifecycle/index-lifecycle-management/policy-view-s…
kilfoyle 93860ef
Update manage-data/lifecycle/index-lifecycle-management/policy-view-s…
kilfoyle 81fb71e
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 16611b3
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle f7c0028
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle a4581cb
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 8ea15ea
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle df9c050
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 16ccf4c
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 8200f2e
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 61025b4
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle d74c405
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 262e81b
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 4da2a07
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 75ace9a
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle db2f6a7
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 1ffaa4b
Update manage-data/lifecycle/index-lifecycle-management/configure-lif…
kilfoyle 8f2d4c4
Update manage-data/lifecycle/index-lifecycle-management/policy-apply.md
kilfoyle 7cc578c
Update manage-data/lifecycle/index-lifecycle-management/policy-update…
kilfoyle 3e5bc11
Improve emphasis for aspects
kilfoyle 71c2c5d
Merge branch 'main' into 1572/ilm-create-template
kilfoyle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+118 KB
manage-data/images/elasticsearch-reference-create-policy-downsample.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+257 KB
(170%)
manage-data/images/elasticsearch-reference-create-policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+592 KB
(1500%)
manage-data/images/elasticsearch-reference-create-template-wizard-my_template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
294 changes: 162 additions & 132 deletions
294
manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
manage-data/lifecycle/index-lifecycle-management/policy-apply.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
navigation_title: Manually apply a policy to an index | ||
applies_to: | ||
stack: ga | ||
products: | ||
- id: elasticsearch | ||
--- | ||
|
||
# Manually apply a lifecycle policy to an index [apply-policy-manually] | ||
|
||
When you create new {{es}} index you can use an index template to apply the lifecycle policy by which the index will be managed. This process is described in [Configure a lifecycle policy](/manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md). | ||
|
||
You can also manually apply a lifecycle policy to an existing index, as described on this page. If an index is currently managed by an ILM policy you must first remove that policy before applying a new one. Refer to [Switch to a different lifecycle policy](/manage-data/lifecycle/index-lifecycle-management/policy-updates.md#switch-lifecycle-policies) for details. | ||
|
||
You can do this procedure in {{kib}} or using the {{es}} API. | ||
|
||
::::{warning} | ||
Do not manually apply a policy that uses the rollover action. Policies that use rollover must be applied by the [index template](/manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md#apply-policy-template). Otherwise, the policy is not carried forward when the rollover action creates a new index. | ||
:::: | ||
|
||
::::{tab-set} | ||
:group: kibana-api | ||
:::{tab-item} {{kib}} | ||
:sync: kibana | ||
|
||
To apply a lifecycle policy to an existing index: | ||
|
||
1. Go to **Stack Management > Index Management**. In the **Indices** tab, search for and select an index. Enable **Include hidden indices** to see the full list of indices. | ||
|
||
1. From the **Manage index** dropdown menu select **Add lifecycle policy**. | ||
|
||
1. Choose a lifecycle policy and confirm your changes. | ||
|
||
Once the policy is applied, {{ilm-init}} starts managing the index immediately. | ||
kilfoyle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
::: | ||
|
||
:::{tab-item} API | ||
:sync: api | ||
Use the [update settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings) to apply a lifecycle policy to an index. | ||
kilfoyle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```console | ||
PUT my-index/_settings | ||
{ | ||
"index": { | ||
"lifecycle": { | ||
"name": "my_ilm_policy" | ||
} | ||
} | ||
} | ||
``` | ||
kilfoyle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
You can apply the same policy to multiple indices by using wildcards in the index name when you call the API. | ||
|
||
```console | ||
PUT my-indices*/_settings | ||
{ | ||
"index": { | ||
"lifecycle": { | ||
"name": "my_ilm_policy" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
::::::{warning} | ||
Be careful not to inadvertently match indices that you don’t want to modify. | ||
:::::: | ||
|
||
Once the policy is applied, {{ilm-init}} starts managing the index immediately. | ||
|
||
::: | ||
:::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.