【问题标题】:Set retention days to a Elasticsearch indices, using kibana or Elasticsearch itself使用 kibana 或 Elasticsearch 本身将保留天数设置为 Elasticsearch 索引
【发布时间】:2022-01-20 10:10:15
【问题描述】:

我有一些索引必须应用保留策略。

Indice-a-date_of_creation 30 天
Indice-b-date_of_creation 180 天

有没有办法为 Kibana 上的这些指数设置保留政策? 如果没有,我该如何在 elasticsearch 上设置它们?

【问题讨论】:

    标签: python elasticsearch kibana retention elasticsearch-indices


    【解决方案1】:

    从 ELK 6.6 (XPack) 开始有了索引生命周期管理。

    在 ELK 7.16 中,您可以在 kibana 中使用索引生命周期策略

    堆栈管理 > 索引生命周期策略。单击创建策略。


    在旧版本中,因为您的索引包含时间戳,您可以编写脚本来生成要删除的索引列表,然后在此类列表上运行循环并调用 curl -XDELETE

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-03
      • 2013-05-06
      • 1970-01-01
      • 2017-07-04
      • 1970-01-01
      相关资源
      最近更新 更多