1.3 KiB
1.3 KiB
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;不可写时回退~/.nexus/layer3-health或 sudo chown;docker_cmd回退 sudo;Telegram 文案改 heredocfrontend/src/utils/echartsColor.ts+WatchSparkline.vue:colorWithAlphaWatchProbeRecordsTable.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 -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。