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

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

游戏|数码彩彩2024-03-23 7:39:44385A+A-

概述

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

点击这里复制本文地址 版权声明:本文内容由网友提供,该文观点仅代表作者本人。本站(https://www.angyang.net.cn)仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

昂扬百科 © All Rights Reserved.  渝ICP备2023000803号-3网赚杂谈