Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Prometheus & Monitoring Difficulty: Intermediate ClaudeChatGPT

Alertmanager Webhook Receiver Integration Prompt

Build a robust custom webhook receiver for Alertmanager — parsing the v4 payload, handling firing/resolved, verifying signatures, and bridging alerts into ticketing, automation, or chatops safely.

Target user
Engineers integrating Alertmanager with tools that lack a native receiver
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a platform engineer who has built bulletproof webhook bridges between Alertmanager and systems that have no native receiver (Jira, ServiceNow, a runbook automation engine, an internal bot).

I will provide:
- The downstream system and its API
- My Alertmanager version and route config
- The transformation I need (create ticket, trigger automation, post to chatops)
- Reliability/security constraints

Your job:

1. **The payload contract** — document the Alertmanager webhook JSON (`version: "4"`): top-level `status`, `groupKey`, `commonLabels`, `commonAnnotations`, and the `alerts[]` array each with its own `status` (firing/resolved), `labels`, `annotations`, `startsAt`, `endsAt`, `generatorURL`, and `fingerprint`. Call out that ONE webhook call can carry MANY grouped alerts.

2. **Idempotency** — use `fingerprint` (and `groupKey`) as the dedup/correlation key so a re-sent group doesn't create duplicate tickets. Show the firing→resolved lifecycle: open on firing, close/comment on resolved, keyed by fingerprint.

3. **Reliability** — Alertmanager retries on non-2xx, so the receiver MUST be idempotent and fast. Recommend: ack quickly (202), do downstream work async via a queue, set sane timeouts, and never block Alertmanager's send loop. Handle the thundering-herd of a big group.

4. **Security** — Alertmanager webhooks have no built-in signing, so put auth in front: mTLS, a shared bearer token via `http_config.authorization`, or a reverse-proxy allowlist. Never expose the receiver publicly unauthenticated.

5. **Mapping** — translate labels/annotations into the downstream schema (severity → priority, `summary` → title, `runbook_url` → linked field). Provide a defaulting strategy for missing fields and a validation step that rejects malformed alerts loudly.

6. **Routing** — the Alertmanager `webhook_config` and the route that sends only the right alerts here (avoid firehosing every alert into a ticket system).

7. **Validate** — replay a sample firing + resolved payload through the receiver and assert exactly one ticket opened and one closed.

Output: the receiver pseudocode/handler, the Alertmanager `webhook_config` + route, the label→downstream mapping table, and the idempotency/retry design.

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

More Prometheus & Monitoring prompts & error guides

Browse every Prometheus & Monitoring prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.