身安不如心安,屋宽不如心宽 。

curator 只针对前几天的index进行操作的办法

Elasticsearch | 作者 katios | 发布于2017年09月18日 | 阅读数:2342

最近几天的数据量特别大,需要对其移动shards.
curator中可以使用
filters:
- filtertype: pattern
kind: prefix
value: logstash-
exclude:
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 10


但是这样把10天之前的全部都操作了,能不能只选中第前10天道第前5天的index
已邀请:

katios

赞同来自: EricOps

自问自答一个。
   filters:
     - filtertype: pattern
       kind: prefix
       value: logstash-
     - filtertype: period
       source: name
       range_from : -1
       range_to : -1
       timestring: '%Y.%m.%d'
       unit: days
 

要回复问题请先登录注册