签入版本

This commit is contained in:
小蚂蚁云
2026-10-25 17:24:27 +08:00
parent 48911cc08f
commit fdbeae092a
1010 changed files with 30682 additions and 95274 deletions
@@ -0,0 +1,38 @@
# 6.18 服务监控
:::tip 概述
服务监控页展示主机运行指标:CPU、内存、磁盘、goroutine 等。采集实现按平台拆分(Windows/Linux/其他),上层契约一致。
:::
## 功能清单
| 接口 | 说明 |
|---|---|
| GET /api/server/info | 主机资源快照(CPU/内存/磁盘/goroutine 等),权限码 sys:server:info |
## 平台实现
```text
server_monitor.go 采集接口与公共逻辑
server_monitor_windows.go Windows 实现
server_monitor_other.go 其他平台(Linux 等)兜底实现
```
平台差异封装在实现内,新增平台加一个文件即可。
## 指标解读
| 指标 | 关注点 |
|---|---|
| CPU / 内存 | 持续高位 → 性能分析([11.7 性能调优](/zh/deploy/performance.html)) |
| 磁盘 | 上传目录/日志目录增长监控 |
| goroutine | 突增 → 泄漏或下游堆积排查 |
## 管理界面
`monitor/server`:图表化实时展示。
## 相关
- [5.18 服务与缓存监控](/zh/core/server-monitor.html)(机制)
- Prometheus /metrics 端点(外部监控体系接入)