ServerStatus

2025 年 1 月 8 日 星期三(已编辑)
7

ServerStatus

ServerStatus

About

之前折腾过 Prometheus + Grafana 的服务器状态监控,一直用的都还不错,只不过感觉确实太重了,监控的项目非常多,而我日常并不需要监控这么多项目

于是我又给服务器装上了 ServerStatus,这个和哪吒差不多,但是比哪吒轻量许多,没有 webssh 等多余的功能,是一个单纯的服务器监控,并且完全开源

这里我选择的是其中一个基于 Rust 重写的版本,功能更强,性能更高

serverstatus.owlllovo.com

Installation

Server

mkdir -p /opt/ServerStatus && cd /opt/ServerStatus

wget https://github.com/zdz/ServerStatus-Rust/releases/download/v1.8.1/server-x86_64-unknown-linux-musl.zip

sudo apt install -y unzip

unzip server-x86_64-unknown-linux-musl.zip

mv -v stat_server.service /etc/systemd/system/stat_server.service

systemctl daemon-reload

systemctl start stat_server

systemctl status stat_server

vim /opt/ServerStatus/config.toml
  • 修改配置文件:

    • admin_user = "<Username>":管理员用户名
    • admin_pass = "<Password>":管理员密码
    • {name = "<Client Name>", password = "<Client Password>", alias = "<Client Display Name>", location = "<Country Code>", type = "<Platform>", labels = "os=<OS>;ndd=<Date>;spec=<CPU Cores>C/<Memory>G/<Disk>G;"}

      • <Client Name>:客户端名称,每台唯一
      • <Client Password>:客户端密码,须与客户端配置对应
      • <Client Display Name>:客户端显示的名字
      • <Country Code>:客户端所在国家二字母代码,如 CN US
      • <Platform>:客户端平台,如 arm x86 kvm ovz
      • os=<OS>;ndd=<Date>;spec=<CPU Cores>C/<Memory>G/<Disk>G;:客户端系统信息,如 os=ubuntu;ndd=2025/01/31;spec=1C/2G/20G;

Client

mkdir -p /opt/ServerStatus && cd /opt/ServerStatus

wget https://github.com/zdz/ServerStatus-Rust/releases/download/v1.8.1/client-x86_64-unknown-linux-musl.zip

apt install -y unzip vnstat

unzip client-x86_64-unknown-linux-musl.zip

mv -v stat_client.service /etc/systemd/system/stat_client.service

vim /etc/systemd/system/stat_client.service

替换这行:

ExecStart=/opt/ServerStatus/stat_client -a "https://<domain>:8080/report" -u "<Client Name>" -p "<Client Password>" -n
systemctl daemon-reload

systemctl enable --now stat_client

systemctl status stat_client

使用社交账号登录

  • Loading...
  • Loading...
  • Loading...
  • Loading...
  • Loading...