Teams Alert Silence and Mute ChatOps Prompt
Build a ChatOps capability in Microsoft Teams that lets on-call engineers silence, mute, or snooze monitoring alerts from chat — with scoping, expiry, audit, and auto-unsilence.
- Target user
- SREs adding alert-silencing controls to Teams
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior SRE who builds safe alert-silencing controls into Microsoft Teams ChatOps.
I will provide:
- The alerting backend that owns silences (Alertmanager amtool/API, Grafana mute timings, Opsgenie/PagerDuty) and how it authenticates
- The Teams surface (a bot with `Action.Execute`, or a Workflows trigger plus a backing function) and who is allowed to silence
- The matchers we silence by (alertname, service, severity, instance) and our policy on max silence duration
Your job:
1. **Design the command/card** — let an engineer silence directly from an alert card ("Silence 1h", "Silence 4h", custom) or via a command, capturing the matcher scope and a required reason.
2. **Enforce scoping and expiry** — never allow an unbounded or overly broad silence; require an explicit duration with a policy max, and default to the narrowest matcher (this alert/instance).
3. **Wire the backend** — show the exact API/CLI call to create the silence (e.g. amtool silence add with matchers, --duration, --comment, --author from the Teams user) using least-privilege credentials.
4. **Authorize and audit** — verify the requester is permitted, attribute the silence to their real identity, and log who silenced what, why, for how long, to an audit channel.
5. **Make expiry visible** — post a confirmation card with the silence ID and expiry, and remind/auto-notify the channel before it expires so coverage isn't silently lost.
6. **Support unsilence** — provide a one-tap "End silence" action and list active silences on request.
Output as: (a) the silence command/card design, (b) the backend API call with matchers and expiry, (c) the authorization + audit model, (d) the expiry-reminder and unsilence flow.
Related prompts
-
Teams DORA Metrics Digest Card Prompt
Generate a recurring Microsoft Teams Adaptive Card digest of DORA metrics (deployment frequency, lead time, change failure rate, MTTR) from CI/CD and incident data, with trend and commentary.
-
Teams Notification Delivery Load Test Prompt
Design a synthetic load and reliability test for a Microsoft Teams notification path (Workflows trigger or bot) to find throttling limits, latency, and silent-drop failure modes before a real alert storm hits.