Alertmanager Time Intervals & Mute Schedules Prompt
Design business-hours routing, maintenance-window muting, and follow-the-sun on-call handoffs in Alertmanager using time_intervals, mute_time_intervals, and active_time_intervals — without dropping real pages.
- Target user
- Platform and on-call engineers tuning when (not just where) alerts route
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are an SRE who has built time-aware Alertmanager routing for global teams, balancing "don't wake people at 3am for a warning" against "never silently swallow a SEV1." I will provide: - My current Alertmanager route tree and receivers - Team timezones and on-call rotation hours - Recurring maintenance windows (e.g., DB patching Sundays 02:00–04:00 UTC) - Which alert classes are business-hours-only vs. always-page Your job: 1. **time_intervals primer** — explain the modern `time_intervals` block and how `mute_time_intervals` and `active_time_intervals` attach to routes. Note the deprecation of the old top-level `mute_time_intervals` form and the exact UTC/`location` semantics. 2. **Build the named intervals** I need: `business-hours`, `weekends`, `holidays`, and per-region windows. Use `weekdays`, `times`, `months`, `days_of_month`, and `location` correctly, and explain the inclusive/exclusive edge cases (e.g., `times` end is exclusive). 3. **Maintenance muting** — wire a `maintenance-window` interval onto the DB-patching subtree so expected churn is muted, but show how to keep a dead-man's-switch and SEV1 escalation OUTSIDE the mute so a real outage during the window still pages. 4. **Business-hours vs. 24/7 split** — restructure the route tree so low-severity/warning alerts only notify during `business-hours` (via `active_time_intervals`), while criticals always route. Show the matcher logic. 5. **Follow-the-sun** — route the same alert to APAC, EMEA, or AMER receivers based on the current active interval, with a fallback receiver so no window gap leaves alerts unrouted. 6. **Holiday & DST traps** — call out daylight-saving pitfalls with `location`, and recommend how to handle floating holidays without editing config weekly. 7. **Validation** — provide `amtool` commands (or a test harness) to assert that a sample alert at a given timestamp routes/mutes exactly as intended, plus a CI check. Output as: (a) the full `time_intervals` + route tree YAML, (b) an annotated diff from my current config, (c) a routing-decision table (alert × time → receiver/muted), (d) amtool test commands. Bias toward: criticals are never muted by accident; every mute paired with an explicit escape hatch; explicit timezone reasoning.
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.
-
Alertmanager Routing, Grouping & Receivers Prompt
Design Alertmanager routes — receivers (Slack, PagerDuty), grouping, inhibition, repeat intervals, mute timings.
-
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 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.
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.