转载请标明出处:
http://blog.csdn.net/qq_27818541/article/details/108836968
本文出自:【BigManing的博客】
Setup ILM
从7.0版开始,Filebeat在连接到支持生命周期管理的群集时默认使用索引生命周期管理。Filebeat自动加载默认策略并将其应用于Filebeat创建的任何索引。
index lifecycle management (ILM)
索引生命管理,如果它启用了,那么会忽略output.elasticsearch.index
里面的设置。
新特性:当现有索引达到指定的大小或期限时,使用索引生命周期策略自动将过渡到新索引
常规配置
setup.ilm.enabled: auto
setup.ilm.rollover_alias: "filebeat" # 前缀
# filebeat-2020.09.28-000001
setup.ilm.pattern: "{now/d}-000001"
需要了解Date math
详细配置
# Configure index lifecycle management (ILM). These settings create a write
# alias and add additional settings to the index template. When ILM is enabled,
# output.elasticsearch.index is ignored, and the write alias is used to set the
# index name.# Enable ILM support. Valid values are true, false, and auto. When set to auto
# (the default), the Beat uses index lifecycle management when it connects to a
# cluster that supports ILM; otherwise, it creates daily indices.
setup.ilm.enabled: auto# Set the prefix used in the index lifecycle write alias name. The default alias
# name is 'filebeat-%{[agent.version]}'.
setup.ilm.rollover_alias: "filebeat"# Set the rollover index pattern. The default is "%{now/d}-000001".
# filebeat-2020.09.28-000001
setup.ilm.pattern: "{now/d}-000001"# Set the lifecycle policy name. The default policy name is
# 'filebeat'.
setup.ilm.policy_name: "mypolicy"# The path to a JSON file that contains a lifecycle policy configuration. Used
# to load your own lifecycle policy.
setup.ilm.policy_file:# Disable the check for an existing lifecycle policy. The default is true. If
# you disable this check, set setup.ilm.overwrite: true so the lifecycle policy
# can be installed.
setup.ilm.check_exists: true# Overwrite the lifecycle policy at startup. The default is false.
setup.ilm.overwrite: false