生成supervisor配置文件
echo_supervisord_conf > supervisord.conf
vi supervisord.conf
[inet_http_server] ;HTTP服務器,提供web管理界面
port=127.0.0.1:9001 ;Web管理后臺運行的IP和端口,如果開放到公網(wǎng),需要注意安全性
username=user ;登錄管理后臺的用戶名
password=123 ;登錄管理后臺的密碼
[program:logstash]
environment=LS_HEAP_SIZE=5000m
directory=/home/logstash/logstash-5.6.3
command=/home/logstash/logstash-5.6.3/bin/logstash -f /home/logstash/logstash-5.6.3/config/logstash.conf -w 10 -l /home/logstash/logstash-5.6.3/logs; 程序啟動命令
[program:xx]
......
啟動supervisor
supervisord -c supervisord.conf
用supervisorctl或web界面即可管理進程
技術分享離不開您的支持,您的支持是我源源不斷的動力。

微信

支付寶