主机测评网

靠谱VPS推荐

ServerStatus多服务器探针搭建教程

这是一款开源多服务器探针程序

项目地址:https://github.com/cppla/ServerStatus

阿里云限量代金券 | 此广告位出租25元/月

它支持Docker一键部署,也支持手动部署

主机哥喜欢Docker一键部署的方式,下面介绍下Docker一键部署的方法


服务端

Docker:
wget --no-check-certificate -qO ~/serverstatus-config.json https://raw.githubusercontent.com/cppla/ServerStatus/master/server/config.json && mkdir ~/serverstatus-monthtraffic    
docker run -d --restart=always --name=serverstatus -v ~/serverstatus-config.json:/ServerStatus/server/config.json -v ~/serverstatus-monthtraffic:/usr/share/nginx/html/json -p 8000:80 -p 35601:35601 cppla/serverstatus:latest     

Docker-compose(推荐):docker-compose up -d
如果提示:bash: docker-compose: command not found
那就执行:apt-get install docker-compose -y

客户端

wget --no-check-certificate -qO client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' && nohup python3 client-linux.py SERVER={$SERVER} USER={$USER} PASSWORD={$PASSWORD} >/dev/null 2>&1 &

eg:
wget --no-check-certificate -qO client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' && nohup python3 client-linux.py SERVER=45.79.67.132 USER=s04  >/dev/null 2>&1 &


client-linux版客户端配置

nano client-linux.py, 修改SERVER地址,username帐号, password密码

python3 client-linux.py 运行即可。

本网站由提供服务

Powered By Z-BlogPHP 1.7.2

Copyright © 2020-2022 主机测评网 Some Rights Reserved.

当前在线 1 人