> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Arvo-AI/aurora/llms.txt
> Use this file to discover all available pages before exploring further.

# Health Status

> Comprehensive health check endpoint for all Aurora services

## Overview

The health status endpoint performs comprehensive health checks across all Aurora services, including database, cache, vector storage, task queue, and chatbot services. It returns detailed status information for each component and an overall system health assessment.

## Endpoint

```bash theme={null}
GET /health
```

## Response

Returns a JSON object with overall system status and individual service health checks.

<ResponseField name="overall_status" type="string" required>
  Overall system health status. Possible values:

  * `healthy`: All services are operational
  * `degraded`: Some non-critical services have issues
  * `unhealthy`: Critical services are down
</ResponseField>

<ResponseField name="timestamp" type="string" required>
  ISO 8601 timestamp when the health check was performed
</ResponseField>

<ResponseField name="response_time_ms" type="number" required>
  Time taken to complete all health checks in milliseconds
</ResponseField>

<ResponseField name="checks" type="object" required>
  Individual health check results for each service

  <Expandable title="Service Checks">
    <ResponseField name="database" type="object" required>
      PostgreSQL database health status

      <Expandable title="Properties">
        <ResponseField name="status" type="string" required>
          Health status: `healthy`, `degraded`, or `unhealthy`
        </ResponseField>

        <ResponseField name="message" type="string">
          Success message when service is healthy
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message when service is unhealthy
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="redis" type="object" required>
      Redis cache health status

      <Expandable title="Properties">
        <ResponseField name="status" type="string" required>
          Health status: `healthy`, `degraded`, or `unhealthy`
        </ResponseField>

        <ResponseField name="message" type="string">
          Success message when service is healthy
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message when service is unhealthy
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="weaviate" type="object" required>
      Weaviate vector database health status

      <Expandable title="Properties">
        <ResponseField name="status" type="string" required>
          Health status: `healthy`, `degraded`, or `unhealthy`
        </ResponseField>

        <ResponseField name="message" type="string">
          Success message when service is healthy
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message when service is unhealthy
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="celery" type="object" required>
      Celery task queue worker health status

      <Expandable title="Properties">
        <ResponseField name="status" type="string" required>
          Health status: `healthy`, `degraded`, or `unhealthy`
        </ResponseField>

        <ResponseField name="message" type="string">
          Success message showing number of active workers
        </ResponseField>

        <ResponseField name="warning" type="string">
          Warning message when no workers are active
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message when service check fails
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="chatbot_websocket" type="object" required>
      Chatbot WebSocket service health status

      <Expandable title="Properties">
        <ResponseField name="status" type="string" required>
          Health status: `healthy`, `degraded`, or `unhealthy`
        </ResponseField>

        <ResponseField name="message" type="string">
          Success message when chatbot responds correctly
        </ResponseField>

        <ResponseField name="error" type="string">
          Error message when service is unhealthy or unresponsive
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

## Status Codes

<ResponseField name="200" type="status code">
  System is healthy or degraded (non-critical issues)
</ResponseField>

<ResponseField name="503" type="status code">
  System is unhealthy (critical services down)
</ResponseField>

## Example Response

### Healthy System

```json theme={null}
{
  "overall_status": "healthy",
  "timestamp": "2026-03-03T14:30:00.123456",
  "response_time_ms": 245.67,
  "checks": {
    "database": {
      "status": "healthy",
      "message": "Database connection successful"
    },
    "redis": {
      "status": "healthy",
      "message": "Redis connection successful"
    },
    "weaviate": {
      "status": "healthy",
      "message": "Weaviate connection successful"
    },
    "celery": {
      "status": "healthy",
      "message": "3 Celery workers active"
    },
    "chatbot_websocket": {
      "status": "healthy",
      "message": "Chatbot connection and initial response successful"
    }
  }
}
```

### Degraded System

```json theme={null}
{
  "overall_status": "degraded",
  "timestamp": "2026-03-03T14:30:00.123456",
  "response_time_ms": 189.23,
  "checks": {
    "database": {
      "status": "healthy",
      "message": "Database connection successful"
    },
    "redis": {
      "status": "healthy",
      "message": "Redis connection successful"
    },
    "weaviate": {
      "status": "healthy",
      "message": "Weaviate connection successful"
    },
    "celery": {
      "status": "degraded",
      "warning": "No active Celery workers found"
    },
    "chatbot_websocket": {
      "status": "healthy",
      "message": "Chatbot connection and initial response successful"
    }
  }
}
```

### Unhealthy System

```json theme={null}
{
  "overall_status": "unhealthy",
  "timestamp": "2026-03-03T14:30:00.123456",
  "response_time_ms": 156.89,
  "checks": {
    "database": {
      "status": "unhealthy",
      "error": "Database connection failed"
    },
    "redis": {
      "status": "healthy",
      "message": "Redis connection successful"
    },
    "weaviate": {
      "status": "unhealthy",
      "error": "Weaviate HTTP connection failed"
    },
    "celery": {
      "status": "healthy",
      "message": "2 Celery workers active"
    },
    "chatbot_websocket": {
      "status": "unhealthy",
      "error": "Timeout waiting for chatbot response"
    }
  }
}
```

## Usage

### cURL

```bash theme={null}
curl http://localhost:5080/health
```

### JavaScript

```javascript theme={null}
const response = await fetch('http://localhost:5080/health');
const health = await response.json();

if (health.overall_status === 'healthy') {
  console.log('All systems operational');
} else if (health.overall_status === 'degraded') {
  console.warn('System degraded:', health.checks);
} else {
  console.error('System unhealthy:', health.checks);
}
```

### Python

```python theme={null}
import requests

response = requests.get('http://localhost:5080/health')
health = response.json()

print(f"Overall Status: {health['overall_status']}")
print(f"Response Time: {health['response_time_ms']}ms")

for service, status in health['checks'].items():
    print(f"{service}: {status['status']}")
```

## Health Check Logic

The endpoint determines overall system health based on individual service statuses:

1. **Unhealthy**: Any service reports `unhealthy` status → Returns HTTP 503
2. **Degraded**: No unhealthy services, but at least one `degraded` service → Returns HTTP 200
3. **Healthy**: All services report `healthy` status → Returns HTTP 200

## Monitoring Integration

This endpoint is designed for use with:

* **Load balancers**: Configure health checks to route traffic only to healthy instances
* **Monitoring systems**: Set up alerts when `overall_status` is not `healthy`
* **Kubernetes**: Use as a combined liveness and readiness probe (see dedicated endpoints for more granular control)
* **Uptime monitors**: Track service availability over time

## Related Endpoints

* [Liveness Probe](/api/health/metrics#liveness) - Simple check if the application is running
* [Readiness Probe](/api/health/metrics#readiness) - Check if the application is ready to accept traffic
