滚动操作
action: rollover
description: >-
Rollover the index associated with alias 'aliasname', which should be in the
form of prefix-000001 (or similar), or prefix-YYYY.MM.DD-1.
options:
name: aliasname
conditions:
max_age: 1d
max_docs: 1000000
max_size: 5gb
如果满足所描述的任何条件,此操作将使用 Elasticsearch Rollover API 创建一个新索引。
extra_settings 选项允许添加额外的索引设置(但不能添加 mappings)。这些设置的一个使用示例可能是
action: rollover
description: >-
Rollover the index associated with alias 'aliasname', which should be in the
form of prefix-000001 (or similar), or prefix-YYYY.MM.DD-1.
options:
name: aliasname
conditions:
max_age: 1d
max_docs: 1000000
extra_settings:
index.number_of_shards: 3
index.number_of_replicas: 1
timeout_override:
continue_if_exception: False
disable_action: False
- name 别名
- max_age 触发滚动前允许的最大存活时间。此项必须嵌套在
conditions:下。没有默认值。如果指定了此条件,它必须包含一个值,否则 Curator 会报错。 - max_docs 触发滚动前索引中允许的最大文档数。此项必须嵌套在
conditions:下。没有默认值。如果指定了此条件,它必须包含一个值,否则 Curator 会报错。 - max_size 触发滚动前索引允许的最大大小。此项必须嵌套在
conditions:下。没有默认值。如果指定了此条件,它必须包含一个值,否则 Curator 会报错。
- extra_settings 没有默认值。您可以将任何可接受的索引设置(非 mappings)作为嵌套的 YAML 添加。有关更多信息,请参阅 Create an index API。
- new_index 指定一个新的索引名称。
- timeout_override
- continue_if_exception
- disable_action
提示
有关此操作在 actionfile 中的示例,请参见此处。