Filebeat
注意:与 Filebeat 的集成需要 Manticore Buddy。如果不起作用,请确保 Buddy 已安装。
Filebeat 是一个轻量级的日志数据传输和集中化工具。一旦作为代理安装后,它会监控您指定的日志文件或位置,收集日志事件并将其转发以进行索引,通常发送到 Elasticsearch 或 Logstash。
现在,Manticore 也支持使用 Filebeat 作为处理管道。这允许收集和转换后的数据像发送到 Elasticsearch 一样被发送到 Manticore。目前,支持的所有版本为 7.10 及以上。
Filebeat 配置
以下是与我们示例的 dpkg 日志配合使用的 Filebeat 配置:
filebeat.inputs:
- type: filestream
id: example
paths:
- /var/log/dpkg.log
output.elasticsearch:
hosts: ["http://localhost:9308"]
index: "dpkg_log"
allow_older_versions: true
setup.ilm:
enabled: false
setup.template:
name: "dpkg_log"
pattern: "dpkg_log"Filebeat 版本 >= 8.11 的配置
请注意,Filebeat 版本高于 8.10 的默认启用了输出压缩功能。因此,必须在配置文件中添加 compression_level: 0 选项,以确保与 Manticore 的兼容性:
Filebeat 结果
一旦您使用该配置运行 Filebeat,日志数据将被发送到 Manticore 并正确地被索引。以下是 Manticore 创建的表的最终模式以及插入文档的示例:
最后更新于