概述supervisord-monitor监控多个linux主机上supervisord进程管理的所有子进程、基于php开发,web方式管理进程,如启动、关闭、重启、查看子进程运行情况等 。
文章插图
部署 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
【跨Linux服务器主机,可视化管理进程工具?】
推荐阅读
- linux 查看磁盘使用情况
- 内存ECC是什么意思?服务器内存ECC和RECC之间能否兼容及区别科普
- Linux的shell提示符是可以自定义的
- linux最好用的资源监控工具-glances
- 云服务器怎么安装tomcat
- Linux服务器上同时部署多个Tomcat
- 为什么云服务器很少担心硬盘损坏?RAID技术简介
- Web服务器管理软件 goPanel 2
- 邮箱服务器的IP地址被加入黑名单,无法往国外发邮件怎么办
- linux命令监测网址是否正常访问