百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

ServerStatus-Rust

> 编程语言
开源

✨ Rust 版 ServerStatus 探针、威力加强版

2.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

✨ Rust 版 ServerStatus 探针、威力加强版

✨ Rust 版 ServerStatus 云探针

Table of Contents

  • 1. 介绍
    • 主题
  • 2. 安装部署
    • 2.1 快速体验
    • 2.2 快速部署
    • 2.3 服务管理脚本
    • 2.4 Railway 部署
    • 2.5 Heroku 部署
  • 3. 服务端说明
    • 3.1 配置文件 config.toml
    • 3.2 服务端运行
  • 4. 客户端说明
    • 4.1 Rust 版 Client
    • 4.2 Python 版 Client
  • 5. 开启 vnstat 支持
  • 6. FAQ
  • 7. 相关项目
  • 8. 最后

1. 介绍

ServerStatus 威力加强版,保持轻量和简单部署,增加以下主要特性:

  • 使用 rust 完全重写 server、client,单个执行文件部署
  • 多系统支持 Linux、MacOS、Windows、Android、Raspberry Pi
  • 支持上下线和简单自定义规则告警 (telegram、wechat、email、webhook)
  • 支持 http 协议上报,方便部署到各免费容器服务和配合 cf 等优化上报链路
  • 支持 cloudflare tunnels 和 mTLS 部署
  • 支持主机分组动态注册,简化配置
  • 支持 vnstat 统计月流量,重启不丢流量数据
  • 支持 railway 快速部署
  • 支持 systemd 开机自启
  • 其它功能,如 ️ 见 wiki

演示:ssr.rs | cn dns | 下载:Releases | Changelog | 反馈:Discussions

完整文档迁移至 doc.ssr.rs

保姆级教程 Google | Bing

主题

如果你觉得你创造/修改的主题还不错,欢迎分享/PR,前端单独部署方法参考 #37

ServerStatus-theme 主题

作者 @JingBh 主题地址 支持快速部署一键命令生成

演示:Demo

ServerStatus-Theme-Light 主题

主题地址 作者 @orilights

演示:Demo

Hotaru 主题

Hotaru 主题由 @HinataKato 修改提供,主题地址

ServerStatus-web 主题

ServerStatus-web 主题由 @mjjrock 修改提供,主题地址

ServerStatus-nezha 主题

ServerStatus-nezha 主题由 @snowie2000 修改提供,类似于哪吒探针v1,主题地址

v1.5.7 版本主题

演示:Demo

2. 安装部署

2.1 快速体验

bash
# for CentOS/Debian/Ubuntu x86_64
mkdir -p /opt/ServerStatus && cd /opt/ServerStatus
# apt install -y unzip / yum install -y unzip
wget --no-check-certificate -qO one-touch.sh 'https://raw.githubusercontent.com/zdz/ServerStatus-Rust/master/scripts/one-touch.sh'
bash -ex one-touch.sh
# 部署完毕,打开 http://127.0.0.1:8080/ 或 http://<你的IP>:8080/
# 自定义部署可参照 scripts/one-touch.sh 脚本

2.2 快速部署

快速部署

2.3 服务管理脚本

服务管理脚本说明

由 @Colsro & @Yooona-Lim 贡献

…

2.4 Railway 部署

懒得配置 Nginx,SSL 证书?试试 在 Railway 部署 Server

2.5 Heroku 部署

如何在 Heroku 上部署 Rust 版 ServerStatus 云探针

3. 服务端说明

3.1 配置文件 config.toml

…

3.2 服务端运行

…

4. 客户端说明

系统版本&架构
OS Release
Linux x86_64 x86_64-unknown-linux-musl
Linux arm64 aarch64-unknown-linux-musl
MacOS x86_64 x86_64-apple-darwin
MacOS arm64 aarch64-apple-darwin
Windows x86_64 x86_64-pc-windows-msvc
Raspberry Pi armv7-unknown-linux-musleabihf
Android 64bit aarch64-linux-android
Android 32bit armv7-linux-androideabi

4.1 Rust 版 Client

…

4.2 Python 版 Client

Python 版 Client 说明
…

5. 开启 vnstat 支持

vnstat 是Linux下一个流量统计工具,开启 vnstat 后,server 完全依赖客户机的 vnstat 数据来显示月流量和总流量,优点是重启不丢流量数据。

开启 vnstat 设置
bash
# 在client端安装 vnstat
## Centos
sudo yum install epel-release -y
sudo yum install -y vnstat
## Ubuntu/Debian
sudo apt install -y vnstat

# 修改 /etc/vnstat.conf
# BandwidthDetection 0
# MaxBandwidth 0
# 默认不是 eth0 网口的需要置空 Interface 来自动选择网口
# 没报错一般不需要改
# Interface ""
systemctl restart vnstat

# 确保 version >= 2.6
vnstat --version
# 测试查看月流量 (刚安装可能需等一小段时间来采集数据)
vnstat -m
vnstat --json m

# client 使用 -n 参数开启 vnstat 统计
./stat_client -a "grpc://127.0.0.1:9394" -u h1 -p p1 -n
# 或
python3 stat_client.py -a "http://127.0.0.1:8080/report" -u h1 -p p1 -n

6. FAQ

如何使用自定义主题

更简单的方式 #37

…
如何源码编译
bash
#
cargo install stat_server
cargo install stat_client
# or
# 按提示安装 rust 编译器
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
yum install -y openssl-devel
git clone https://github.com/zdz/ServerStatus-Rust.git
cd ServerStatus-Rust
cargo build --release
# 编译好的文件目录 target/release
如何自定义 ping 地址
bash
# 例如自定义移动探测地址,用 --cm 指定地址
./stat_client -a "grpc://127.0.0.1:9394" -u h1 -p p1 --cm=cm.tz.cloudcpp.com:80

# 电信联通参数可以使用 -h 命令查看
./stat_client -h
OPTIONS:
    --cm <CM_ADDR>    China Mobile probe addr [default: cm.tz.cloudcpp.com:80]
    --ct <CT_ADDR>    China Telecom probe addr [default: ct.tz.cloudcpp.com:80]
    --cu <CU_ADDR>    China Unicom probe addr [default: cu.tz.cloudcpp.com:80]
关于这个轮子

之前一直在使用 Prometheus + Grafana + Alertmanager + node_exporter 做VPS监控,这也是业界比较成熟的监控方案,用过一段时间后,发现非生产环境,很多监控指标都用不上,运维成本有点大。 而 ServerStatus 很好,足够简单和轻量,一眼可以看尽所有小机机,只是 c++ 版本很久没迭代过,自己的一些需求在原版上不是很好修改,如自带 tcp 上报对跨区机器不是很友好,也不方便对上报的链路做优化 等等。这是学习 Rust 练手的小项目,所以不会增加复杂功能,保持小而美,简单部署,配合 Uptime Kuma 基本上可以满足个人大部分监控需求。

7. 相关项目

  • https://github.com/BotoX/ServerStatus
  • https://github.com/cppla/ServerStatus
  • https://github.com/mojeda/ServerStatus
  • https://github.com/cokemine/ServerStatus-Hotaru
  • https://github.com/ToyoDAdoubiBackup/ServerStatus-Toyo

8. 最后

很高兴我的代码能跑在你的服务器上,如果对你有帮助的话,欢迎留下你的 star ⭐ 支持一下

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustproberailwayrustserverstatus

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言