Skip to content

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.

An API key from an OpsGenie API integration.

  1. In OpsGenie, go to Settings → Integrations.

  2. Add an “API” integration.

  3. Copy its API Key.

In the dashboard, Integrations → Add Integrations → OpsGenie. Name it, paste the key into API Key, and click Add. Or via the API:

Terminal window
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.

Terminal window
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.

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 downPOST /v2/alerts with message: "Monitor DOWN: <name>", a description carrying the URL and failure reason, and that alias.
  • Monitor recoversPOST /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 is fixed and not configurable per channel:

EventPriority
Monitor or browser check downP1
Recovery (close)none sent
Domain expiry warningP3

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.

  • 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.