在 Debian 系统上启动 Filebeat 通常有以下几种方式,取决于你是通过 官方仓库/APT 安装 还是 二进制包/TAR 包 安装的。
如果你是用如下方式安装的:
sudo apt install filebeat
sudo systemctl start filebeat
sudo systemctl enable filebeat
sudo systemctl status filebeat
sudo journalctl -u filebeat -f
如果你下载的是官方 tar.gz 包,例如:
tar -xzf filebeat-8.x.x-linux-x86_64.tar.gz
cd filebeat-8.x.x-linux-x86_64
./filebeat test config
./filebeat -e -c filebeat.yml
nohup ./filebeat -e -c filebeat.yml > filebeat.log 2>&1 &
sudo systemctl reload filebeat
sudo systemctl stop filebeat
sudo systemctl restart filebeat
配置文件位置(APT)
/etc/filebeat/filebeat.yml
权限问题
adm 组:sudo usermod -aG adm filebeat
首次启动建议测试
sudo filebeat test config
sudo filebeat test output
如果你愿意,可以告诉我:
我可以帮你具体排查。