[英]Set retention days to a Elasticsearch indices, using kibana or Elasticsearch itself
I have some indices that I have to apply retention policies to.我有一些索引必须应用保留策略。
Indice-a - date_of_creation 30 days索引-a - date_of_creation 30天
Indice-b - date_of_creation 180 days Indice-b - date_of_creation 180 天
Is there a way to set retention policies to those Indices on Kibana?有没有办法为 Kibana 上的这些指数设置保留策略? If not, how can I set them on elasticsearch?
如果没有,我该如何在 elasticsearch 上设置它们?
Since ELK 6.6 (XPack) there is index lifecycle management.从 ELK 6.6 (XPack) 开始,就有了索引生命周期管理。
In the ELK 7.16 you can use Index Lifecycle Policies in kibana在 ELK 7.16 中,您可以在 kibana 中使用索引生命周期策略
Stack Management > Index Lifecycle Policies.
堆栈管理 > 索引生命周期策略。 Click Create policy.
单击创建策略。
In older versions as your indexes contain timestamp you can write script to generate list of indexes to delete and then run loop over such list and call curl -XDELETE在旧版本中,因为您的索引包含时间戳,您可以编写脚本来生成要删除的索引列表,然后在该列表上运行循环并调用 curl -XDELETE
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.