fix(watchdog): generalize CDP page health check for Muse targets
This commit is contained in:
@@ -64,8 +64,10 @@ healthy() {
|
||||
local list
|
||||
list="$(cdp_list)" \
|
||||
|| { HEALTH_FAIL_REASON="CDP unreachable on :$CDP_PORT"; return 1; }
|
||||
echo "$list" | grep -q '"title": ".*Chat' \
|
||||
|| { HEALTH_FAIL_REASON="CDP up but no Chat page in target list"; return 1; }
|
||||
echo "$list" | grep -q '"type": "page"' \
|
||||
|| { 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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user