1、下载安装
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.3.0-linux-x86_64.tar.gz
tar xzvf filebeat-7.3.0-linux-x86_64.tar.gz
2、修改配置文件 vim filebeat.yml
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/*.log
setup.kibana:
host: "localhost:5601"
output.elasticsearch:
hosts: ["localhost:9200"]
3、启动
控制台启动,方便调试
./filebeat -e -c filebeat.yml
调试完成,后台启动Filebeat
nohup ./filebeat -e -c filebeat.yml > /de