在 CentOS 上查看 Filebeat 运行状态,常用以下几种方式,取决于你是怎么安装的(systemd / 二进制直接运行)。
systemctl status filebeat
✅ 正常输出示例:
● filebeat.service - Filebeat sends log files to Elasticsearch or Logstash
Loaded: loaded (/usr/lib/systemd/system/filebeat.service; enabled)
Active: active (running) since ...
❌ 异常状态:
inactive (dead)failedsystemctl start filebeat
systemctl stop filebeat
systemctl restart filebeat
systemctl enable filebeat
journalctl -u filebeat -f
tail -f /var/log/filebeat/filebeat
ps -ef | grep filebeat
或:
pgrep -a filebeat
filebeat test config
filebeat test output
如果你的 filebeat.yml 开启了 HTTP 监控:
http.enabled: true
http.port: 5066
查看:
curl http://localhost:5066/stats
journalctl -u filebeatfilebeat.yml 中 paths 和 outputls -l /var/log/xxx.log
如果你愿意,可以把:
systemctl status filebeat 的输出filebeat.yml 关键配置贴出来,我可以帮你具体看问题。