Repository navigation
feat(monitoring): scrape the public gateway, with its dashboard and alert rules - #188
Merged
Merged
Conversation
…lert rules - grafana_alloy: grafana_alloy_decdn_gateway_enabled (from decdn_gateway_hosts), _job and _service_name; the gateway's loopback metrics scraped as job="decdn-gateway" (both runtimes; Compose wires its profile with the Compose PR), its journal stream labelled and re-levelled as plain text. Render cases gatewayonly and colocatedgateway, validate.sh asserts, validation-alloy negatives. - monitoring/decdn-gateway/: a dashboard (uid decdn-gateway: requests by answer, bytes, pulls in flight, 402/503/502, pointer updates, logs), rule group decdn-gateway (DecdnGatewayDown with the absence arm, DecdnGatewayPoolCannotPay, DecdnGatewayAllowanceSpent, DecdnGatewayPullFailures) with promtool tests, and exported-metrics.txt captured from decdn 0.3.0. make lint-helm checks the names against it, as it does the relay's. Refs #176 Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
| "type": "prometheus", | ||
| "uid": "${DS_PROMETHEUS}" | ||
| }, | ||
| "expr": "up{job=\"decdn-gateway\", instance=~\"$instance\"}", |
Contributor
Author
There was a problem hiding this comment.
Fixed in e3c… — the stat's target is now an instant query, so a host whose agent is gone shows no data rather than a stale UP. (The iroh-relay dashboard's up stat has the same shape; left for a separate change.)
A range query with lastNotNull kept a stale green UP while the host or its agent was gone (Copilot review on #188). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 31, 2026
Merged
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
Second of three PRs for #176, after #187. It adds metrics, logs, a dashboard and alerts for the public gateway.
Alloy
grafana_alloy_decdn_gateway_enabledtoggle, derived fromdecdn_gateway_hostsinplaybooks/group_vars/all.yml, plus_job(decdn-gateway) and_service_name, both validated in preflight.127.0.0.1:9094) under its own identity relabel, in both runtimes. The compose branch is wired up in PR 3, socompose/alloy/config.alloyis unchanged here.decdn-gateway.servicejoins the plain-text units: labelledservice_name, re-levelled, and exempt from the priority guardrail. The gateway is the decdn CLI, which logs tracing's plain text.gatewayonlyandcolocatedgatewayrender cases,validate.shasserts (including the fallback port matching the role default), and threevalidation-alloynegatives.monitoring/decdn-gateway/Dashboard
dashboard-decdn-gateway.json(uiddecdn-gateway), built from the relay dashboard's panels and variables. It shows up, requests and bytes per day, pulls in flight, 503s per day, requests per minute by answer, bandwidth, the 402/503/502 refusals, pointer updates and the log.Rules
prometheus-alerts.yml, groupdecdn-gateway:DecdnGatewayDownDecdnGatewayPoolCannotPayDecdnGatewayAllowanceSpentDecdnGatewayPullFailurespromtool tests cover every rule.
exported-metrics.txt, captured from the real decdn 0.3.0 gateway.render-test.sh's exported-name check now runs over both the relay and the gateway, so everydecdn_gateway_*name a panel, rule or test uses is checked in CI.render-test.shalso gets promtool check and test for the new directory, the dashboard-uid check, and the package-leak name list with a negative case.Docs:
monitoring/README.md(a section, plus the*Downlist), the grafana-dashboards skill, AGENTS.md, and the Alloy and gateway role READMEs. After this merges, publishing the dashboard and rules to the live Grafana folder is decdn/fleet#47's task.Test plan
make lint-alloy: the real pinned Alloy validates every render, includinggatewayonlyandcolocatedgateway.scripts/render-compose-alloy.sh --checkreports no change.make molecule SCENARIOS=validation-alloymake lint-helm: promtool check and test for all four rule sets, unique dashboard uids, the gateway names inexported-metrics.txt, the package-leak negative.make lint,make lint-ansible,make test-scriptsRefs #176
🤖 Generated with Claude Code