# ServerMonitor **Repository Path**: slimeabc/ServerMonitor ## Basic Information - **Project Name**: ServerMonitor - **Description**: 一款轻量级、基于 Flask 的服务器性能监控仪表盘 - **Primary Language**: Python - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-12-27 - **Last Updated**: 2026-01-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [English](README.en.md) | **中文** 🖥️ ServerMonitor 欢迎使用 ServerMonitor——一款轻量级、基于 Flask 的服务器性能监控仪表盘! ![截图](example-images/screenshot1.png) ⚠️ 兼容性提示 本插件已在 Python 3.10 及以上版本测试通过;更低版本不保证正常运行。 --- 🌟 核心特性 - 界面简洁清爽 - 功能完整的实时监控 - 提供易用的 RESTful API,方便二次开发与集成 --- 📱 移动端支持 随时随地掌握服务器状态,Android 客户端已上线: 👉 [ServerMonitor Android 应用](https://gitee.com/SlimeABC/ServerMonitor-APP) --- 🚀 快速上手 1. 下载最新 release - 前往 [release 页面](https://github.com/SlimeABC/ServerMonitor/releases) 获取 ServerMonitor.exe 2. 把 exe 放到任意目录即可 3. 编辑 `config.yml`,设置端口与局域网访问(默认:`port: 5000`,`lan_mode: false`) ```yaml # ServerMonitor 配置文件 port: 5000 # Web 服务端口 lan_mode: false # 是否允许局域网访问(true/false) ``` 4. 双击运行 `ServerMonitor.exe`,将看到类似输出: ``` ServerMonitor By Slime Configuration file created: config.yml *LAN access is currently disabled. You can change this in config.yml Server starting on 127.0.0.1:5000 * Serving Flask app 'ServerMonitor' * Debug mode: off WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Running on http://127.0.0.1:5000 Press CTRL+C to quit ``` 5. 在浏览器中打开上述地址(如 `http://127.0.0.1:5000`)。 小技巧:可 Ctrl+左键直接点击链接(部分电脑可能不支持)。 --- 🔗 API 参考 不想用网页?直接通过 REST 接口获取原始指标: - 地址:`http://127.0.0.1:<端口>/api/system-data` 示例返回: ```json { "CPUuse": 15.3, "MEMORYuse": 48.8, "MEMORYuse2": 14.51, "UPTIME": 23607 } ``` | 字段 | 示例值 | 含义 | |------------|--------|--------------------------| | CPUuse | 15.3 | 当前 CPU 占用率(%) | | MEMORYuse | 48.8 | 当前内存占用率(%) | | MEMORYuse2 | 14.51 | 已用内存(GB) | | UPTIME | 23607 | 系统运行时长(秒) | 可将这些数据嵌入任意页面或脚本,实现自定义监控。 --- 🌐 远程访问 - 局域网:默认已监听本地网络,如 `http://192.168.1.24:5000/` - 公网:借助内网穿透。示例配置: - 隧道名称:api - 协议:TCP - 本地端口:5000 - 节点:湖北/十堰 ① - 公网端点:`cn***.***.***2.***:33333` --- 祝您监控愉快!