learning_ai_common_plat/services/monitoring/health-check.local.sh
saravanakumardb1 6f7299aa7a fix(monitoring): update health-check endpoints for consolidated services
- Remove defunct growth-service (4001), billing-service (4002), tracker-service (4004)
- Add backend API (8000), extraction sidecar (4006), all 3 dashboards (3001-3003)
- Reorder: backend → services → dashboards → infra
2026-02-17 20:53:37 -08:00

42 lines
966 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
endpoints=(
"Backend API|http://127.0.0.1:8000/health"
"Platform Service|http://127.0.0.1:4003/health"
"Extraction Service|http://127.0.0.1:4005/health"
"Extraction Sidecar|http://127.0.0.1:4006/health"
"Admin Dashboard|http://127.0.0.1:3001/api/health"
"User Dashboard|http://127.0.0.1:3002/api/health"
"Tracker Dashboard|http://127.0.0.1:3003/api/health"
"Traefik (dashboard)|http://127.0.0.1:8080/api/overview"
"Loki|http://127.0.0.1:3100/ready"
"Grafana|http://127.0.0.1:3000/api/health"
)
failures=0
echo "Health check (local)"
echo
for item in "${endpoints[@]}"; do
name="${item%%|*}"
url="${item#*|}"
if curl -fsS --max-time 5 "$url" >/dev/null; then
printf " OK %s\n" "$name"
else
printf " FAIL %s (%s)\n" "$name" "$url" >&2
failures=$((failures + 1))
fi
done
echo
if [[ "$failures" -gt 0 ]]; then
echo "Result: FAIL ($failures)" >&2
exit 1
fi
echo "Result: OK"