Grafana's dashboards on a telnet line: the network's servers, boards and callers as charts, stats, tables and logs, on a modern terminal or on a Commodore 64.
Only through TTG Gate BBS (
teletypegames.org:2399), for the accounts with thegrafanarole. Its port (2336) is not published, and it is not on bbsweb.
telnet teletypegames.org 2399 (or its card on bbsweb).grafana role.GATE for its port). RETURN or its number dials it; the gate hands the call on signed in.The gate's list is role-dependent for this board only: its entry in the gate's config/boards.yml has role: grafana, and the list is asked again on every screen, so the row appears as soon as the caller logs in, and a guest or an account without the role never sees it. Every other board is on the list for every caller. The board checks the role again: a call without it is told so and ends.
A sysop gives the role on the gate: Profile › SysOp › Accounts, G grant, grafana (or bin/account grant NAME grafana in the container).
It knows nothing of our dashboards in particular: it reads whatever Grafana's token sees, through Grafana's HTTP API, and draws each panel by what it is and what its data looks like.
VPS: Host is under VPS); / finds by title, tag or group.S shows one series at a time, I the description.V): query, custom, interval, constant and text box variables, All, several values, chained variables, put into the queries as Grafana's front end does.T, SHIFT-T): the dashboard's own, then 5m … 30d.Grafana's data model is read, not our dashboards: field config defaults and overrides, units, decimals, thresholds, value mappings, colour modes, the reducers of stats and legends, Prometheus's and Loki's table format, and the common transformations. A panel type it does not know is drawn by the shape of its data.
It reads Grafana with a service account's token of the Viewer role: it can only see what a viewer sees, and changes nothing.
| Variable | Default | |
|---|---|---|
MONITOR_BBS_GRAFANA_URL |
http://grafana:3000 |
Grafana on the interstack network |
MONITOR_BBS_GRAFANA_TOKEN |
— | a Grafana service account's token (Viewer), in /srv/stacks/ttg-bbs/.env on the server |
TTG_GATE_BBS_LOCAL_HOST |
127.0.0.1 |
(on the gate) where it dials the boards that are not published |
The token is made in Grafana's UI (Administration › Service accounts): Grafana signs in through Gitea only and has no admin API for it. At most 6 questions go to Grafana at once over every caller; a dashboard's list and JSON are kept 60 s, a panel's data 15 s.
It runs as boards/monitor of bbs/ttg-bbs, in the shared ttg-bbs container, with at most 10 callers at once. private: true in boards.yml keeps it out of the badges (Globetrotter counts the other boards only) and its port out of compose.yaml; the gate, in the same container, dials 127.0.0.1:2336. A push to master deploys it from Woodpecker (ci-deploy ttg-bbs). Its log lines are in docker logs ttg-bbs, with "board":"monitor-bbs".
Both faces run the same pages (lib/ui/pages), drawn as lines of coloured runs: UI::Modern writes them as 256-colour ANSI, UI::Petscii on a 40×25 PETSCII canvas. lib/domain/grafana is Grafana's API and data model (client, time range, interpolator, units, colours, reducers, transformations, variables); it knows nothing of telnet.