In Flashduty On-call
You can get the push URL in either of two ways.
Dedicated integration
- In the Flashduty console, select Channels and open a channel
- Select Settings → Integrations → Dedicated Integrations, then click Add an Integration
- Select Opsgenie Compatible and click Save
- Open the generated integration card and copy the Push URL
Shared integration
- In the Flashduty console, select Integration Center → Alert Events
- Select Opsgenie Compatible and enter an integration name
- Configure the default route and pick a channel; you can add more rules under Routes after creating it
- Click Save and copy the generated Push URL
Push URL
The push URL has this format, with
integration_key as part of the path:
v2/alerts and v2/alerts/<alias>/close to the API URL, which can drop an integration_key query parameter or put it in the wrong place, so Flashduty reads integration_key from the path. The Authorization: GenieKey <key> header is not used for authentication; if the client requires it, enter any non-empty value.
Supported endpoints:
A successful request returns HTTP 202 and
{"result": "Request will be processed", "took": 0, "requestId": "..."}, the same as Opsgenie.
Configure in Prometheus Alertmanager
Add
opsgenie_configs to a receiver in alertmanager.yml and set api_url to the push URL:
- Only with
send_resolved: truedoes Alertmanager send a Close request when the alert resolves - Alertmanager puts the common labels of the group in
detailsby default, and Flashduty keeps them as alert labels - Without
priority, Opsgenie’s defaultP3applies, which is Warning - The Update Message and Update Description requests sent with
update_alerts: trueare accepted and ignored; the title and description update with the next Create request
Configure in Grafana
1
Create an OpsGenie contact point
- Go to Alerting → Contact points and click + Add contact point
- Set Integration to OpsGenie
- Enter any non-empty value in API Key
-
Set Alert API URL to the push URL followed by
v2/alerts: - Select Auto close incidents; otherwise Grafana sends no Close request when the alert resolves
- Keep Send notification tags as at the default Tags, or choose Tags & Extra Properties
2
Route alerts to it
In Notification policies, route the alerts you want to push to this contact point.
3
Verify the lifecycle
Let an alert rule go to Firing and confirm Flashduty receives the alert; then let the rule return to Normal and confirm the same alert recovers.
tags as key:value, and Flashduty turns them back into labels of the same name. Grafana sends no priority by default, so P3 (Warning) applies. To set the severity per rule, turn on Override priority in the contact point and add the label og_priority with a value from P1 to P5 to the alert rule.
The contact point’s Test button uses a new alias on every press, so each press opens a separate Warning alert in Flashduty that never recovers on its own. Close it by hand.
Other tools
Any tool that lets you change the Opsgenie API URL and closes alerts by alias works with this integration: replace the API URL with the push URL (with or without
v2/alerts, depending on how the tool appends paths), and send Close requests with identifierType=alias.
Not supported:
- Closing by id or tiny id: Flashduty does not issue Opsgenie alert IDs, so
identifierTypeset toid,tinyor left empty returns 422 - Read endpoints:
GETrequests (such asv2/alerts/requests/<requestId>) are not supported. Zabbix’s built-in Opsgenie media type polls that endpoint; use the Zabbix integration instead - Aliases that contain
/: the alias is part of the URL path, so such requests match no endpoint
Alert Key
The request’s
alias is the Alert Key. Opsgenie defines alias as the “client-defined identifier of the alert, that is also the key element of Alert De-Duplication” (Alert API). Create requests with the same alias merge into one alert, and a Close request recovers that alert by alias. Alertmanager and Grafana both use a hash of the alert group as the alias, which stays the same from trigger to recovery.
Without alias, every Create request opens a new alert that no Close request can recover.
Field mapping
responders, visibleTo, actions, user and note are ignored; assignment and notifications follow the Flashduty channel’s settings.
Severity
Any other value returns 422. Recovery comes from the Close request, not from
priority.
Troubleshooting
- 404: the Alertmanager
api_urlis missing the trailing/, or the Grafana Alert API URL is missing/v2/alerts - 401: the
integration_keyin the push URL is wrong, or the integration is disabled - 422:
messageis empty,priorityis not betweenP1andP5, or the Close request does not useidentifierType=alias; it is also returned when theintegration_keyin the push URL belongs to an integration of another type - The alert does not recover: make sure Alertmanager has
send_resolved: trueand Grafana has Auto close incidents selected