fix(watchdog): generalize CDP page health check for Muse targets

This commit is contained in:
operator-main
2026-10-04 16:39:30 +00:00
parent 87fd93e7a6
commit cf8f59b737
+4 -2
View File
@@ -64,8 +64,10 @@ healthy() {
local list local list
list="$(cdp_list)" \ list="$(cdp_list)" \
|| { HEALTH_FAIL_REASON="CDP unreachable on :$CDP_PORT"; return 1; } || { HEALTH_FAIL_REASON="CDP unreachable on :$CDP_PORT"; return 1; }
echo "$list" | grep -q '"title": ".*Chat' \ echo "$list" | grep -q '"type": "page"' \
|| { HEALTH_FAIL_REASON="CDP up but no Chat page in target list"; return 1; } || { HEALTH_FAIL_REASON="CDP up but no page target in list"; return 1; }
echo "$list" | grep -E -q '"url": "https://muse\.ai' \
|| { HEALTH_FAIL_REASON="CDP up but not on muse.ai"; return 1; }
return 0 return 0
} }