Guide · Prometheus Alertmanager
Alertmanager: replace Opsgenie by changing api_url.
Your opsgenie_configs receiver stays. Your routes, inhibitions and templates stay. You change
two lines — api_url and api_key — and the next alert pages your on-call person in
TeamPager instead of Opsgenie.
Part of Migrate from Opsgenie. Last tested November 26, 2026 with Alertmanager v0.28.1.
The change
Before and after.
Find the receiver that uses opsgenie_configs in alertmanager.yml. Only the two
marked lines change.
Before — Opsgenie
receivers:
- name: on-call
opsgenie_configs:
- api_key: <Opsgenie API key>
# api_url defaults to https://api.opsgenie.com/
# (EU accounts: https://api.eu.opsgenie.com/)
message: '{{ .CommonLabels.alertname }} on {{ .CommonLabels.instance }}'
priority: P2
tags: 'prod,db'
After — TeamPager
receivers:
- name: on-call
opsgenie_configs:
- api_url: https://hooks.teampager.io/opsgenie/{org id}/ # changed
api_key: <TeamPager webhook key> # changed
message: '{{ .CommonLabels.alertname }} on {{ .CommonLabels.instance }}'
priority: P2
tags: 'prod,db'
Both values are in TeamPager under Organization → Integrations → Opsgenie API, with your org id
already filled in. Only an owner can show the key. api_key_file works too, if you keep secrets
in files.
Set in global: instead? Change opsgenie_api_url and opsgenie_api_key
there; every Opsgenie receiver follows. Then reload: curl -X POST http://localhost:9093/-/reload
or send SIGHUP.
Behavior
What carries over, and what doesn't.
| Alertmanager field | In TeamPager |
|---|---|
message | The page title — what your on-call person reads first. |
| Alias (set by Alertmanager from the group key) | Deduplication. Repeats of the same group don't page twice while the page is open. |
send_resolved (default true) | When the alert resolves, the page resolves and the escalation chain stops. Leave it on. |
| Same alert firing after it resolved | A new page. Never swallowed. |
description, priority, tags, details | Accepted and kept with the page. Priority doesn't change who is paged or how fast. |
responders | Ignored. Who gets paged is the board's rota and escalation chain, set in TeamPager. |
update_alerts, notes, acknowledge | Accepted and ignored. People ack in TeamPager, not from your monitoring tool. |
One board per receiver. Pages go to your oldest board. To send a receiver to a specific
team, add boards/{board id}/ after your org id:
https://hooks.teampager.io/opsgenie/{org id}/boards/{board id}/. Each board's address is in
the same Opsgenie tab.
Test
Fire one test alert.
You don't need Prometheus to test the receiver: post an alert straight to Alertmanager's API.
-
Fire.
curl -XPOST http://localhost:9093/api/v2/alerts \ -H 'Content-Type: application/json' \ -d '[{"labels":{"alertname":"TeamPagerTest","instance":"test-1"}}]'Aftergroup_wait(30 s by default), the page shows up in Alerts and the person on call is paged. In our test it arrived about 10 seconds aftergroup_wait. -
Resolve. Send the same alert with an
endsAtin the past — or wait forresolve_timeout(5 minutes by default). The page resolves; the card says Your alert source resolved this page.curl -XPOST http://localhost:9093/api/v2/alerts \ -H 'Content-Type: application/json' \ -d '[{"labels":{"alertname":"TeamPagerTest","instance":"test-1"},"endsAt":"2020-01-01T00:00:00Z"}]' -
Check the logs.
docker logs alertmanager(or your service logs) should show noopsgenienotify error. A401means the key is wrong or was rotated.
Switching safely
Run both for a week.
Keep Opsgenie as it is and add a second receiver. continue: true lets one alert reach both.
Remove the old route once you trust the new one.
route:
receiver: opsgenie
routes:
- receiver: teampager
matchers: [ 'severity=~"critical|warning"' ]
continue: true
- receiver: opsgenie
matchers: [ 'severity=~"critical|warning"' ]
receivers:
- name: opsgenie
opsgenie_configs:
- api_key: <Opsgenie API key>
- name: teampager
opsgenie_configs:
- api_url: https://hooks.teampager.io/opsgenie/{org id}/
api_key: <TeamPager webhook key>
Tell your on-call people they'll be paged twice for a while — once by each tool.
Questions.
Do I need to change my Alertmanager routes or templates?
No. Only api_url and api_key change. The message you already
template becomes the page title.
Does it work with the EU Opsgenie endpoint?
Yes. Whichever Opsgenie host you used, you replace api_url with your TeamPager address.
Will Alertmanager's repeat_interval page people again?
No. Repeats carry the same alias, and the same alias doesn't page twice while the page is open. After the page resolves, the same alert firing again is a new page.
Can I use TeamPager's own webhook instead?
Yes. Organization → Integrations also has an Alertmanager recipe with a plain webhook_configs
receiver. With an Opsgenie receiver already in place, the Opsgenie format is the shorter path — and only
that format resolves pages from the source.
Point one receiver at TeamPager.
Create an organization, copy the URL and key, change two lines. Free covers five people on call. Next: Grafana contact points · heartbeats · the full migration guide.