[infra] Gatus external-endpoints: ingest pushed alerts/status from other systems (monitoring #2) #3

Closed
opened 2026-08-16 16:40:41 +00:00 by forgejo_admin · 1 comment

Confirmed capability: the deployed Gatus (v5.13.1) exposes the external-endpoints push API
POST /api/v1/endpoints/{group}_{name}/external?success=true|false&error=...&duration=... returns
401 (route exists, token-gated). Other systems can therefore push status/alerts INTO Gatus,
which then applies conditions + its native alerting — Gatus as a lightweight aggregation hub for
signals a normal HTTP/TCP/ICMP check can't reach.

Do:

  • Define external-endpoints: in config/config.yaml with a per-endpoint bearer token (from
    Infisical) + conditions + alerts.
  • Document the push contract for producers: POST …/external?success=…&error=… with
    Authorization: Bearer <token>.
  • Wire candidate producers: backup success/freshness reporters, cron jobs, a small shim that
    translates another monitor's/webhook's alert into a Gatus push.

Bonus — dead-man's switch (collector #4): a heartbeat job that pushes success=true every N
minutes; when the pushes stop, Gatus flips the endpoint down and alerts. Clean, no extra infra.

Acceptance: an external POST changes an endpoint's state in Gatus and triggers alerting; a
stale/missing heartbeat surfaces as down.

Part of monitoring #2 (alerting & notification epic).

**Confirmed capability:** the deployed Gatus (v5.13.1) exposes the **external-endpoints push API** — `POST /api/v1/endpoints/{group}_{name}/external?success=true|false&error=...&duration=...` returns **401** (route exists, token-gated). Other systems can therefore **push status/alerts INTO Gatus**, which then applies conditions + its native alerting — Gatus as a lightweight **aggregation hub** for signals a normal HTTP/TCP/ICMP check can't reach. **Do:** - Define `external-endpoints:` in `config/config.yaml` with a per-endpoint **bearer token** (from Infisical) + conditions + alerts. - Document the push contract for producers: `POST …/external?success=…&error=…` with `Authorization: Bearer <token>`. - Wire candidate producers: backup success/freshness reporters, cron jobs, a small shim that translates another monitor's/webhook's alert into a Gatus push. **Bonus — dead-man's switch (collector #4):** a heartbeat job that pushes `success=true` every N minutes; when the pushes stop, Gatus flips the endpoint down and alerts. Clean, no extra infra. **Acceptance:** an external `POST` changes an endpoint's state in Gatus and triggers alerting; a stale/missing heartbeat surfaces as down. Part of monitoring #2 (alerting & notification epic).
Author
Owner

Done + verified (2026-08-17, gatus be014d2 + pipelines producer)

external-endpoints: defined in config/config.yamlbatch_base-chain-build (bearer ${GATUS_PUSH_TOKEN} from Secret gatus-push-token, Infisical /stacks/monitoring GATUS_PUSH_TOKEN; alerts ntfy+gitea, failure-threshold 1). Push contract documented in the gatus README.

Verified acceptance — an external POST changes state + triggers alerting:

  • no token → 401
  • success=true → endpoint green ✓
  • success=false&error=… → endpoint down → incident #8 opened + ntfy ✓
  • success=true → recovered ✓

Producer wired: the weekly base-chain-build CronJob (platform #32) now pushes its outcome to Gatus (success=true on a verified build, false on failure) instead of a direct Alertmanager push — dashboard tile + single alerting path.

Dead-man's-switch bonus — NOT available in v5.13.1 (no heartbeat/staleness field; a missing push doesn't auto-mark down). Filed the Gatus upgrade as a follow-up. (The external total-outage dead-man's-switch is separately monitoring #11.) Closing the core.

## ✅ Done + verified (2026-08-17, gatus `be014d2` + pipelines producer) `external-endpoints:` defined in `config/config.yaml` — `batch_base-chain-build` (bearer `${GATUS_PUSH_TOKEN}` from Secret `gatus-push-token`, Infisical `/stacks/monitoring GATUS_PUSH_TOKEN`; alerts ntfy+gitea, failure-threshold 1). Push contract documented in the gatus README. **Verified acceptance** — an external POST changes state + triggers alerting: - no token → **401** ✓ - `success=true` → endpoint green ✓ - `success=false&error=…` → endpoint down → **incident #8 opened** + ntfy ✓ - `success=true` → recovered ✓ **Producer wired:** the weekly `base-chain-build` CronJob (platform #32) now pushes its outcome to Gatus (`success=true` on a verified build, `false` on failure) instead of a direct Alertmanager push — dashboard tile + single alerting path. **Dead-man's-switch bonus — NOT available in v5.13.1** (no heartbeat/staleness field; a missing push doesn't auto-mark down). Filed the Gatus upgrade as a follow-up. (The *external* total-outage dead-man's-switch is separately monitoring #11.) Closing the core.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
forgejo_admin/gatus#3
No description provided.