> ## Documentation Index
> Fetch the complete documentation index at: https://docs.axiomancer.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Status page

> Real-time health monitoring for Overwatch services — database connectivity, AIS data freshness, ingestion pipeline, and visit pipeline with a 24-hour timeline.

The Overwatch dashboard includes a status page that shows the real-time health of core platform services. Use it to check whether data pipelines are running normally or to diagnose why data might appear stale.

## What the status page shows

The status page displays the current state of four monitored services:

| Service            | What it checks                                   | Warn threshold        |
| ------------------ | ------------------------------------------------ | --------------------- |
| **Database**       | Supabase connectivity and query latency          | Query failure         |
| **AIS positions**  | Freshness of the most recent AIS position report | Older than 60 minutes |
| **Data pipeline**  | Recency of the last completed ingestion job      | Older than 2 hours    |
| **Visit pipeline** | Recency of the last departed vessel visit update | Older than 3 hours    |

Each service shows one of three states:

* **Operational** — the service is healthy and data is fresh.
* **Degraded** — the service is responding but data is stale beyond its expected threshold.
* **Down** — the service failed its health check.

## 24-hour history

Below the current status, the page displays a visual timeline of health check results from the last 24 hours. Each colored bar represents a single check — green for operational, amber for degraded, and red for down. This makes it easy to spot intermittent issues or identify when a disruption started and resolved.

## How checks run

Health checks run automatically every 5 minutes. Each check records the service status, response latency, and any error details to the `service_uptime` table. The status page reads from this table to render the current and historical view.

If a service fails three or more consecutive health checks, Overwatch logs an alert to the ingestion log so operators are notified.

## Health API endpoint

You can also query service health programmatically:

```bash theme={null}
curl https://your-overwatch-domain/api/health
```

The response includes a status summary and individual check results:

```json theme={null}
{
  "status": "healthy",
  "checks": {
    "db": { "status": "ok", "latency_ms": 45 },
    "ais_positions": { "status": "ok", "latency_ms": 120 },
    "ingestion_logs": { "status": "ok", "latency_ms": 85 }
  },
  "timestamp": "2026-04-20T12:00:00.000Z"
}
```

The endpoint returns:

* `200` with `"status": "healthy"` when all checks pass.
* `200` with `"status": "degraded"` when some checks return warnings but none have failed.
* `503` with `"status": "unhealthy"` when any check has failed.

You can use this endpoint for load balancer probes or external uptime monitoring tools.

## Worker heartbeats

In addition to the platform-level service checks above, long-running ingestion workers report periodic heartbeats so you can verify that each worker is alive and processing data. Heartbeats are visible on the cockpit **Workers** view alongside the headline status page.

| Worker                     | Beat interval        | Reported metadata                                                        |
| -------------------------- | -------------------- | ------------------------------------------------------------------------ |
| `overwatch-ais-ingest`     | 60 seconds           | Positions ingested, vessels upserted, buffer size, circuit-breaker state |
| `overwatch-equasis-direct` | Per enrichment cycle | Account in use, vessels enriched, vessels failed                         |
| `overwatch-equasis-vpn`    | Per enrichment cycle | Account in use, vessels enriched, vessels failed                         |
| `overwatch-scraper`        | 60 seconds           | Jobs completed, jobs failed                                              |

Each beat records a timestamp and a small JSON payload of the worker's most recent counters. The cockpit computes uptime over a rolling window from these beats and flags workers as **stale** when beats stop arriving — typically a sign that the underlying service has crashed or lost connectivity even though the platform-level checks above still report healthy.

Heartbeats are best-effort: failures to record a beat are logged but never crash the worker itself, so a cockpit outage cannot take down ingestion.

## Accessing the status page

Navigate to **Dashboard > Status** in the Overwatch web application. The page is available to all authenticated users.
