在 Debian 系统上,Filebeat 通常是以 systemd 服务 方式运行的(如果是官方 deb 包安装)。你可以用下面几种方式查看它的运行状态。
systemctl status filebeat
输出中重点关注:
active (running) → 正在运行inactive (dead) → 已停止failed → 启动失败sudo systemctl start filebeat
sudo systemctl stop filebeat
sudo systemctl restart filebeat
sudo systemctl enable filebeat
ps aux | grep filebeat
或:
pgrep -a filebeat
journalctl -u filebeat -f
查看最近 100 行:
journalctl -u filebeat -n 100
默认可能在:
/var/log/filebeat/filebeat
sudo filebeat test config
sudo filebeat test output
sudo filebeat monitor
(部分版本支持)
或者查看 registry 文件是否更新:
ls -l /var/lib/filebeat/registry
如果你愿意,可以贴一下 systemctl status filebeat 或 journalctl -u filebeat 的输出,我可以帮你具体分析。