-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Add built-in ILM policies for common user use cases #76791
Merged
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
26ab744
Add built-in ILM policies for common user use cases
dakrone e5c707a
Merge remote-tracking branch 'origin/master' into built-in-ilm-policies
dakrone 2fa74f9
Rename to generic name and add min_age: 2d for policies
dakrone c292e97
Merge branch 'master' into built-in-ilm-policies
elasticmachine 2a285f8
Merge branch 'master' into built-in-ilm-policies
elasticmachine 8aedaa1
Merge branch 'master' into built-in-ilm-policies
elasticmachine 1ce5142
Fix ML qa tests
dakrone b79ac15
Merge remote-tracking branch 'origin/master' into built-in-ilm-policies
dakrone 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
36 changes: 36 additions & 0 deletions
36
x-pack/plugin/core/src/main/resources/180-days-hot-warm-cold.json
This file contains 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,36 @@ | ||
{ | ||
"phases": { | ||
"hot": { | ||
"actions": { | ||
"rollover": { | ||
"max_primary_shard_size": "50gb", | ||
"max_age": "30d" | ||
} | ||
} | ||
}, | ||
"warm": { | ||
"actions": { | ||
"shrink": { | ||
"number_of_shards": 1 | ||
}, | ||
"forcemerge": { | ||
"max_num_segments": 1 | ||
} | ||
} | ||
}, | ||
"cold": { | ||
"min_age": "30d", | ||
"actions": {} | ||
}, | ||
"delete": { | ||
"min_age": "180d", | ||
"actions":{ | ||
"delete": {} | ||
} | ||
} | ||
}, | ||
"_meta": { | ||
"description": "built-in ILM policy using the hot, warm, and cold phases with a retention of 180 days", | ||
"managed": true | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
x-pack/plugin/core/src/main/resources/30-days-hot-warm.json
This file contains 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,32 @@ | ||
{ | ||
"phases": { | ||
"hot": { | ||
"actions": { | ||
"rollover": { | ||
"max_primary_shard_size": "50gb", | ||
"max_age": "30d" | ||
} | ||
} | ||
}, | ||
"warm": { | ||
"actions": { | ||
"shrink": { | ||
"number_of_shards": 1 | ||
}, | ||
"forcemerge": { | ||
"max_num_segments": 1 | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"min_age": "30d", | ||
"actions":{ | ||
"delete": {} | ||
} | ||
} | ||
}, | ||
"_meta": { | ||
"description": "built-in ILM policy using the hot and warm phases with a retention of 30 days", | ||
"managed": true | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
x-pack/plugin/core/src/main/resources/365-days-hot-warm-cold.json
This file contains 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,36 @@ | ||
{ | ||
"phases": { | ||
"hot": { | ||
"actions": { | ||
"rollover": { | ||
"max_primary_shard_size": "50gb", | ||
"max_age": "30d" | ||
} | ||
} | ||
}, | ||
"warm": { | ||
"actions": { | ||
"shrink": { | ||
"number_of_shards": 1 | ||
}, | ||
"forcemerge": { | ||
"max_num_segments": 1 | ||
} | ||
} | ||
}, | ||
"cold": { | ||
"min_age": "30d", | ||
"actions": {} | ||
}, | ||
"delete": { | ||
"min_age": "365d", | ||
"actions":{ | ||
"delete": {} | ||
} | ||
} | ||
}, | ||
"_meta": { | ||
"description": "built-in ILM policy using the hot, warm, and cold phases with a retention of 365 days", | ||
"managed": true | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
x-pack/plugin/core/src/main/resources/7-days-hot-warm.json
This file contains 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,32 @@ | ||
{ | ||
"phases": { | ||
"hot": { | ||
"actions": { | ||
"rollover": { | ||
"max_primary_shard_size": "50gb", | ||
"max_age": "7d" | ||
} | ||
} | ||
}, | ||
"warm": { | ||
"actions": { | ||
"shrink": { | ||
"number_of_shards": 1 | ||
}, | ||
"forcemerge": { | ||
"max_num_segments": 1 | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"min_age": "7d", | ||
"actions":{ | ||
"delete": {} | ||
} | ||
} | ||
}, | ||
"_meta": { | ||
"description": "built-in ILM policy using the hot and warm phases with a retention of 7 days", | ||
"managed": true | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
x-pack/plugin/core/src/main/resources/90-days-hot-warm-cold.json
This file contains 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,36 @@ | ||
{ | ||
"phases": { | ||
"hot": { | ||
"actions": { | ||
"rollover": { | ||
"max_primary_shard_size": "50gb", | ||
"max_age": "30d" | ||
} | ||
} | ||
}, | ||
"warm": { | ||
"actions": { | ||
"shrink": { | ||
"number_of_shards": 1 | ||
}, | ||
"forcemerge": { | ||
"max_num_segments": 1 | ||
} | ||
} | ||
}, | ||
"cold": { | ||
"min_age": "30d", | ||
"actions": {} | ||
}, | ||
"delete": { | ||
"min_age": "90d", | ||
"actions":{ | ||
"delete": {} | ||
} | ||
} | ||
}, | ||
"_meta": { | ||
"description": "built-in ILM policy using the hot, warm, and cold phases with a retention of 90 days", | ||
"managed": true | ||
} | ||
} |
This file contains 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to avoid spelling out which phases we are using in the name of the policy, so that we could later change this, e.g. if we later realize that it would make sense to use
frozen
when users keep data for 365 days?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be nice to avoid those names, but currently we don't have a concept of a "title" of a policy from within ILM or the UI, so if we made those less general, it would be much harder for a user to determine what the policy does (especially since these are intended for users not that familiar with ILM) if we named it even more generic like "365-days".
Do you think the lack of specification for upgrades is better, or would it be better to be more specific so a user can tell what it is doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather like to be less specific so that we can more easily change our mind on what we think are good defaults. Maybe the name could be something like
180-days-default
instead of180-days
to make it clearer that there are multiple ways to retain data for 180 days and that this is just one way of doing it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I've renamed the policies.