Alert Routing from Grafana is a monitoring workflow that chains Grafana + Slack to automate a common task. Grafana alerts are enriched with runbook links and routed to the correct Slack channel based on severity and team labels. Once configured, it saves ~5 hours/week per on-call rotation, plus 3x faster MTTR on incidents and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.
Grafana alerts are enriched with runbook links and routed to the correct Slack channel based on severity and team labels.
Hosted execution needs every MCP on the whitelist. Use the local CLI for this recipe until the missing MCPs are added.
Not yet hostable:
mcpizy recipe install grafana-slack-alert-routingGrafana has the metric data and alerting logic; Slack has the people who need to act. Routing alerts by team label with attached runbooks means whoever gets paged already knows what to do — no digging through wikis while production is on fire.
All alerts go to one #alerts channel. Engineers ignore it because it's too noisy. Critical alert missed. Postmortem blames the process.
Alerts route to the right team channel by severity. Runbook attached. Auto-resolves when the metric recovers. On-call engineer gets exactly what they need.
Concrete ROI — not marketing fluff.
Time saved
~5 hours/week per on-call rotation, plus 3x faster MTTR on incidents
This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.
You are an alert-routing agent. Receives Grafana webhook alerts.
On alert firing:
1. Read alert payload: labels (team, severity, service), annotations (runbook_url, summary, description)
2. Look up routing rules: routes.yaml matches labels.team + severity → slack_channel + mentions
3. Build Slack block:
- header: severity-colored emoji (:rotating_light: critical, :warning: warning)
- summary + description
- context: "runbook: <annotations.runbook_url>"
- actions: [Silence 1h] [Acknowledge] [View dashboard]
4. Call slack.send_message(channel=routed, blocks=[...], thread_ts=alert_group_id if exists)
5. Save thread_ts keyed by alert_group so subsequent firings update the same thread
On alert resolved:
6. Update original thread with ":white_check_mark: Resolved at ${timestamp}" and set reactions cleanup.
For critical severity, also call pagerduty if configured.How this workflow fires and what env vars you need.
POST /webhook/grafana (Grafana → Alerting → Contact points → Webhook)
GRAFANA_URLGrafana server URL
e.g. https://grafana.company.com
GRAFANA_WEBHOOK_SECRETShared secret for validating incoming webhooks
e.g. a-long-random-string
SLACK_DEFAULT_ALERTS_CHANNELFallback channel if no routing rule matches
e.g. #oncall
Install everything — MCPs, prompt, env template — in a single call.
$ mcpizy recipe install grafana-slack-alert-routing ✓ Installs all 2 MCP servers ✓ Writes prompt to ~/.mcpizy/prompts/grafana-slack-alert-routing.md ✓ Generates .env.example in current directory ✓ Ready to paste into Claude Code
Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.
$ mcpizy install grafana && mcpizy install slackGet a Slack alert whenever a critical Supabase table row is created, updated, or deleted — ideal for audit trails.
Sentry new issues are de-duplicated, enriched with commit info, and routed to the right Slack channel based on project.
Stream Postgres metrics — query latency, lock waits, vacuum stats — into Grafana for a live operations dashboard.
Connect ClickHouse to Grafana to build real-time analytics dashboards over billions of events with sub-second query times.
Alert Routing from Grafana is a monitoring automation that uses Grafana + Slack together via the Model Context Protocol. Grafana alerts are enriched with runbook links and routed to the correct Slack channel based on severity and team labels.
Setup takes around 10 min setup, intelligent alert routing. You install the required MCP servers with `mcpizy install grafana && mcpizy install slack`, connect your accounts, and the workflow is ready to run.
Once running, this workflow saves ~5 hours/week per on-call rotation, plus 3x faster MTTR on incidents. The concrete business value: Cuts incident response time from 30min to under 2min — the right person sees the right alert with the runbook attached; Kills alert fatigue: noisy #alerts channels become signal-rich team channels — on-call trust restored.
You need 2 MCP servers: Grafana (mcpizy install grafana), Slack (mcpizy install slack). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.
Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.
Install the required MCPs from the marketplace and automate this in 10 min setup.
$ mcpizy install grafana && mcpizy install slack
Free to install. Connect your accounts and this workflow runs itself.