Add a public reachability status page
All checks were successful
Build and Deploy to Production / test (push) Successful in 18s
Build and Deploy to Production / build (push) Successful in 49s
Build and Deploy to Production / deploy (push) Successful in 33s

asxpio now probes public hosts tied to each datacenter once a minute
and stores 5-minute rows (bingo_monitor_* tables, granted to the
read-only bingo role). Show them: /:locale/status lists every monitored
site with its current state and a 24-hour bar, /status.json has the
same data, and monitored datacenter pages get a small block.

A site is down only when nothing answered for two buckets. Everything
reads as unknown when the worker is stale or fewer than half of the
control hosts in Russia answer, since probes run from Finland and
filtering can look like an outage. The page says plainly that this is
not an incident record.

Refresh test/schema.sql for asxpio's migration 017.

Assisted-by: Claude:opus-5-5
This commit is contained in:
Sergei Poljanski 2026-10-18 10:33:52 +04:00
commit 1a5506c77d
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
10 changed files with 414 additions and 9 deletions

View file

@ -46,6 +46,13 @@ renderings only for unbuilt sites) and credit format.
photo credit and incidents with sources. Licensed CC BY 4.0, with the
attribution inside the file. Feeds and dataset send
`Access-Control-Allow-Origin: *`.
- Reachability: `/:locale/status` and `/status.json` (`Bingo::Status`),
plus a block on monitored datacenter pages. They read the
`bingo_monitor_*` tables that asxpio's `bin/monitor` writes (TCP probes
from Finland, 5-minute buckets, control hosts in Russia). States: up,
degraded, down (nothing answered for two buckets), unknown (worker stale,
or under half the controls answering). Not incidents: never cross out a
cell from this alone.
- `config.ru`: `www.` → `BINGO_HOST` 301.
- `views/`: `layout.erb` (CSS and SEO head), `index.erb` (card, provider
filter, dialogs), `dc.erb`, partials. `assets/`: icons.