Files
Nexus/docs/reports/2026-06-07-ops-patrol-deploy-verification.md
T
Nexus Agent b8785d1d51 docs: Layer 3 巡检 Telegram 配置后生产复查
记录用户配置 Telegram 后 env 同步、health_monitor 就绪与 cron 状态。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-07 20:49:13 +08:00

74 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 生产验证 — Layer 3 宿主机巡检 Telegram 打通
**日期**: 2026-06-07
**Commit**: `f9934bd` — feat(ops-patrol): Layer 3 巡检与 Telegram 配置打通
**环境**: https://api.synaglobal.vip
## 部署
| 项 | 结果 |
|----|------|
| 门控 | 7/7 PASS |
| push | `66a4cba..f9934bd main → main` |
| deploy-production | ✓ Docker 重建,容器 healthy |
| 远程版本 | `f9934bd` |
## 健康检查
| 检查 | 结果 |
|------|------|
| `GET /health` | `ok` |
| `GET /app/` | HTTP 200 |
| 外网 HTTPS | HTTP 200 |
## Layer 3 巡检
| 检查 | 结果 |
|------|------|
| crontab `nexus-health-monitor` | ✓ 已安装(部署脚本自动 `install_ops_cron.sh` |
| `health_monitor.sh` 手动执行 | exit 0 |
| `/var/log/nexus_health.log` | 空(/health 正常,无告警写入) |
## Telegram / env 同步
| 检查 | 结果 |
|------|------|
| DB `telegram_bot_token` | 未配置 |
| DB `telegram_chat_id` | 未配置 |
| `/app/.env` NEXUS_TELEGRAM_* | 未写入 |
| `read_telegram_env_status()` | `env_synced: false` |
**说明**: 生产尚未在设置页配置 Telegram;配置并保存后应自动 sync,或点「同步巡检 Telegram」。未 sync 时 `health_monitor.sh` 可通过 MySQL 回退(需 DB 有值)。
## API
| 端点 | 未认证 |
|------|--------|
| `GET /api/settings/ops-patrol/status` | 401(预期) |
## 待用户终验
1. 登录设置页 → 配置 Telegram → 确认 Layer 3 区块显示「巡检 Telegram 就绪」
2. 点「同步巡检 Telegram」→ `.env 已同步`
3. (可选)临时停容器验证 Telegram 重启告警
## 结论
**部署成功**cron 与 health_monitor 已就绪。Telegram 告警需用户在 UI 配置后终验。
---
## 用户配置后复查(2026-06-07
| 检查 | 结果 |
|------|------|
| 内存 `TELEGRAM_BOT_TOKEN` / `CHAT_ID` | ✓ 已配置 |
| 容器 `/app/.env` NEXUS_TELEGRAM_* | ✓ 已同步 |
| `read_telegram_env_status().env_synced` | **true** |
| 宿主机 `docker/.env.prod` Telegram | 未写入(容器无 host 写权限;不影响) |
| `health_monitor` 读取 Telegram | ✓ **READY via container .env** |
| MySQL DB 回退 | ✓ `db_fallback_ok True` |
| cron `nexus-health-monitor` | ✓ 运行中 |
**Layer 3 巡检 Telegram 闭环已就绪。** /health 连续失败时将能推送 Telegram 并自动重启。