目标
实时监控多份日志、合并成一份日志文件
安装配置
官网说的蛮清楚
https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation-configuration.html
- 上述链接的Step 1
- 配置filebeat.yml文件
- ./filebeat setup -e
- ./filebeat -e (运行filebeat)
或者 nohup ./filebeat -e & 后台运行
yml文件配置
需要两部分:input, output
input
监控.log文件的话,参考官方文档的 log.input 部分:https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html
output
输出到文件,参考官方文档的output.file部分: