xiaohei
|
70608bed16
|
feat: 实现平台监控功能并生成API文档
功能实现:
1. 创建监控模块 (monitoring.py)
- 系统健康检查
- 系统性能指标(CPU、内存、磁盘)
- 服务统计信息(Agent、执行、工具、用户)
- 性能趋势分析
- 系统告警
2. 添加监控API端点
- GET /api/v1/monitoring/metrics - 系统性能指标
- GET /api/v1/monitoring/stats - 服务统计信息
- GET /api/v1/monitoring/trends - 性能趋势数据
- GET /api/v1/monitoring/alerts - 系统告警
- GET /api/v1/monitoring/dashboard - 监控仪表板
3. 优化健康检查API
- 使用监控模块统一管理健康检查
4. 添加依赖
- psutil==5.9.6 (系统资源监控)
5. 生成API文档
- Docs/项目文档/API接口文档_监控功能.md
- 包含完整的API说明、请求/响应示例、集成示例
监控功能:
- 实时系统资源监控(CPU、内存、磁盘)
- 服务指标统计(24小时/7天)
- 性能趋势分析(支持多种时间范围和间隔)
- 智能告警系统(资源告警、服务告警)
- 聚合监控仪表板
|
2025-12-23 07:36:57 +00:00 |
|