Skip to content

Health Endpoints

Available Endpoints

The API exposes several health check endpoints:

EndpointPurposeAuth Required
GET /healthBasic liveness checkNo
GET /health/readyFull readiness (DB + Redis)No
GET /health/liveKubernetes liveness probeNo
GET /metrics/scrapePrometheus metricsBearer token

Response Formats

/health

Returns 200 OK if the API process is running:

{
"status": "ok",
"version": "0.2.0",
"uptime": 86400
}

/health/ready

Returns 200 OK only when all dependencies are healthy:

{
"status": "ready",
"checks": {
"database": "ok",
"redis": "ok"
}
}

Returns 503 Service Unavailable if any dependency is down:

{
"status": "not_ready",
"checks": {
"database": "ok",
"redis": "error: connection refused"
}
}

/metrics/scrape

Prometheus-formatted metrics. Requires the METRICS_SCRAPE_TOKEN bearer token:

Terminal window
curl -H "Authorization: Bearer $METRICS_SCRAPE_TOKEN" \
https://breeze.yourdomain.com/metrics/scrape

Docker Health Checks

Each container in the production stack has its own health check:

ContainerCheckInterval
APIwget http://localhost:3001/health30s
Webwget http://localhost:4321/30s
PostgreSQLpg_isready10s
Redisredis-cli ping10s
Prometheuswget http://localhost:9090/-/healthy30s
Grafanawget http://localhost:3000/api/health30s
Alertmanagerwget http://localhost:9093/-/healthy30s
Lokiwget http://localhost:3100/ready30s

Using with Load Balancers

Configure your load balancer to probe:

  • Liveness: GET /health (is the process alive?)
  • Readiness: GET /health/ready (can it serve traffic?)

Example for AWS ALB:

Health check path: /health/ready
Healthy threshold: 2
Unhealthy threshold: 3
Timeout: 5 seconds
Interval: 30 seconds