docs: sync from backend 6c01a30 — Gatus /api/health endpoint shipped

- Mark backend work as complete in Gatus Monitoring doc
- Update follow-up issues table with status column
- Add Activity Log entry for 2.6.49
This commit is contained in:
Siavash Sameni
2026-05-29 05:36:22 +04:00
parent 8a9e562ced
commit 02846aced9
2 changed files with 20 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
# Gatus Monitoring — Proposed Config
**Status:** Draft / proposal. Not deployed yet.
**Status:** Backend endpoint shipped in 2.6.49 (`backend@6c01a30`). Gatus config ready for deployment. Frontend `/api/health` proxy and ops deployment still pending.
**Owner:** nick + claude
**Author date:** 2026-05-28
**Related:** [[Handoff - Request Network In-House Checkout - 2026-05-28]], memory entries `woodpecker_silent_build_fail` and `feedback-json-assets-copy-to-dist`.
@@ -62,7 +62,7 @@ If RN's API goes down, in-house checkout still works (we already have the cached
## Required backend work (before Gatus can be useful)
The probe set above presumes a `GET /api/health` endpoint that exposes invariants without admin auth. It does NOT exist today.
The `GET /api/health` endpoint was shipped in backend 2.6.49. It is public, rate-limited-skipped, and returns the structured check object below.
**Shape of the endpoint:**
@@ -89,7 +89,7 @@ Each `checks.*.ok` must reflect the actual current state, not a cached one. If a
- The structure lets us add invariants later (e.g. `walletMonitor.ok`, `paymentRedisService.queueDepth`) without changing the URL.
- Public exposure of counts (not addresses, not balances) is low-risk.
**Estimated work:** half a day backend, including a unit test that asserts every check's `ok` flag toggles correctly when the underlying dependency is mocked failed.
**Backend work:** ✅ Complete (2.6.49). Includes `healthCheckService` with 5 checks, route wired in `app.ts`, rate-limiter + logging skip, and 5 route-level unit tests.
---
@@ -238,12 +238,12 @@ endpoints:
## Required follow-up issues
| # | What | Where |
|---|------|-------|
| 1 | Backend: add `GET /api/health` endpoint exposing the structured check object | `backend` (escrow-backend) |
| 2 | Frontend: add `/api/health` Next.js route that fetches backend health and surfaces it (optional, for end-to-end check) | `frontend` (escrow-frontend) |
| 3 | Ops: deploy Gatus config to the homelab Gatus instance, wire to Telegram | wherever the existing Gatus lives |
| 4 | Ops: document the runbook for each alert (what to check when "backend-dev-health" fires) | this doc, or a sibling runbook file |
| # | What | Where | Status |
|---|------|-------|--------|
| 1 | Backend: add `GET /api/health` endpoint exposing the structured check object | `backend` (escrow-backend) | ✅ Shipped in 2.6.49 |
| 2 | Frontend: add `/api/health` Next.js route that fetches backend health and surfaces it (optional, for end-to-end check) | `frontend` (escrow-frontend) | ⏳ Pending |
| 3 | Ops: deploy Gatus config to the homelab Gatus instance, wire to Telegram | wherever the existing Gatus lives | ⏳ Pending |
| 4 | Ops: document the runbook for each alert (what to check when "backend-dev-health" fires) | this doc, or a sibling runbook file | ⏳ Pending |
---

View File

@@ -11,6 +11,17 @@ entries on top. Maintained by agents per the rule in `../AGENTS.md`.
---
### 2026-05-28 — backend@6c01a30 — Gatus monitoring: GET /api/health endpoint
**Commits:** backend `19f7eb9``44579d6``6c01a30` (2.6.48 → 2.6.49)
**Touched:**
- Backend: `src/services/health/healthCheckService.ts`, `src/services/health/index.ts`, `src/app.ts`, `__tests__/health-check.test.ts`
**Why:** Implement `GET /api/health` for Gatus monitoring. Exposes 5 checks (db, redis, rnChainRegistry, rnTokenRegistry, rnApi) in a single public endpoint. Status semantics: `ok` | `degraded` | `down` (503 when DB fails). Each check includes `latencyMs`; registry checks include counts. Rate limiter and request logging skip `/api/health`. 5 route-level unit tests cover ok/degraded/down transitions.
**Verification:** `tsc --noEmit` clean. `npx jest __tests__/health-check.test.ts` — 5/5 pass.
**Linked docs updated:** [[08 - Operations/Gatus Monitoring - Proposed Config]]
---
### 2026-05-28 — backend@19f7eb9, frontend@60ee6fb — Task #10: AML screening (Chainalysis, seller-paid, seller opt-in)
**Commits:** backend `441c8be``80ba046``19f7eb9` (2.6.46 → 2.6.47), frontend `717d5c8``b7540f5``60ee6fb` (2.6.46 → 2.6.47)