Skip to content

feat: public /api/health served by the agentbbs process - #143

Merged
ralyodio merged 1 commit into
mainfrom
ops/health-endpoint
Oct 6, 2026
Merged

ralyodio merged 1 commit into
mainfrom
ops/health-endpoint

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

For status.profullstack.com (Gatus).

Why it was 404: https://bbs.profullstack.com/ is Caddy's file_server over ${DATA_DIR}/web, so nothing answered /api/health, and a 200 on / only proves Caddy is up. The existing /healthz lives on agentbbs's loopback listener (AGENTBBS_HTTP_ADDR, 127.0.0.1:8088) and is not proxied.

  • GET /api/health on that loopback mux, answered by the agentbbs process that serves SSH :22
  • runs select 1 on the SQLite store (new Store.Ping) with a 3s cap
  • 200 {"status":"ok","db":"ok"} / 503 {"status":"error","db":"down"}, Cache-Control: no-store, no error details
  • setup.sh Caddyfile: handle /api/health { reverse_proxy http://${HTTP_ADDR} }, same as /verify; deploy rewrites the Caddyfile, reloads Caddy and restarts agentbbs
  • health_test.go covers ok and closed-store 503

Verified locally: go build ./..., go vet, go test ./cmd/agentbbs ./internal/store, bash -n setup.sh.

🤖 Generated with Claude Code

https://bbs.profullstack.com/ is Caddy's file_server, so a 200 there says
nothing about the BBS. /api/health is now answered by agentbbs itself on
its loopback HTTP listener (Caddy proxies it, like /verify) after a
`select 1` on the SQLite store with a 3s cap: 200 {"status":"ok","db":"ok"}
or 503 {"status":"error","db":"down"}, Cache-Control: no-store.

Adds Store.Ping. For status.profullstack.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

10 finding(s)

HIGH/CRITICAL: 7 | LOW: 3

Severity Rule Location
HIGH secret-generic-credential deploy/ergo/ircd.yaml:162
HIGH secret-generic-credential deploy/ergo/ircd.yaml:221
HIGH secret-generic-credential deploy/ergo/ircd.yaml:638
HIGH secret-generic-credential deploy/ergo/ircd.yaml:787
HIGH secret-database-url deploy/ergo/ircd.yaml:893
HIGH secret-generic-credential deploy/ergo/ircd.yaml:1025
HIGH secret-generic-credential deploy/ergo/ircd.yaml:1033
LOW secret-generic-credential deploy/ergo/ircd.yaml:772
LOW tls-verification-disabled internal/mail/mail.go:109
LOW secret-generic-credential internal/mailu/mailu_test.go:44

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 6cdc352 into main Oct 6, 2026
6 checks passed
@ralyodio
ralyodio deleted the ops/health-endpoint branch October 6, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant