sudo yum install filebeat。/etc/filebeat/filebeat.yml,在filebeat.inputs中指定应用日志路径,如paths: ["/var/log/myapp/*.log"]。output.elasticsearch中设置Elasticsearch地址,如hosts: ["localhost:9200"]。sudo systemctl start filebeat并设置开机自启sudo systemctl enable filebeat。sudo journalctl -u filebeat -f查看日志,或在Kibana中确认数据是否正常接收。