以下是Debian系统上排查Filebeat故障的常用方法:
查看日志
/var/log/filebeat/filebeat.log,关注ERROR/FATAL级别信息。/var/log/syslog或通过journalctl -u filebeat -f查看服务日志。验证配置文件
/etc/filebeat/filebeat.yml语法:sudo filebeat test config。paths)、输出目标(如Elasticsearch地址、端口)正确,且Filebeat有权限访问。检查进程与资源
ps aux | grep filebeat,确认是否正常运行。top/htop查看CPU、内存占用,排查资源不足问题。排查网络与权限
ping输出服务器地址,telnet或nc测试端口是否可达。ls -l确认配置文件、日志文件权限正确,必要时用chmod/chown调整。sudo ufw allow <端口>。系统级排查
df -h,确保有足够空间。sudo fsck /dev/sdaX(需先卸载分区)。服务管理
sudo systemctl restart filebeat。sudo systemctl status filebeat。高级操作
sudo filebeat test output。参考来源: