文章目录
1、安装
1、下载filebeat
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-8.4.0-linux-x86_64.tar.gz
2、上传服务器,解压
tar -zxvf filebeat-8.4.0-linux-x86_64.tar.gz
cd filebeat-8.4.0-linux-x86_64
2、配置
日志源使用docker软链接方式
- 开启软链接 symlinks: true
- 软链接路径 paths: /var/log/containers/*.log
修改filebeat.yml
# ============================== Filebeat inputs ===============================
filebeat.inputs:
- type: container
symlinks: true
containers.ids:
- "*"
id: my-filestream-id
enabled: true
paths:
- /var/log/containers/*.log
#- /data/docker/containers/*/*-json.log