Filebeat启动失败的问题
ELK安装过程遇到的问题
在安装ELK的过程中用到了Filebeat,按照官网教程一路下来,(只是在写入es时,自定义了index)在最后启动服务的时候,启动失败。
通过查看日志找到了原因:
journalctl -u filebeat.service
详解失败原因如下:

从日志中我们可以看出:在设置了index的时候,我们就必须要设置以下两项
setup.template.name: "demo"
109 setup.template.pattern: "demo-*"
设置完这两项后,服务可以起来,但发现index并未按照自定义的格式,仍然使用的是系统默认的格式!
系统默认格式为:
filebeat-%{[agent.version]}-*
于是又开始了无休止的查找官网文档,最终找到了原因,请看如下官网原文:
The index name to write events to when you’re using daily indices. The
default is “filebeat-%{[agent.version]}-%{+yyyy.MM.dd}”, for example,
“filebeat-7.12.0-2021-04-21”. If you change this setting, you also
need to configure the setup.template.name and setup.template.pattern
options (see Elasticsearch index template).

本文讲述了在ELK安装过程中,使用Filebeat时遇到的启动失败问题,关键在于设置index时需配合ILM设置。解决方法包括配置setup.template.name和pattern,并确保在ILM禁用时生效。
最低0.47元/天 解锁文章
827

被折叠的 条评论
为什么被折叠?



