logo
0
0
Login
编辑文件 README.md

ServerStatus-Hotaru

云探针、多服务器探针、云监控、多服务器云监控

基于 ServerStatus-Hotaru 最新版本稍作修改 删除GitHub相关下载链接 更换默认为CNB!。

特性

服务端客户端脚本支持系统:Centos 7、Debian 8、Ubuntu 15.10 及以上、ArchLinux、OpenCloudOS

Python 客户端:支持 Python 版本:Python 2.7+

Go 客户端:如果您的客户端环境无法使用 Python, 可以使用 Go 编写的客户端

原来开源地址:https://github.com/cokemine/ServerStatus-goclient

安装方法

服务端:

wget https://cnb.cool/ayao/ServerStatus-Hotaru/-/git/raw/master/status.sh bash status.sh s

客户端:

bash status.sh c

手动安装服务端

mkdir -p /usr/local/ServerStatus/server apt install wget unzip curl vim build-essential cd /tmp wget https://cnb.cool/ayao/ServerStatus-Hotaru/-/git/archive/%E6%B5%8B%E8%AF%95.zip unzip master.zip cd ./ServerStatus-Hotaru-master/server make #编译生成二进制文件 chmod +x sergate mv sergate /usr/local/ServerStatus/server vim /usr/local/ServerStatus/server/config.json #修改配置文件 #下载前端 cd /tmp && wget https://cnb.cool/ayao/hotaru_theme/-/git/archive/hotaru-theme.zip unzip hotaru-theme.zip mv ./hotaru-theme /usr/local/ServerStatus/web #此为站点根目录,请自行设置 nohup ./sergate --config=config.json --web-dir=/usr/local/ServerStatus/web --port=35601 > /tmp/serverstatus_server.log 2>&1 & #默认端口35601

手动安装客户端

使用 Psutil 版客户端即可使 ServerStatus 客户端在 Windows 等其他平台运行

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # 若未安装pip python get-pip.py python pip install psutil # 修改 status-psutil.py python status-psutil.py

Linux 版客户端支持绝大部分 Linux 发行版系统,一般不需要使用 psutil 版客户端。

apt install python3 python3-pip wget pip3 install psutil wget https://cnb.cool/ayao/ServerStatus-Hotaru/-/git/raw/master/clients/status-psutil.py vim status-psutil.py #修改客户端配置文件 python3 status-psutil.py # https://cnb.cool/ayao/ServerStatus-Hotaru/-/blob/a3526813b711412acb3d5f228b7fe2c820eb154a/clients/status-client.py 默认版本无需 psutil 依赖

更新前端

默认服务端更新不会更新前端。因为更新前端会导致自己自定义的前端消失。

rm -rf /usr/local/ServerStatus/web/* wget https://cnb.cool/ayao/hotaru_theme/-/git/archive/hotaru-theme.zip unzip hotaru-theme.zip mv ./hotaru-theme/* /usr/local/ServerStatus/web/ service status-server restart # systemctl restart status-server

关于前端旗帜图标

目前通过脚本使用旗帜图标仅支援当前国家/地区在 ISO 3166-1 标准里,否则可能会出现无法添加的情况,如欧盟 EU,但是前端是具备该旗帜的。你可能需要手动加入。方法是修改/usr/local/ServerStatus/server/config.json,将你想修改的服务器的region改成你需要的。

同时,前端还具备以下特殊旗帜,可供选择使用,启用也是需要上述修改。

Transgender flag: trans

Rainbow flag: rainbow

Pirate flag: pirate

Toyo版本修改方法

如果你使用 Toyo 版本或其他版本的 ServerStatus,请备份你的config文件并重新编译安装本版本服务端

配置文件: /usr/local/ServerStatus/server/config.json 备份并自行添加region

{ "username": "Name", "password": "Password", "name": "Your Servername", "type": "KVM", "host": "None", "location": "洛杉矶", "disabled": false, "region": "US" },

替换配置文件,重启 ServerStatus