在 CentOS 上查看 Filebeat 状态,常用以下几种方式,取决于它是怎么安装的(systemd / 二进制直接运行)。
systemctl status filebeat
常见状态说明:
active (running):正在运行inactive (dead):未运行failed:启动失败systemctl start filebeat
systemctl stop filebeat
systemctl restart filebeat
systemctl enable filebeat
ps -ef | grep filebeat
或
pgrep -a filebeat
如果有输出,说明进程在运行。
Filebeat 一般 不监听端口,但如果配置了 http.enabled: true:
ss -lntp | grep filebeat
journalctl -u filebeat -f
tail -f /var/log/filebeat/filebeat
filebeat test config
✅ 输出 Config OK 表示配置没问题
filebeat test output
ps -ef | grep filebeat
或进入安装目录:
./filebeat status
systemctl status filebeatjournalctl -u filebeatfilebeat test configfilebeat test output如果你愿意,可以贴一下:
systemctl status filebeat 的输出我可以帮你具体看是什么问题。