Files
Nexus/docs/changelog/2026-06-14-layer3-health-monitor-p2-p3-ui.md
T
2026-07-08 22:31:31 +08:00

1.3 KiB
Raw Blame History

2026-06-14 — Layer3 巡检脚本与监测 UI 小修

摘要

修复 health_monitor.sh 状态文件权限与 Telegram 长串引号问题;Sparkline 渐变兼容 rgb 主题;探针表无数据时隐藏分页。

动机

巡检 P2cron 日志大量 unexpected EOF/tmp 状态文件 Permission deniedLayer3 自愈可能失效。P3Sparkline ${color}33 在非 hex 主题失效;探针表 total=0 仍显示分页。

变更

  • deploy/health_monitor.sh:状态迁至 ${DEPLOY_DIR}/var/layer3-health;不可写时回退 ~/.nexus/layer3-health 或 sudo chowndocker_cmd 回退 sudoTelegram 文案改 heredoc
  • frontend/src/utils/echartsColor.ts + WatchSparkline.vuecolorWithAlpha
  • WatchProbeRecordsTable.vuetotal>0 才显示分页
  • WatchSlotCard.vue / WatchMetricRing.vue:监测槽 UI(菜单、暂停态,同批)
  • tests/test_ops_patrol_sync.pybash -n 与状态路径断言

涉及文件

见上。

迁移 / 重启

部署后 cron 自动使用新脚本;首次运行创建 var/layer3-health/。可选清理 /tmp/nexus_health_*(脚本会尝试迁移 fail_count)。

验证

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。