在 Debian 上启动 Filebeat 通常有以下几种方式,取决于你是通过 官方仓库 / apt 安装的,还是 二进制包 / tar.gz 安装的。
sudo systemctl start filebeat
sudo systemctl enable filebeat
sudo systemctl status filebeat
sudo systemctl stop filebeat
sudo systemctl restart filebeat
在启动前,建议先测试配置是否正确:
sudo filebeat test config
sudo filebeat test output
如果你是直接解压 filebeat-*.tar.gz:
./filebeat -e -c filebeat.yml
nohup ./filebeat -e -c filebeat.yml > filebeat.log 2>&1 &
sudo chown root:root /etc/filebeat/filebeat.yml
sudo chmod 600 /etc/filebeat/filebeat.yml
journalctl -u filebeat -f
sudo filebeat modules list
如果你愿意,可以告诉我:
我可以帮你具体排查。