如何在 metricbeat 索引中设置正确的时间字符串?

问题描述

我试图在 elasticsearch 索引中设置自定义 metricbeat 索引。

当我在 metricbeat.yml 文件添加如下内容

cabal repl

生成的索引是ghci。但是 curator 中的时间字符串 index: "metricbeat-%{[agent.version]}-%{+yyyy-MM-dd}" setup.template: name: "metricbeat" pattern: "metricbeat-%{[agent.version]}-%{+yyyy-MM-dd}" 与它不匹配并且无法清除索引。

如何制作索引从metricbeat-7.8.0-2021.03.11-000001'%Y.%m.%d'

我什至这样试过

metricbeat-7.8.0-2021.03.11-000001

但索引模式相同。请帮忙解决这个问题。

更新:

策展人配置

metricbeat-7.8.0-2021.03.11

解决方法

索引模式 metricbeat-7.8.0-2021.03.11-000001 表示 metricbeat 正在使用翻转索引。它附加了创建索引的日期和一个递增的数字。这也意味着您的展期指数可能附有 ILM 政策。因此,您应该在文档中阅读 ILM and Curator。要更正这些被过滤的索引,您必须将 allow_ilm_indices: true 添加到配置中的 options