05b0fde197
Move fail counters under deploy/var/layer3-health, use docker_cmd with sudo fallback, and refactor alert messages to avoid quote parse errors. Also fix watch Sparkline rgba gradients, hide empty probe pagination, and ship pending slot pause/menu UI polish.
36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# 2026-06-14 — Layer3 巡检脚本与监测 UI 小修
|
||
|
||
## 摘要
|
||
|
||
修复 `health_monitor.sh` 状态文件权限与 Telegram 长串引号问题;Sparkline 渐变兼容 rgb 主题;探针表无数据时隐藏分页。
|
||
|
||
## 动机
|
||
|
||
巡检 P2:cron 日志大量 `unexpected EOF` 与 `/tmp` 状态文件 Permission denied,Layer3 自愈可能失效。P3:Sparkline `${color}33` 在非 hex 主题失效;探针表 total=0 仍显示分页。
|
||
|
||
## 变更
|
||
|
||
- `deploy/health_monitor.sh`:状态迁至 `${DEPLOY_DIR}/var/layer3-health`;`docker_cmd` 回退 sudo;Telegram 文案改 heredoc
|
||
- `frontend/src/utils/echartsColor.ts` + `WatchSparkline.vue`:`colorWithAlpha`
|
||
- `WatchProbeRecordsTable.vue`:`total>0` 才显示分页
|
||
- `WatchSlotCard.vue` / `WatchMetricRing.vue`:监测槽 UI(菜单、暂停态,同批)
|
||
- `tests/test_ops_patrol_sync.py`:`bash -n` 与状态路径断言
|
||
|
||
## 涉及文件
|
||
|
||
见上。
|
||
|
||
## 迁移 / 重启
|
||
|
||
部署后 cron 自动使用新脚本;首次运行创建 `var/layer3-health/`。可选清理 `/tmp/nexus_health_*`(脚本会尝试迁移 fail_count)。
|
||
|
||
## 验证
|
||
|
||
```bash
|
||
bash -n deploy/health_monitor.sh
|
||
pytest tests/test_ops_patrol_sync.py -q
|
||
cd frontend && npx vite build
|
||
```
|
||
|
||
生产:观察 5 分钟 `/var/log/nexus_health.log` 无新 EOF/Permission denied。
|