forcemerge索引配置文件示例
1、将副本设置为0;
2、forcemerge索引;
3、将副本设置为1;
过滤添加: 前一天的索引
---
actions:
1:
action: replicas
options:
count: 0
wait_for_completion: False
timeout_override:
continue_if_exception: False
filters:
- filtertype: pattern
kind: prefix
value: dtlog
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 1
exclude:
- filtertype: age
source: name
direction: younger
timestring: '%Y.%m.%d'
unit: days
unit_count: 2
exclude:
2:
action: forcemerge
options:
max_num_segments: 1
delay: 10
timeout_override: 21600
continue_if_exception: True
ignore_empty_list: True
filters:
- filtertype: pattern
kind: prefix
value: dtlog
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 1
exclude:
- filtertype: age
source: name
direction: younger
timestring: '%Y.%m.%d'
unit: days
unit_count: 2
exclude:
3:
action: replicas
options:
count: 1
wait_for_completion: False
timeout_override:
continue_if_exception: False
filters:
- filtertype: pattern
kind: prefix
value: dtlog
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 1
exclude:
- filtertype: age
source: name
direction: younger
timestring: '%Y.%m.%d'
unit: days
unit_count: 2
exclude: