在 CentOS 上停止 Filebeat,常见有几种方式,取决于你的安装和启动方式。
如果你是 CentOS 7/8/Stream,Filebeat 一般是用 systemd 管理的:
sudo systemctl stop filebeat
查看状态:
sudo systemctl status filebeat
禁止开机启动(可选):
sudo systemctl disable filebeat
sudo service filebeat stop
查看进程:
ps -ef | grep filebeat
停止进程:
sudo kill <pid>
或强制停止:
sudo kill -9 <pid>
ps -ef | grep filebeat
如果没有 filebeat 进程,说明已停止。
docker stop filebeat
或
kubectl delete pod filebeat-xxxxx -n 命名空间
如果你不确定 Filebeat 是怎么启动的,可以告诉我:
我可以帮你精确判断。