温馨提示×

centos filebeat怎么停止

小樊
53
2026-10-20 11:43:33
栏目: 智能运维

在 CentOS 上停止 Filebeat,常见有几种方式,取决于你的安装和启动方式。


一、使用 systemd(最常见,推荐)

如果你是 CentOS 7/8/Stream,Filebeat 一般是用 systemd 管理的:

sudo systemctl stop filebeat

查看状态:

sudo systemctl status filebeat

禁止开机启动(可选):

sudo systemctl disable filebeat

二、使用 service 命令(老版本 CentOS 6)

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 是怎么启动的,可以告诉我:

  • CentOS 版本
  • 是否用 rpm 安装
  • 是否是容器/K8s

我可以帮你精确判断。

0 踩