ServerStatus-Hotaru
Cloud probe, multi-server probe, cloud monitoring, multi-server cloud monitoring.
Slightly modified based on the latest version of ServerStatus-Toyo.
Features
Server and client scripts supported systems: CentOS 7, Debian 7, Ubuntu 14.04 and above, Arch Linux.
Client Python versions supported: Python 2.7 - Python 3.
Golang client: If your client environment cannot use Python, you can use the Golang client.
Open source: https://github.com/cokemine/ServerStatus-goclient
Traffic calculation: Clients can optionally use vnStat for monthly traffic calculation, which will automatically compile and install the latest vnStat (Arch Linux installs from repository). If vnStat is not used, the default traffic calculation resets after reboot. Note that ServerStatus is not strongly coupled with the GPLv2-licensed vnStat.
Frontend built with Vue 3.0 and SemanticUI. If you need to modify the frontend, it is recommended to build it yourself.
Open source frontend: https://github.com/cokemine/hotaru_theme
Installation
Server Side
# Install server
wget https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/status.sh
# Start server
bash status.sh s
Client Side
# Start client
bash status.sh c
Manual Server Installation
mkdir -p /usr/local/ServerStatus/server
apt install wget unzip curl vim build-essential
cd /tmp
wget https://github.com/cokemine/ServerStatus-Hotaru/archive/master.zip
unzip master.zip
cd ./ServerStatus-Hotaru-master/server
# Compile binary
make
chmod +x sergate
mv sergate /usr/local/ServerStatus/server
# Edit configuration
vim /usr/local/ServerStatus/server/config.json
# Download frontend
cd /tmp && wget https://github.com/cokemine/Hotaru_theme/releases/latest/download/hotaru-theme.zip
unzip hotaru-theme.zip
# Set as site root directory
mv ./hotaru-theme /usr/local/ServerStatus/web
# Default port 35601
nohup ./sergate --config=config.json --web-dir=/usr/local/ServerStatus/web --port=35601 > /tmp/serverstatus_server.log 2>&1 &
Manual Client Installation
Using the Psutil client allows ServerStatus to run on Windows and other platforms.
# If pip is not installed
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
python pip install psutil
# Modify status-psutil.py
python status-psutil.py
The Linux client supports most Linux distributions and generally does not require the Psutil client.
apt install python3 python3-pip wget
pip3 install psutil
wget https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/clients/status-psutil.py
# Edit client configuration
vim status-psutil.py
python3 status-psutil.py
# https://raw.githubusercontent.com/cokemine/ServerStatus-Hotaru/master/clients/status-client.py default version without psutil dependency
Updating the Frontend
Default server updates do not update the frontend, as that would overwrite custom frontend changes.
rm -rf /usr/local/ServerStatus/web/*
wget "https://github.com/cokemine/hotaru_theme/releases/download/latest/hotaru-theme.zip"
unzip hotaru-theme.zip
mv ./hotaru-theme/* /usr/local/ServerStatus/web/
service status-server restart
# systemctl restart status-server
About Flag Icons
Currently, flag icons via script only support countries/regions in the ISO 3166-1 standard; otherwise they may not be added (e.g., EU), though the frontend does have that flag. You may need to add it manually by modifying /usr/local/ServerStatus/server/config.json and changing the region of the server you want to modify.
The frontend also supports these special flags, which require the same modification:
Transgender flag: trans
Rainbow flag: rainbow
Pirate flag: pirate
Toyo Version Migration
If you are using the Toyo version or another ServerStatus version, back up your config file and recompile/install this version’s server.
Config file: /usr/local/ServerStatus/server/config.json — back up and add region yourself.
{
"username": "Name",
"password": "Password",
"name": "Your Servername",
"type": "KVM",
"host": "None",
"location": "Hangzhou",
"disabled": false,
"region": "CN"
},
Replace the config file and restart ServerStatus.