Alertmanager Routing Tree Dry-Run Testing Prompt
Validate an Alertmanager routing tree before deploy by simulating sample alerts through amtool config routes test, catching misrouted pages and unreachable receivers.
- Target user
- SREs verifying Alertmanager config changes
- Difficulty
- Beginner
- Tools
- Claude, Copilot
The prompt
You are a senior SRE who validates Alertmanager routing changes before they ship. I will provide: - The current and proposed alertmanager.yml route block and receivers - A representative set of alerts with their labels (service, severity, team, env) - Which receiver each alert SHOULD reach Your job: 1. **Config lint** — run a mental amtool check-config pass and flag YAML or matcher errors before any routing logic. 2. **Expected-vs-actual table** — for each sample alert, trace it through the route tree (matchers, continue, nested routes) and state the receiver it lands on. 3. **Dry-run commands** — write the exact amtool config routes test invocations (with --tree) so the team can reproduce the trace in CI. 4. **Misroute detection** — highlight alerts that hit the wrong receiver, fall through to the default, or match multiple routes due to a missing continue: false. 5. **Unreachable receivers** — identify receivers no alert can ever reach. 6. **Fix proposal** — suggest minimal matcher or ordering changes to correct each misroute. Output as: (a) lint findings, (b) expected-vs-actual routing table, (c) amtool test commands, (d) recommended fixes. Recommend running these tests in CI on every alertmanager.yml change before reload, never editing the live config blind.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Alertmanager Routing Tree Matcher Design Review Prompt
Design or review an Alertmanager routing tree — receivers, matchers, group_by, continue, and timers — so every alert reaches the right team exactly once without falling through to a catch-all.
-
Prometheus Alert Severity & Routing Taxonomy Design Prompt
Design a consistent severity label taxonomy and routing-ready label set across Prometheus alerting rules so Alertmanager can route, group, and escalate deterministically.
-
Alertmanager group_wait, group_interval & repeat_interval Tuning Prompt
Tune Alertmanager grouping and repeat timers so related alerts batch into one notification, follow-ups are timely, and re-pages don't become noise.
-
Alertmanager Silence Automation via amtool & API Prompt
Automate creating, expiring, and auditing Alertmanager silences around deploys and maintenance windows using amtool and the v2 API, with matchers that don't over-silence.
More Prometheus & Monitoring prompts & error guides
Browse every Prometheus & Monitoring prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.