January 8, 2025

ServerStatus

ServerStatus

About

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

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

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

serverstatus.owlllovo.com

Installation

Server

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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

Client

1
2
3
4
5
6
7
8
9
10
11
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

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

替换这行:

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

systemctl enable --now stat_client

systemctl status stat_client

About this Post

This post is written by OwlllOvO, licensed under CC BY-NC 4.0.

#Server#Monitor