按时间删除时,有没有办法阻止馆长删除最后一个索引?
actions:
1:
action: delete_indices
description: Delete kube- indices older than 14 days. Ignore the error if there are none and exit cleanly.
options:
disable_action: False
ignore_empty_list: True
filters:
- filtertype: pattern
kind: prefix
value: kube-
- filtertype: age
source: name
direction: older
timestring: '%Y.%m.%d'
unit: days
unit_count: 14
我有这个非常适合检查当前运行的 K8s 集群日志。但是,当我们移动 AWS 区域时,日志名称会更改,例如从 更改kube-eu-west-1-<date>
为kube-eu-west-2-<date>
.
策展人在 14 天后努力清理所有数据。我想要的是防止它删除特定索引的最后一个条目,因此始终记录集群最后一次在该区域中发生的事情。
(它还会“修复”一些写得不太好的代码片段,当他们期望的数据合法地消失时会抛出错误)。