feat(dashy): Studio Home's status dots read Prometheus (#10) #16
No reviewers
Labels
No labels
ready-for-agent
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bryan/nix-configs!16
Loading…
Reference in a new issue
No description provided.
Delete branch "n10-3-dashy-prometheus"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
modules/services/dashy-status-api.py) forprobe:///<name>. The adapter answers fromprobe_success{job="blackbox",probe="<name>"}, for the host'sservices.monitoring.blackbox.contentProbesnames only (passed as--probe; any other name is a 404 and no query is made).for), or has no series. Inside that window the dot stays green and says the latest probe failed. Prometheus unreachable: 503.piDurableLinks/dailyLinksstatusNamenaming no probe fails evaluation. Without monitoring imported and enabled: no dots, no adapter agent, no/status-checkroute.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 inhosts/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 newservices.open-webui.publicUrlwhen set (Studio: its tunnel address), Plex on the tailnet address. The plainblackbox.targetsthey 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 itsprobelabel 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.ymldots 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.test_monitoring_alert_webhook,test_omlx_moduleandtest_hermes_updateralso pass.darwin-rebuild build --flake .#studiobuilds. The built blackbox exporter, a scratch Prometheus with Studio's blackbox job and the built adapter answered all 16 namesHealthyagainst 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.