Opsgenie

Happy Uptime creates Opsgenie alerts via the Alerts API. Incident/monitor recoveries close the alert using the same alias.

Get the API key

  1. In Opsgenie: Settings → API key management → Add new API key.
  2. Grant it Create and Update Access and Read Access.
  3. Copy the key.

Add the channel

bash
curl -X POST https://happyuptime.com/api/v1/alerts/channels \ -H "Authorization: Bearer $HU_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Opsgenie — SRE", "type": "opsgenie", "config": { "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "region": "us", "teamId": "team-uuid-optional" } }'
KeyPurpose
apiKeyOpsgenie API integration key
regionus (default) or eu
teamIdOptional Opsgenie team to route to

Mapping

Happy Uptime eventOpsgenie actionPriority
monitor.downcreate alertP1
monitor.degradedcreate alertP3
monitor.upclose alert
incident.created (critical)create alertP1
incident.created (major)create alertP2
incident.created (minor)create alertP3
incident.resolvedclose alert
vendor.downcreate alertseverity-mapped
vendor.resolvedclose alert

Alias keys follow hu:mon:<id>, hu:inc:<id>, hu:vendor:<name> so creates and closes correlate cleanly.

Ask a question... ⌘I