feat(deploy): local Prometheus + Grafana stack for laptop demos#313
Merged
feat(deploy): local Prometheus + Grafana stack for laptop demos#313
Conversation
Adds a compose stack alongside the existing cloud-bound deploy so an operator without Grafana Cloud credentials can run the full live metrics surface on a laptop: - deploy/compose/local-stack.yml — Prom 2.55 + Grafana 10.4 with anonymous Admin role, loopback-only port mappings, host-gateway hint for Linux Docker, resource caps, log rotation. - deploy/prometheus/prometheus.yml — scrapes host.docker.internal:9091 (native bot) and charon:9091 (compose bot), loads the existing alerts.yaml via rule_files. - deploy/grafana/provisioning/datasources/prometheus.yml — registers the in-stack Prometheus at UID `prometheus` so the dashboard JSON's template default resolves on first load. - deploy/grafana/provisioning/dashboards/charon.yml — file provider that auto-loads deploy/grafana/charon.json into the Charon folder. The cloud-bound stack (alloy -> Grafana Cloud) is untouched. Closes #311.
The grafana-lint CI workflow path-filter triggers on every change under deploy/grafana/**. Putting the provisioning yamls inside that tree re-triggered an unrelated --strict lint of charon.json that already fails on main (pre-existing, tracked separately). Moving the two provisioning files into a sibling deploy/grafana-provisioning/ keeps the dashboard artefacts (charon.json, alerts.yaml) under the linted path while the Grafana boot-time config lives outside it. local-stack.yml mount path updated to match.
This was referenced Apr 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deploy/compose/local-stack.yml(Prometheus 2.55 + Grafana 10.4, anonymous Admin, loopback-only ports, resource caps).deploy/prometheus/prometheus.ymlwith two scrape targets (host.docker.internal:9091for native bot,charon:9091for compose bot) and the existingdeploy/grafana/alerts.yamlloaded viarule_files:.deploy/grafana/charon.jsonauto-loads at compose-up time.Cloud-bound stack (
docker-compose.yml+ Alloy -> Grafana Cloud) is untouched.Closes #311.
Why
README explicitly states no local Prom or Grafana ships in
deploy/compose/. Operators without Grafana Cloud credentials had no turnkey path to validate metrics changes locally. This adds a self-contained laptop stack so:cargo run -- --config config/default.toml listen+docker compose -f deploy/compose/local-stack.yml up -dand have live panels within 30 s,Test plan
docker compose -f deploy/compose/local-stack.yml configvalidates (no Docker on this machine; verified yaml structurally).docker compose -f deploy/compose/local-stack.yml up -d->prometheus+grafanacontainers Up.cargo run -- --config config/default.toml listen(separate terminal) emits on:9091.http://localhost:9090/targetsshows jobcharonUP within 30 s.http://localhost:3000/d/charon-v0renders the Charon dashboard with no manual import; scanner-block-rate panel non-empty within 60 s.http://localhost:9090/api/v1/rulesreturns thecharon-availabilityrule group fromalerts.yaml.docker compose -f deploy/compose/docker-compose.yml configstill resolves (cloud stack untouched).Security notes
127.0.0.1:so the stack does not expose Grafana to the LAN.local-stack.ymlwarns against widening the bind.