elasticsearch rollover
Rollover an index alias or data stream
Description
Rollover an index alias or data stream to create a new index
Synopsis
elasticsearch rollover
[--site <site>]
[--cluster <cluster>]
<target>
[--target_index <target_index>]
[--max_age <max_age>]
[--max_docs <max_docs>]
[--max_size <max_size>]
[--max_primary_shard_size <max_primary_shard_size>]
Arguments
site
- (string)
Site where this command will be executed
Example: --site "site-1"
Default: input.site
Attributes: optional
cluster
- (string)
Name of elastic search cluster
Example: --cluster "elastic-default"
Default: elastic-default
Attributes: optional
target
- (string)
Name of the rollover target index alias or data stream
Example: "students"
Default: _None_
Attributes: required
target_index
- (string)
Name for the new index
Example: --target_index "index-01"
Default: _None_
Attributes: optional
max_age
- (duration)
rollover after the maximum elapsed time from index creation is reached
Example: --max_age "5d"
Default: _None_
Attributes: optional
max_docs
- (int)
rollover after the specified maximum number of documents is reached
Example: --max_docs 500
Default: _None_
Attributes: optional
max_size
- (string)
rollover when the index reaches a certain size.
Example: --max_size "5mb"
Default: _None_
Attributes: optional
max_primary_shard_size
- (string)
rollover when the largest primary shard in the index reaches a certain size
Example: --max_primary_shard_size "5mb"
Default: _None_
Attributes: optional
Examples
elasticsearch rollover "students" --target_index "index-01" --max_age "5d" --max_docs 500 --max_size "5mb" --max_primary_shard_size "5mb"
Access Control
To use this command, you need access to the following:
Field | Value |
---|---|
Action | "create" |
Service Type | "elasticsearch" |
Service Instance | cluster |
Namespace | |
Object Type | "index" |
Object ID | target |
Please see Access Control for details.