feat(dashy): Studio Home's status dots read Prometheus (#10) #16

Manually merged
bryan merged 3 commits from n10-3-dashy-prometheus into main 2026-11-10 20:08:12 +00:00
Owner

Part of #10 (N10.3): Studio Home's status dots read Prometheus, so they no longer depend on the Hermes "Monitor Studio services" job.

How the dots work now

  • Each tile asks the status adapter (modules/services/dashy-status-api.py) for probe:///<name>. The adapter answers from probe_success{job="blackbox",probe="<name>"}, for the host's services.monitoring.blackbox.contentProbes names only (passed as --probe; any other name is a 404 and no query is made).
  • Red when the probe has failed for the whole of the last five minutes (ServiceDown's for), or has no series. Inside that window the dot stays green and says the latest probe failed. Prometheus unreachable: 503.
  • A built-in tile without a probe on the host shows no dot. A piDurableLinks/dailyLinks statusName naming no probe fails evaluation. Without monitoring imported and enabled: no dots, no adapter agent, no /status-check route.

New content probes, each from its own module and with the same checks the Hermes job made: Grafana, Prometheus, Loki, Alertmanager (with alerting) in monitoring.nix; Ollama, Open WebUI, Syncthing, Hermes Dashboard, Planning (pi-durable.nix); Plex in hosts/studio.nix. Each probes the address its tile opens where that differs from the listener: Hermes Dashboard through Tailscale Serve when published, Open WebUI at a new services.open-webui.publicUrl when set (Studio: its tunnel address), Plex on the tailnet address. The plain blackbox.targets they replace are dropped (one URL is probed once), and the module's default list is now empty. All 16 names the Hermes job checks are now probes.

Also: ServiceDown's summary and the Service Health dashboard's legends name a series by its probe label where it has one, by URL otherwise.

Tests

  • scripts/test_dashy_status_api.py (21): the adapter against a stand-in Prometheus (queries made, green/failing/red/no data, Prometheus errors, refused names and targets, a 64-request burst), and Studio's evaluated and built Dashy (conf.yml dots all name probes the adapter answers; no probe means no dot; a link naming no probe is refused; no monitoring means no dots).
  • scripts/test_monitoring_content_probes.py (14): updated for the new probes and their fallbacks to the listener; the real blackbox_exporter passes each healthy body and fails each wrong one.
  • scripts/test_studio_listener_exposure.py (19) unchanged and passing.
  • Ten mutations (never red, no allowlist, any series passing, old scheme accepted, no link assertion, dot without a probe, size cap off, Serve branch off, Serve port dropped, publicUrl ignored) each fail a test. test_monitoring_alert_webhook, test_omlx_module and test_hermes_updater also pass.
  • darwin-rebuild build --flake .#studio builds. The built blackbox exporter, a scratch Prometheus with Studio's blackbox job and the built adapter answered all 16 names Healthy against the live services.

Review: a visible Pi review approved with one should-fix (three probes skipped the address the tile opens) and five nits; all fixed, and the re-review approved with two optional nits, one fixed (docs).

Live after the next update-system.

Part of #10 (N10.3): Studio Home's status dots read Prometheus, so they no longer depend on the Hermes "Monitor Studio services" job. **How the dots work now** - Each tile asks the status adapter (`modules/services/dashy-status-api.py`) for `probe:///<name>`. The adapter answers from `probe_success{job="blackbox",probe="<name>"}`, for the host's `services.monitoring.blackbox.contentProbes` names only (passed as `--probe`; any other name is a 404 and no query is made). - Red when the probe has failed for the whole of the last five minutes (ServiceDown's `for`), or has no series. Inside that window the dot stays green and says the latest probe failed. Prometheus unreachable: 503. - A built-in tile without a probe on the host shows no dot. A `piDurableLinks`/`dailyLinks` `statusName` naming no probe fails evaluation. Without monitoring imported and enabled: no dots, no adapter agent, no `/status-check` route. **New content probes**, each from its own module and with the same checks the Hermes job made: Grafana, Prometheus, Loki, Alertmanager (with alerting) in `monitoring.nix`; Ollama, Open WebUI, Syncthing, Hermes Dashboard, Planning (`pi-durable.nix`); Plex in `hosts/studio.nix`. Each probes the address its tile opens where that differs from the listener: Hermes Dashboard through Tailscale Serve when published, Open WebUI at a new `services.open-webui.publicUrl` when set (Studio: its tunnel address), Plex on the tailnet address. The plain `blackbox.targets` they replace are dropped (one URL is probed once), and the module's default list is now empty. All 16 names the Hermes job checks are now probes. **Also:** `ServiceDown`'s summary and the Service Health dashboard's legends name a series by its `probe` label where it has one, by URL otherwise. **Tests** - `scripts/test_dashy_status_api.py` (21): the adapter against a stand-in Prometheus (queries made, green/failing/red/no data, Prometheus errors, refused names and targets, a 64-request burst), and Studio's evaluated and built Dashy (`conf.yml` dots all name probes the adapter answers; no probe means no dot; a link naming no probe is refused; no monitoring means no dots). - `scripts/test_monitoring_content_probes.py` (14): updated for the new probes and their fallbacks to the listener; the real blackbox_exporter passes each healthy body and fails each wrong one. - `scripts/test_studio_listener_exposure.py` (19) unchanged and passing. - Ten mutations (never red, no allowlist, any series passing, old scheme accepted, no link assertion, dot without a probe, size cap off, Serve branch off, Serve port dropped, publicUrl ignored) each fail a test. `test_monitoring_alert_webhook`, `test_omlx_module` and `test_hermes_updater` also pass. - `darwin-rebuild build --flake .#studio` builds. The built blackbox exporter, a scratch Prometheus with Studio's blackbox job and the built adapter answered all 16 names `Healthy` against the live services. **Review:** a visible Pi review approved with one should-fix (three probes skipped the address the tile opens) and five nits; all fixed, and the re-review approved with two optional nits, one fixed (docs). Live after the next `update-system`.
Each tile's dot now asks the status adapter for probe:///<name>, and the
adapter answers from probe_success{job="blackbox",probe="<name>"} for the
host's content probes only. Red after five minutes of failure (ServiceDown's
window) or no series; Prometheus unreachable is a 503.

Every tile that had a dot gets a content probe from its own module:
Grafana, Prometheus, Loki and Alertmanager (monitoring), Ollama, Open WebUI,
Syncthing, Hermes Dashboard, Planning (pi-durable), Plex (studio). The plain
targets they replace are dropped. ServiceDown's summary and the Service
Health dashboard name a series by its probe label where it has one.
Hermes Dashboard is probed through Tailscale Serve when published, Open
WebUI at its new publicUrl when set, and Plex on the tailnet address, as
the Hermes job did. The monitoring blackbox.targets default is empty, the
module probes merge with mkMerge, the no-data rule is documented, and the
size-cap test isolates the size check.
bryan manually merged commit dd9824addc into main 2026-11-10 20:08:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
ready-for-agent
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
bryan/nix-configs!16
No description provided.