supervisord支持扩展(xml RPC API & Third Party Applications and Libraries)

XML-RPC API Documentation

http://www.supervisord.org/api.html

Third Party Applications and Libraries

http://www.supervisord.org/plugins.html

 

本文尝试一下第三方应用中的Supervisord-Monitor

Install

1.Clone supervisord-monitor to your vhost/webroot:

git clone https://github.com/mlazarov/supervisord-monitor.git

2.Copy application/config/supervisor.php.example to application/config/supervisor.php

cp supervisord-monitor/application/config/supervisor.php.example supervisord-monitor/application/config/supervisor.php

3.Enable/Uncomment inet_http_server (found in supervisord.conf) for all your supervisord servers.

[inet_http_server]
port=*:9001
username="yourusername" password="yourpass"

Do not forget to restart supervisord service after changing supervisord.conf

4.Edit supervisord-monitor configuration file and add all your supervisord servers

vim application/config/supervisor.php

5.Configure your web server to point one of your vhosts to 'public_html' directory. 6.Open web browser and enter your vhost url.

本文的web server使用nginx(同时需要安装php-fpm)

Centos安装php php-fpm 以及 配置nginx

[root@kuber-worker-2 conf]# cat server.conf 
server {
listen 9081;
server_name localhost;
root /home/zyf/supervisord-monitor/public_html;  #supervisord-monitor目录
index index.php;

access_log /usr/local/fountain/3rdparty/nginx/logs/supervisoraccess.log;
error_log  /usr/local/fountain/3rdparty/nginx/logs/supervisorerror.log;

#location = /ENV {
#    allow 127.0.0.1;
#    deny all;
#}

location / {
    try_files $uri $uri/ /index.php;
 }

location ~* \.php$ {
    include fastcgi.conf;
    fastcgi_pass 127.0.0.1:9002;
    fastcgi_index index.php;
}
}

 结果如图:

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值