---
title: Opsgenie
description: Open Opsgenie alerts from WatchFor incidents with an API integration — P1/P2 priorities, US or EU region, auto-close on recovery.
canonical: https://watchfor.io/docs/notifications/opsgenie
---

# Opsgenie

Open Opsgenie alerts from WatchFor incidents with an API integration — P1/P2 priorities, US or EU region, auto-close on recovery.

WatchFor talks to the **Opsgenie Alert API** through an API integration. A
firing incident **creates** an Opsgenie alert; when it resolves, WatchFor
**closes the same alert** by its alias.

## Setup

### Add an API integration in Opsgenie
In Opsgenie go to **Settings → Integrations** (or the team's integrations
page) → add an **API** integration (*Rest API over HTTPS*). Make sure it is
allowed to **create and close alerts**, then copy its **API Key**.

### Add the channel in WatchFor
Go to **Alerting → Channels & contacts → Add Channel → Opsgenie**, paste the **API
Key**, and pick the **Service Region** — leave it as *US / Global* unless your
Opsgenie account is in the EU region (`api.eu.opsgenie.com`). Attach the
[contact groups](/docs/notifications/contact-groups) it should serve and
save.

### Send a test
**⋯ → Send test** — an alert titled `[TEST] …` appears in Opsgenie. **Close
it in Opsgenie yourself**: tests never send a close.

> **Warn**
>
> API keys are **region-specific**. An EU-region key sent to the global
> endpoint (or the other way round) is rejected — pick the matching region.

## Lifecycle

| In WatchFor | Sent to Opsgenie |
| --- | --- |
| Incident fires (confirmed) | **Create alert** with alias `watchfor-rule-<rule id>-scheduler-<monitor id>` |
| Repeat reminder (if enabled) | another create with the same alias — Opsgenie de-duplicates into the existing alert |
| Incident resolves — recovery or administrative close | **Close alert** by alias, with a note carrying the incident duration |
| Incident acknowledged in WatchFor | nothing — acknowledge is not synced in either direction |

One alert per rule per monitor: two rules firing on the same monitor open two
Opsgenie alerts. Opsgenie channels are never
[grouped](/docs/notifications#grouping-during-a-storm).

## What Opsgenie receives

- **Message** — the standard title (`🔴 DOWN: API (prod)`).
- **Priority** — critical → **P1**, warning → **P2**, info → P4.
- **Description** — the plain-text diagnosis, expected vs detected values and
  certificate details where relevant.
- **Entity** — the monitor's target.
- **Details** — `incident_id`, `rule_id`, `scheduler_id`, `fire_count`,
  `started_at`, `monitor_name`, `target`, `probe_type`, `diagnosis`,
  `expected`, `detected_value`, `resolved_value`, `expression` (the rule
  expression), `confirmed_by` (locations), `incident_url`, `rule_version`,
  and `flapping` when applicable.

## Tips

- Keep only **Critical** in the channel's severity filter if warnings
  shouldn't reach the on-call rotation.
- Use Opsgenie's routing rules on `priority` or the `probe_type` detail to
  send different monitor types to different teams.

## Troubleshooting

- **Test fails with 401/403** — wrong region, or the integration key lacks
  create/close permissions.
- **Alert opens but never closes** — the close is sent through the same
  channel that created the alert; if the channel was disabled or deleted in
  between, close it by hand.
- **A `[TEST]` alert is stuck open** — expected; close it manually.

---

Canonical page: https://watchfor.io/docs/notifications/opsgenie · All docs: https://watchfor.io/docs · Site guide: https://watchfor.io/llms.txt
