软件测试测试开发IT@程序员猿媛

supervisor管理logstash启动 for cento

2019-03-05  本文已影响0人  沈宥

安装supervisor
yum install epel-release
yum install -y supervisor

修改配置文件:
supervisord.service

一般配置文件所在路径
usr/lib/systemd/system

[program:logstash-nginxaccesslog20]
command=/home/logstash-6.5.4/bin/logstash -f /home/logstash-6.5.4/config/logstash.conf
numprocs=1
autostart=true
autorestart=true
user=root
directory=/home/logstash-6.5.4

启动supervisor服务
sudo systemctl enable supervisord
sudo systemctl start supervisord

若修改supervisord.service后:
sudo systemctl daemon-reload
sudo systemctl restart supervisord

查看是否已经启动(enable为正常启动状态)
systemctl is-enabled supervisord

关闭supervisor服务
systemctl stop supervisord.service

上一篇 下一篇

猜你喜欢

热点阅读