alertmanager
alertmanager
Prometheus Alertmanager API v2 -- alerts, silences, receivers, alert groups, status, and operational health
Source: Prometheus Alertmanager API v2
Coverage
100% (14 of ~14 endpoints)
Focus: alerts (list, create/update, groups), silences (CRUD), receivers (list), status, health/ready/reload
Missing: metrics and pprof debug endpoints (not useful for API consumers)
Setup
- Alertmanager has no built-in auth by default. If --web.config.file is configured with basic_auth_users:
- 1. Open the web.config.yml used by your Alertmanager instance
- 2. Find or add your username under basic_auth_users
- 3. Generate a bcrypt hash of your password: htpasswd -nBC 10 '' | tr -d ':\n'
- 4. Add the username: bcrypt_hash pair to basic_auth_users
- 5. Reload Alertmanager config (POST /-/reload or send SIGHUP)
- If no auth is configured, leave credentials empty or use a reverse proxy for auth
Environment variable: ALERTMANAGER_URL
Default port is 9093. Set ALERTMANAGER_URL to http(s)://host:9093. For HA setups, point to any cluster member or a load balancer.
Install
Add to your backends.yaml:
alertmanager.dadl Set the credential:
ALERTMANAGER_URL=your-token-here Tools (12)
GET get_status Get Alertmanager status including version, config, uptime, and cluster state GET get_health Health check — returns 200 if Alertmanager is running (liveness probe) GET get_ready Readiness check — returns 200 when Alertmanager is ready to serve traffic GET list_alerts List alerts with optional filters by state, receiver, and label matchers POST post_alerts Create new alerts or update existing ones. Alerts are matched by label fingerprint. Set endsAt to resolve. GET list_alert_groups Get alerts grouped by the routing tree configuration GET list_silences List all silences, optionally filtered by label matchers GET get_silence Get a single silence by its ID POST post_silence Create a new silence or update an existing one. Include id to update, omit to create. DELETE delete_silence Expire (delete) a silence by its ID. This immediately stops the silence from suppressing alerts. GET list_receivers List all configured notification receiver names POST reload_config Trigger a configuration reload (equivalent to sending SIGHUP to the process)