在 Debian 上,Filebeat 的配置文件位置主要取决于你是通过哪种方式安装的。
如果你是用 Elastic 官方仓库安装的(apt install filebeat),配置文件通常在:
/etc/filebeat/filebeat.yml
/etc/filebeat/modules.d/
(启用模块示例:filebeat modules enable system)
/usr/bin/filebeatsystemctl status filebeatjournalctl -u filebeat如果是手动 dpkg -i filebeat-*.deb:
✅ 配置路径同样是:
/etc/filebeat/filebeat.yml
如果你是下载 .tar.gz 解压的:
./filebeat.yml (在当前解压目录)
可以用以下命令确认:
filebeat export config
或
systemctl cat filebeat
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/*.log
output.elasticsearch:
hosts: ["localhost:9200"]
如果你愿意,可以告诉我:
我可以直接帮你写一份可用配置。