Skip to content

Health Checks

Monitor API availability and component status.

Endpoints

Basic Health

GET /health

Returns 200 with basic status. Use for simple uptime monitoring.

Readiness Probe

GET /health/ready

Checks all critical components (API, database, Redis, solar optimization, metering).

{
  "ready": true,
  "checks": {
    "api": {"status": "ok"},
    "database": {"status": "ok"},
    "redis": {"status": "ok"},
    "solar_optimization": {"status": "ok"},
    "metering": {"status": "ok"}
  }
}

Detailed Health

GET /health/detailed

Returns component-level status with latency measurements and uptime.

{
  "status": "healthy",
  "timestamp": "2026-01-26T12:00:00Z",
  "check_duration_ms": 850.5,
  "uptime_seconds": 86400,
  "components": {
    "api": {"status": "healthy", "version": "1.0.0"},
    "database": {"status": "healthy", "latency_ms": 12.5},
    "redis": {"status": "healthy", "latency_ms": 3.2},
    "celery": {"status": "healthy", "workers": 2},
    "webhooks": {"status": "healthy", "worker_running": true}
  }
}

Uptime

GET /monitoring/uptime
{
  "uptime_seconds": 86400,
  "uptime_human": "24h 0m",
  "status": "running"
}

Color-Coded Status

GET /monitoring/health-status

Returns a color indicating overall health:

Color Meaning
GREEN All systems operational
YELLOW Minor issues detected
ORANGE Degraded performance
RED Critical failures