Skip to content

PopSQL: limited support.

Migrate now →

Opsgenie

Wiring up Opsgenie: what to create at the provider, what to paste here, what goes in Target, and how to test before depending on it.

What it is

Alert API. Every alert becomes an Opsgenie alert with the alert id as alias, so repeats do not pile up.

Set up

About 5 minutes to a working channel.

  1. 01Create an API integration. Opsgenie → Teams → the team → Integrations → Add integration → “API”. Copy the API key and make sure “Create and update access” is on.
  2. 02Paste the key, choose the region, then Test. Test creates an alert tagged datarunner-test with the lowest priority and closes it.
  3. 03Put it on an alert route. Monitoring → Alert routes → add this channel as a step. Alert severity maps to priority: critical → P1, major → P2, minor → P3, else P4.

Fields

FieldRequiredWhat it is
API keyYesFrom an API integration with create/update access.
EU regionNoOn for accounts at app.eu.opsgenie.com.
Default priorityNoUsed for report deliveries. Alerts map their own severity. P1 — critical · P2 — high · P3 — moderate · P4 — low · P5 — informational

What goes in Target

Not used. Routing to teams is configured on the Opsgenie integration.

Target is optional for this channel. — not used

Test

Every channel has a Test button in the channel list (Settings → Channels). The result is kept — date, status and the provider's error when there was one — and a channel that was never tested is marked in the list.

Test reads the alert list with the API key (one read, no alert created). A key from the wrong region fails here, not on call.

Check it end to end

  1. 01Report: open a report, add this channel under Destinations (with the Target when the channel needs one), click Run now and open the run. The log says which channel each recipient went through and what the provider answered.
  2. 02Alert: under Monitoring → Alert routes, create a route with this channel as an escalation step. Routes match on severity and source; the first match wins.
  3. 03To fire an alert without breaking anything: create an HTTP monitor pointing at a URL that returns an error (for example https://httpstat.us/500) with a short interval. When it goes down the alert leaves through the route; delete the monitor afterwards. The message carries an acknowledge link — click it and the escalation stops.
  4. 04Report rules (new rows, value out of range) arrive through the same route, with source "report rule".

What most often goes wrong

An account hosted in the EU has to tick “EU region” — the default api.opsgenie.com answers 401 for EU keys, which looks exactly like a wrong key.