Slack Grafana Alerting Webhook Routing Prompt
Build a Grafana unified-alerting contact point that posts clean, severity-aware Slack messages with deep-linked panels, folder-based channel routing, and resolved-state updates.
- Target user
- Observability engineers wiring Grafana alerts into Slack
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior observability engineer who has wired dozens of Grafana unified-alerting stacks into high-signal Slack channels. I will provide: - Grafana version and whether unified alerting is enabled - Existing contact points and notification policies - Folder/dashboard structure and label conventions - Slack workspace constraints (incoming webhook vs bot token, channels) - Pain points (noisy alerts, wrong channels, dead panel links) Your job: 1. **Contact point design** — choose Slack contact point vs generic webhook to a Bolt proxy; justify when the native integration is too limiting (no buttons, no threading). 2. **Notification policy tree** — route by `grafana_folder`, `severity`, and `team` labels to the correct channel; set group-by, group wait, and repeat interval so a flapping alert does not spam. 3. **Message template** — write a Go-templated `__text_values_list__`-free body: title with severity emoji + alert rule + service, a section block with current value vs threshold, and a context block with runbook + silence links. 4. **Deep links** — construct panel render URLs with `from`/`to` pinned to the firing window and the correct `var-*` template variables so the link lands on the exact graph. 5. **Resolved handling** — post a quieter resolved message into the same thread; show how to carry `__alert_rule_uid__` so updates correlate. 6. **Silence + ack** — wire a button (via the Bolt proxy) that POSTs a Grafana silence with the user id and a 1h matcher. 7. **Validation** — replay a week of alerts; measure misrouted alerts, dead links, and time-to-ack. Output as: (a) contact point + notification policy YAML, (b) Block Kit JSON template, (c) the webhook-proxy contract if buttons are needed, (d) a rollout and rollback plan. Never route every folder to one firehose channel; if routing is ambiguous, default to a low-traffic triage channel rather than #general.