Manage Alertmanager silences programmatically via the Alertmanager HTTP API

domain: prometheus.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. List existing silences with GET /api/v2/silences (optionally filtered), and fetch a single silence with GET /api/v2/silence/{silenceID}.
  2. Create a silence with POST /api/v2/silences, sending a JSON body containing matchers (each with name, value, isRegex/isEqual), startsAt and endsAt as RFC3339 timestamps, createdBy, and comment; the response returns the generated silenceID.
  3. To update a silence, POST /api/v2/silences again including the existing silence's id in the payload, which effectively expires the old one and creates a replacement with the new id.
  4. Expire (delete) an active silence with DELETE /api/v2/silence/{silenceID}; this marks it expired rather than physically removing history immediately.
  5. Use the amtool CLI (amtool silence add/query/expire) as a reference client if you want to confirm the exact JSON matcher/label formats the API expects.
  6. Authenticate/network-restrict access to the API as needed (Alertmanager itself has no built-in auth), typically via a reverse proxy in front of the :9093 API port.

Known gotchas

Related routes

Manage Grafana mute timings via the Alerting Provisioning HTTP API
grafana.com · 5 steps · unrated
Configure Prometheus Alertmanager routing tree with inhibition rules and receiver grouping to reduce alert noise during incidents
prometheus.io · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans