−50%

50% off your first month on any paid plan · code WELCOME50 · until Nov 30

Start free →
Integration Incident management

How to connect Opsgenie to cron job and uptime monitoring

· Setup · 2 minutes

Create an Opsgenie alert when a monitor fails and close it when it recovers, routed by your team's schedules and escalation rules.

How it works#

WatchCron creates an Opsgenie alert through the Alert API when a monitor goes down. When it recovers, WatchCron closes the alert automatically. Your team's on-call schedules, escalation policies, and notification rules handle the rest.

Each monitor gets its own alias in Opsgenie, so repeat failures update the open alert instead of flooding the queue.

Before you start#

You need:

  • An Opsgenie account with team admin rights.
  • A WatchCron account on any plan. Opsgenie alerts work on Free, Starter, Pro and Business.

One detail that trips people up: Opsgenie runs on two separate instances. If your dashboard URL contains app.eu.opsgenie.com, you're on the EU instance. If it's app.opsgenie.com, you're on US. The API key only works with the matching region.

Step 1 — Create an API integration in Opsgenie#

Go to Teams → your team → Integrations → Add integration → API.

Keep "Create and update access" turned on. Without it, WatchCron can open alerts but can't close them on recovery. Save the integration and copy the API key.

WhereWhat to do
Teams → your team → IntegrationsAdd integration → API
Access settingsMake sure "Create and update access" is on
After savingCopy the API key

Step 2 — Add the channel in WatchCron#

Go to Alerts → Channels → Add channel and choose Opsgenie.

FieldWhat to enter
LabelSomething recognisable, e.g. "Platform team"
API keyThe key from the API integration
RegionUS or EU (check your Opsgenie dashboard URL)

Click Save.

Step 3 — Test and assign monitors#

Click Send test. Opsgenie should show a test alert in the Alerts dashboard. Confirm it arrived, then close it.

Open any monitor and tick the Opsgenie channel under Alert channels. Failures now create real alerts routed through your team's escalation policy.

What to paste where#

WatchCron fieldValueWhere you find it
API keya1b2c3d4-e5f6-7890-abcd-ef1234567890Team → Integrations → API
RegionUS or EUapp.opsgenie.com = US, app.eu.opsgenie.com = EU

What WatchCron sends#

Two actions:

  • Create alert: when a monitor fails. Includes the monitor name, failure reason, and a link to the WatchCron incident.
  • Close alert: when the monitor recovers. Matches by alias, so the right alert closes without manual intervention.

Priority, tags, and routing all depend on your Opsgenie team configuration. WatchCron sends the event; Opsgenie decides who gets notified and when.

Troubleshooting#

The API integration needs "Create and update access". If it only has "Create access", Opsgenie rejects the close request. Edit the integration and turn on update access.

Check the region. An API key from an EU account only works with the EU API endpoint, and vice versa. Make sure the Region field in WatchCron matches your Opsgenie instance.

Create a separate API integration per team in Opsgenie, each with its own key. Add each as a separate channel in WatchCron and assign monitors accordingly.
Written by Vitalii Holben

Founder of WatchCron. Full-stack developer building monitoring tools that help teams keep cron jobs, uptime, and SSL certificates under control. Based in Europe, shipping code since 2014.

Start monitoring in under 2 minutes.

Free plan includes 20 checks · No credit card required
Pricing Docs
Log in Start free →