使用Docker在弹性堆栈中设置ILM

时间:2019-12-08 12:26:49

标签: elasticsearch logstash filebeat

我在docker上运行了Elastic Stack(版本7.5.0)。我正在尝试创建ILM以在200mb之后删除我的日志。

似乎什么都没发生。

ilm.json

{
    "policy": {
        "phases": {
            "hot": {
                "actions": {
                    "rollover": {
                        "max_size": "200MB"
                    }
                }
            },
            "delete": {
                "min_age": "1d",
                "actions": {
                    "delete": {}
                }
            }
        }
}

filebeat.yml

...

setup.ilm.enabled: true
setup.ilm.rollover_alias: "filebeat"
setup.ilm.pattern: "{now/d}-000001"
setup.ilm.policy_file: "/usr/share/filebeat/ilm.json"
setup.ilm.check_exists: false
setup.ilm.overwrite: true

0 个答案:

没有答案