3.8 KiB
3.8 KiB
AgentsMeeting — 运维手册
版本: v2.1 | 日期: 2026-07-19
日常检查
Dashboard
打开 http://192.168.1.246:5803 查看所有 Agent 和平台服务状态。
- 绿色 = 在线
- 黄色 = degraded(进程活着但 XMPP 不稳)
- 红色 = 离线
- 灰色 = 未知(远程 Agent,无法检测)
展开 Agent 卡片可查看实时日志。
命令行检查
# Windows 快速状态
powershell -File deploy\windows\check.ps1
# Linux 所有 systemd 服务
systemctl status agentsmeeting-dashboard hermes-gateway@{profile} xmpp-bot-{name}
监控架构
Dashboard (:5803, Linux)
│
├── Docker exec ejabberdctl → 在线 JID 列表(跨平台权威)
├── GET 192.168.1.16:5802/health → xmpp_bot XMPP 连接状态
├── GET 192.168.1.16:5810/health → article_processor 文章抓取服务
└── crontab 定时管线
├── */5 agents_health_check.py → Tier1 快速检查
├── 0 8 agents_daily_health.py → Tier2 每日全面检查
├── */10 self_todo_executor.py → TODO 自修复
└── */5 auto_heal.py → systemd/docker 自动重启
详见
docs/HEALTH-PIPELINE.md
systemd 服务(Linux)
| 服务 | 命令 |
|---|---|
| agentsmeeting-dashboard | systemctl status/restart agentsmeeting-dashboard |
| hermes-gateway@mohe | systemctl status hermes-gateway@mohe |
| hermes-gateway@zhiwei | systemctl status hermes-gateway@zhiwei |
Docker 服务: docker restart wxBotWebhook(微信桥接)、docker compose restart(ejabberd)
健康端点
| 端点 | 说明 |
|---|---|
GET :5803/api/health |
Dashboard 自身健康 |
GET :5803/api/services |
所有注册服务实时状态 |
GET :5803/api/expected |
期望状态矩阵(含 key/spec) |
GET :5803/api/monitor |
聚合监控(tasks + Tier1 + Tier2) |
GET :5803/api/autoheal |
最近自动修复记录 |
GET :5803/api/ejabberd |
ejabberd 在线用户列表 |
GET :5803/api/platform |
平台服务状态 |
gateway/temp/last_health_check.json |
Tier1 报告文件 |
gateway/temp/last_daily_health.json |
Tier2 报告文件 |
日志位置
| 日志 | 路径(Linux 246) | 用途 |
|---|---|---|
| health_check.log | gateway/logs/ |
Tier1 健康检查 |
| daily_health.log | gateway/logs/ |
Tier2 每日检查 |
| auto_heal.log | gateway/logs/ |
自动修复引擎 |
| todo_executor.log | gateway/logs/ |
TODO 自修复执行器 |
| dashboard | sudo journalctl -u agentsmeeting-dashboard -f |
Dashboard 运行日志 |
Windows 端日志(192.168.1.16):
| 日志 | 路径 | 用途 |
|---|---|---|
| xmpp_bot.log | gateway\logs\ |
bot 连接/消息 |
| watchdog.log | gateway\logs\ |
看门狗启停 |
常见故障
Bot 频繁断连
症状: 日志每 ~50 秒出现 disconnected, reconnecting...
根因: ejabberd mod_ping: timeout_action: kill 在 frp 隧道延迟下超时
已修复: timeout_action: none
MUC 加群失败
症状: MUC join timeout (1/3) ... MUC setup failed
根因: ejabberd TLS 证书未覆盖 conference.yoin.fun
已修复: 生成自签证书 conference.pem 并加入 certfiles;用 SSH+ejabberdctl 绕过跨平台监控
API Key 额度超限
症状: bridge.log 显示 HTTP 429,bot 不回复
处理: 等待配额重置(火山每月 15 日 00:00 CST),或切换 provider
两个 bot 同时跑
症状: 消息重复回应
根因: watchdog 没杀旧进程就启动新进程
已修复: watchdog start_bot() 先 kill 旧进程 + proc_guard PID 锁
数据管理
# Linux 端 — Hermes session 归档
cd ~/.hermes/profiles/main/
cp state.db state.db.$(date +%Y%m%d)
hermes session prune --older-than 30d