1.解压 filebeat-6.2.4-linux-x86_64.tar.gz
2.移动目录 mv filebeat-6.2.4-linux-x86_64 /usr/local/filebeat
3.创建文件vim filebeat_es.yml 增加以下配置
filebeat.prospectors:
- input_type: log
paths:- /home/*.log #监控目录下所有.log文件
output.elasticsearch:
hosts: [“localhost:9200”]
4.启动 filebeat ./filebeat -e -c filebeat_es.yml 启动成功