Skip to content

Monitoring stack: Prometheus + Grafana dashboards#273

Draft
x3c41a wants to merge 1 commit into
feat/chain-exporterfrom
feat/monitoring
Draft

Monitoring stack: Prometheus + Grafana dashboards#273
x3c41a wants to merge 1 commit into
feat/chain-exporterfrom
feat/monitoring

Conversation

@x3c41a

@x3c41a x3c41a commented Jul 7, 2026

Copy link
Copy Markdown

Fourth slice of #267: the dashboards that make a stress run readable at a glance.

Stacked on #272 (the domain-state exporter), which provides most of the metrics these dashboards chart; base retargets to dev once #272 merges.

What it adds

monitoring/ — a docker-compose Prometheus + Grafana stack with provisioned dashboards.

Scrape targets (all on the host, reached via host.docker.internal):

  • web3-storage-chain — the domain-state exporter (chain-exporter.ts), :9700
  • parachain-node — the collator's built-in Substrate metrics, :9615
  • relay-node — the relay validator's metrics, :9616 (optional)

The collator and relay Prometheus ports are pinned in zombienet.toml (zombienet otherwise assigns a random port each run, which a static scrape config can't target).

Three provisioned dashboards (Grafana folder "Web3 Storage"):

Dashboard JSON is generated by grafana/gen-dashboards.mjs (dashboards-as-code) rather than hand-edited.

Also here

A small addition to the exporter (on the #272 branch): per-class block_weight_ref_time / block_weight_proof_size gauges from System.BlockWeight. Substrate's own Prometheus doesn't expose block weight, and it's the signal the Chain Health dashboard needs to show the deadline sweep spike.

Tested

Docker isn't available on my machine, so I verified the stack by running the real Prometheus and Grafana binaries natively against a live zombienet + exporter:

  • promtool check config passes on prometheus/prometheus.yml.
  • Prometheus scrapes parachain-node (:9615) and web3-storage-chain (:9700) — both targets up; every metric the dashboards query returns data (e.g. substrate_block_height{status="best"}, web3storage_block_weight_proof_size).
  • Grafana provisions the datasource (health check: "Successfully queried the Prometheus API") and all three dashboards, and a range query through Grafana's datasource proxy returns a live series.
  • The collator Prometheus-port pin was confirmed live (spawn command shows --prometheus-port 9615); the relay pin uses the identical zombienet mechanism.
  • All YAML/JSON config files parse.

docker compose up itself hasn't been run here (no Docker on this box); the compose file is standard and the config it mounts is the same one verified natively.

docker-compose bringing up Prometheus + Grafana that scrape the parachain
collator's Substrate metrics, the relay validator, and the domain-state
exporter (examples/papi/chain-exporter.ts). Three provisioned dashboards:
chain health (block height/finality/txpool/peers + per-class block weight),
economics (provider stake/balances/slashes/checkpoint accruals), and protocol
activity (agreements, challenge lifecycle, checkpoints). Dashboard JSON is
generated by grafana/gen-dashboards.mjs.

Pin the collator and relay Prometheus ports in zombienet.toml so the stack can
scrape them at fixed addresses.

Part of #267.
@x3c41a
x3c41a marked this pull request as draft July 7, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant