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 integration
- Select Opsgenie Compatible and click Save
- Open the generated integration card and copy the Push URL
Shared integration
- In the Flashduty console, go to 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, withintegration_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 the alerting tool
The steps below use Prometheus Alertmanager and Grafana as examples; for other tools see Other tools.1
Point the tool's Opsgenie address to Flashduty
- Prometheus Alertmanager
- Grafana
Where: alertmanager.yml › receiversAdd
opsgenie_configs to a receiver:- 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
2
Route alerts to it
- Prometheus Alertmanager
- Grafana
Where: alertmanager.yml › routeIn
route, point the alerts you want to push at the receiver from the previous step, for example receiver: 'flashduty', or add it as a sub-route. Save and reload the Alertmanager configuration.3
Verify the lifecycle
Let an alert rule go to Firing and confirm Flashduty receives the alert; then let the rule recover and confirm the same alert recovers (Normal in Grafana).The contact point’s Test button in Grafana only proves connectivity: it 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, and verify recovery with a real alert.
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.
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 withoutv2/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’salias 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.
Status and 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