在Debian上選擇Filebeat輸出插件,需根據實際需求從官方支持的插件中挑選,以下是常見插件及配置要點:
output.elasticsearch: { hosts: ["localhost:9200"], index: "filebeat-%{+yyyy.MM.dd}" }。output.logstash: { hosts: ["localhost:5044"] }。output.kafka: { hosts: ["kafka:9092"], topic: "filebeat" }。output.redis: { hosts: ["redis:6379"], key: "filebeat" }。output.console: {}。選擇建議:
配置時需編輯/etc/filebeat/filebeat.yml,重啟服務生效。非官方插件(如HTTP)需自行開發,建議優先使用官方支持的插件以確保穩定性。