<返回更多

跨Linux服务器主机,可视化管理进程工具?

2019-10-11    
加入收藏

概述

supervisord-monitor监控多个linux主机上supervisord进程管理的所有子进程、基于php开发,web方式管理进程,如启动、关闭、重启、查看子进程运行情况等。

跨Linux服务器主机,可视化管理进程工具?

部署 supervisord-monitor 管理程序

1.开启supervisor的web管理端口

vim /etc/supervisord.conf

[inet_http_server]

port=0.0.0.0:9001

username=admin

password=password

至于supervisor如何管理子进程,请参考我的另一篇文章:Linux进程后台运行方式?

2.下载supervisord-monitor前端php文件:

cd /usr/local/Nginx/html/

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

mv supervisord-monitor supervisord

3.编辑php配置文件,添加被监控主机

vim /usr/local/nginx/html/supervisord/Application/config/supervisor.php

$config['supervisor_servers'] = array(

'AliYunWayGit' => array(

'url' => 'http://192.168.31.100/RPC2',

'port' => '9001',

'username' => 'admin',

'password' => 'password'

),

'HomeTestWayGit' => array(

'url' => 'http://192.168.31.101/RPC2',

'port' => '9001',

'username' => 'admin',

'password' => 'password'

),

......

);

4.Nginx配置文件:

server {

listen 80;

server_name supervisord-monitor.test.com;

set $web_root /usr/local/nginx/html/supervisord/public_html;

root $web_root;

index index.php index.html index.htm;

location / {

try_files $uri $uri/ /index.php;

}

location ~ /*.php$ {

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $web_root$fastcgi_script_name;

fastcgi_param SCHEME $scheme;

include fastcgi_params;

fastcgi_pass 127.0.0.1:9000;

}

access_log /usr/local/nginx/logs/xxx.log;

error_log /usr/local/nginx/logs/xxx_error.log;

}

5.重载nginx使配置生效

nginx -s reload

6.supervisord-monitor管理界面访问

http://supervisord-monitor.test.com

声明:本站部分内容来自互联网,如有版权侵犯或其他问题请与我们联系,我们将立即删除或处理。
▍相关推荐
更多资讯 >>>