1.supervisord安装步骤
yum -y install supervisord
2.监控logstash配置
首先要说明的就是使用yum 安装logstash,配置文件中加入command=/etc/init.d/logstash start会报
Exited too quickly (process log may have details)
通过查询发现service 启动程序是以daemon来启动的,不能使用 supervisord监控,所以要根据具体配置进行修改为以下内容
[program:logstash] user=logstash command=/opt/logstash/bin/logstash -f /etc/logstash/conf.d/ -l /var/log/logstash/logstash.log -b 2500 -w 4 如果需要调节LS_HEAP_SIZE的大小,需要在/opt/logstash/bin/logstash加入 LS_HEAP_SIZE=xx即可
然后/etc/init.d/supervisord start,使用
#supervisorctl logstash RUNNING pid 31654, uptime 0:44:04 supervisor>