OpsGenie integration
The OpsGenie integration creates an alert when a monitor goes down and closes that same alert when the monitor recovers. Pairing is done through the alert alias, which SiteQwality derives from the monitor and the outage.
What you need
Section titled “What you need”An API key from an OpsGenie API integration.
-
In OpsGenie, go to Settings → Integrations.
-
Add an “API” integration.
-
Copy its API Key.
Connect it
Section titled “Connect it”In the dashboard, Integrations → Add Integrations → OpsGenie. Name it, paste the key into API Key, and click Add. Or via the API:
curl -X POST https://api.siteqwality.com/integration/opsgenie \ -H "Authorization: Bearer $SITEQWALITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "friendly_name": "Acme OpsGenie", "api_key": "<opsgenie-api-integration-key>" }'Both fields are required and must be non-empty. The key is not verified against OpsGenie at save time.
The API key is a secret. GET /integration returns "details": {} for OpsGenie integrations rather than echoing it back.
Create a channel
Section titled “Create a channel”curl -X POST https://api.siteqwality.com/notification \ -H "Authorization: Bearer $SITEQWALITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "notification_group_id": "<your-group-id>", "type": "opsgenie", "details": { "opsgenie_integration_id": "<opsgenie-integration-id>" } }'opsgenie_integration_id is the only field. There is no per-channel priority setting; see priority below.
Create and close
Section titled “Create and close”Down and up events share one alias built from the monitor ID and the ID of the state transition that opened:
sq-http-<monitor-id>-<state-transition-id>sq-browser-<browser-check-id>-<state-transition-id>- Monitor goes down →
POST /v2/alertswithmessage: "Monitor DOWN: <name>", a description carrying the URL and failure reason, and that alias. - Monitor recovers →
POST /v2/alerts/<alias>/close?identifierType=alias, with the recovery message attached as the close note.
OpsGenie deduplicates open alerts by alias, so repeated failures within one outage update a single alert rather than stacking. A separate outage later produces a different state transition, and therefore a new alert.
Alert messages longer than 130 characters are truncated to fit the OpsGenie limit.
Priority
Section titled “Priority”Priority is fixed and not configurable per channel:
| Event | Priority |
|---|---|
| Monitor or browser check down | P1 |
| Recovery (close) | none sent |
| Domain expiry warning | P3 |
Delivery behavior
Section titled “Delivery behavior”A failed send is retried up to 3 times in-process, which is safe because the alias makes both calls idempotent. If all 3 fail, the notifier fails the event so it gets retried rather than dropping the alert quietly.
Limitations
Section titled “Limitations”- The endpoint is the US instance,
api.opsgenie.com. The EU instance is not configurable. - OpsGenie channels fire for HTTP monitors, browser checks, and DNS/domain expiry. TLS expiry and cron/heartbeat monitors only support email, SMS, and Slack today; an OpsGenie channel on a group used by those monitor types is skipped.