47 lines
1.9 KiB
JSON
47 lines
1.9 KiB
JSON
{
|
||
"module": "daily_health",
|
||
"version": "1.0",
|
||
"purpose": "Tier 2 全面健康检查(每日 08:00)。在 Tier 1 基础上增加:磁盘空间检查、定时任务存活检查、数据新鲜度、跨服务依赖链检查、看门狗日志新鲜度。",
|
||
"ui_location": "F Tab → 定时任务 → 日报健康检查(每日)",
|
||
|
||
"human_help": {
|
||
"title": "Tier 2 每日健康检查",
|
||
"description": [
|
||
"每天早上 8:00 由 Windows Task Scheduler 触发,生成全面系统健康日报。",
|
||
"检查范围:服务状态(PID+端口+HTTP)、磁盘空间(C盘)、定时任务存活、看门狗日志新鲜度。",
|
||
"输出结构化 JSON 报告供 Dashboard 和人工审阅。",
|
||
"发现异常时生成推荐动作清单。"
|
||
],
|
||
"usage": [
|
||
"报告文件:gateway/temp/last_daily_health.json",
|
||
"日志:gateway/logs/daily_health_report.log",
|
||
"Dashboard 通过 /api/monitor 读取报告显示 Tier2 统计"
|
||
],
|
||
"troubleshooting": [
|
||
"如果定时任务未运行:检查 Windows Task Scheduler → agents-daily-health",
|
||
"磁盘警告阈值:剩余 < 10GB 警告,< 2GB 严重",
|
||
"看门狗日志超过 1 小时未更新 → 可能看门狗已死"
|
||
],
|
||
"related": "依赖 service_registry.py(服务定义); 参考 agents_health_check.py(Tier1 检查逻辑)"
|
||
},
|
||
|
||
"ai_spec": {
|
||
"dependencies": [
|
||
"service_registry.py — 服务定义",
|
||
"Python 3.10",
|
||
"Windows Task Scheduler — 每天 08:00 触发",
|
||
"wmic — Windows 磁盘空间查询"
|
||
],
|
||
"constraints": [
|
||
"只在 Windows 上运行(使用 tasklist/netstat/wmic)",
|
||
"磁盘检查仅针对 C: 盘",
|
||
"定时任务检查通过 schtasks /Query 验证"
|
||
],
|
||
"related_files": [
|
||
"gateway/scripts/agents_daily_health.py — 本脚本",
|
||
"gateway/scripts/service_registry.py — 服务注册表",
|
||
"gateway/scripts/specs/daily_health.json — 本 spec"
|
||
]
|
||
}
|
||
}
|