homelab-codex-ws/services/ai-cluster/healthcheck.sh

16 lines
439 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# Healthcheck for AI cluster (checks openclaw API gateway is responding)
if ! docker ps --filter "name=ai-cluster-openclaw-1" --filter "status=running" | grep -q "openclaw"; then
echo "[FAIL] openclaw container is not running"
exit 1
fi
if ! curl -sf http://localhost:8000/health > /dev/null; then
echo "[FAIL] openclaw HTTP health endpoint not responding"
exit 1
fi
echo "[OK] ai-cluster is healthy"
exit 0