Skip to content

Manage production's alert rules and Discord contact point from the repository - #1888

Merged
rdimitrov merged 1 commit into
mainfrom
rdimitrov-registry-usage-dashboard-preview
Nov 21, 2026
Merged

rdimitrov merged 1 commit into
mainfrom
rdimitrov-registry-usage-dashboard-preview

Conversation

@rdimitrov

Copy link
Copy Markdown
Member

What

Adds mcp-registry:alertDiscordWebhook to deploy/Pulumi.gcpProd.yaml as an encrypted secret. Nothing else changes in the repository; the alerting files and the code that provisions them were merged earlier and stay dormant until this key is set.

Merging this deploys to production.

What the deploy will do

  • Create a Secret holding the webhook and a ConfigMap holding the alerting files, and restart Grafana once with both mounted.
  • Grafana then adopts, by uid, its four existing alert rules and the "Registry Dev" Discord contact point. From then on they can only be changed through this repository. This cannot be undone by removing the files; removal needs an explicit delete file (see "Removing rules" in deploy/README.md).
  • "Registry Service Down" changes its query to the scrape state of the registry pods. The gauge it reads today is only ever set to 1, so its threshold could never be met.
  • Two new rules for the usage collector are created in the same folder: a missed day, and drift between the log-based estimate and the gateway counters.
  • The notification policy tree is not touched.

Checked before opening this

  • The webhook is the one the existing contact point uses; Discord confirms it exists (a lookup, which posts nothing). The stack file holds it only in encrypted form, and the encrypted value decrypts back to the same text.
  • Production's four rules are unchanged since they were exported for the repository: same uids, group, folder, interval and pending periods. All ten alert instances are Normal, and nothing in production is file-provisioned for alerting yet.
  • With today's data the two new rules evaluate to Normal.
  • go -C deploy test ./... and the deploy script tests pass, including the check that no stack file carries the webhook in plain text.

Evidence from earlier work

  • The takeover was rehearsed on Grafana 12.4.14 with PostgreSQL against a state equal to production's: same uids kept, no duplicates, no notification and no state change when every rule is Normal, and a new pod that cannot load the files never becomes ready, so the old one keeps serving.
  • The pieces this deploy relies on have each run in a real cluster for the usage collector: a ConfigMap mounted at Grafana's alerting directory, a variable taken from a Secret, and the restart annotation.

Not verified before the deploy

  • These alerting files have not been applied in staging: there is no test webhook for it. Production is the first real application of the rules and the contact point.

After the deploy

Check that Grafana restarted, that six rules and the contact point exist with the original uids and are marked as file-provisioned, that every instance is still Normal, and that Grafana sent no notification during the takeover.

…pository

Set the Discord webhook as an encrypted secret in the production stack.
This switches on the alerting files that are already in the repository:

- Grafana adopts its four existing alert rules and the "Registry Dev"
  contact point by uid, and from then on they can only be changed
  through this repository.
- "Registry Service Down" starts to watch the scrape state of the
  registry pods, which can report an outage; the gauge it read before
  is only ever set to 1.
- The two usage collector rules are created: a missed day, and drift
  between the log-based estimate and the gateway counters.

The webhook is the one the contact point already uses, so
notifications keep going to the same channel.

Co-authored-by: Copilot App <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The first live production rollout lacks staging coverage and persistently adopts existing Grafana alerting objects, requiring human confirmation of the encrypted webhook destination and rollout readiness.

No open issues 🎉

What changed in this PR

Activates the registry’s existing Grafana alert-provisioning setup in production. Merging triggers a production deployment; no provisioning code or alerting files change.

Changes:

  • Adds the encrypted mcp-registry:alertDiscordWebhook setting.
  • Enables adoption of four existing alert rules and the Discord contact point, plus two usage-collector alerts, without changing notification policies.
File Description
deploy/​Pulumi.gcpProd.yaml Configures the encrypted webhook that activates production alert provisioning.

Review effort: Balanced

@rdimitrov
rdimitrov merged commit 817f2cc into main Nov 21, 2026
10 checks passed
@rdimitrov
rdimitrov deleted the rdimitrov-registry-usage-dashboard-preview branch November 21, 2026 20:44
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.

2 participants