Skip to content

Commit 7abd0f3

Browse files
committed
Merge feat/healthy-checks: harden health monitoring, narrow queries, add tests, update API docs
2 parents 1a90419 + 24ccfeb commit 7abd0f3

1 file changed

Lines changed: 9 additions & 17 deletions

File tree

docs/healthchecks.md

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
icon: material/heart-pulse
3+
---
4+
15
# Health Checks
26

37
The Nexus Broker continuously monitors integration health across two dimensions: **provider-level** (is the upstream API alive?) and **connection-level** (is this user's credential still valid?). Both run as background workers inside the broker process.
@@ -158,24 +162,12 @@ The same Docker image and environment variables are used — just override the c
158162

159163
---
160164

161-
## Database Schema
165+
## Database Migrations
162166

163-
```sql
164-
-- provider_profiles
165-
ALTER TABLE provider_profiles
166-
ADD COLUMN last_health_check_at TIMESTAMP WITH TIME ZONE,
167-
ADD COLUMN health_status VARCHAR(50) DEFAULT 'unknown',
168-
ADD COLUMN health_message TEXT;
167+
Health check columns are added automatically by the incremental migration scripts. Run:
169168

170-
-- connections
171-
ALTER TABLE connections
172-
ADD COLUMN last_health_check_at TIMESTAMP WITH TIME ZONE,
173-
ADD COLUMN health_status VARCHAR(50) DEFAULT 'unknown';
174-
175-
-- Performance index for GetForHealthCheck query
176-
CREATE INDEX IF NOT EXISTS idx_connections_health_check
177-
ON connections (status, last_health_check_at ASC NULLS FIRST)
178-
WHERE status = 'active';
169+
```bash
170+
nexus-broker migrate up
179171
```
180172

181-
Migrations: `13_add_provider_health.sql`, `14_add_connection_health.sql`, `15_add_connection_health_index.sql`.
173+
This applies all pending migrations in order (`13_add_provider_health.sql`, `14_add_connection_health.sql`, `15_add_connection_health_index.sql`, etc.). There is no need to run individual scripts — the migrator tracks which have already been applied.

0 commit comments

Comments
 (0)