Opsgenie
How to connect Opsgenie to On-Call Optimizer
On-Call Optimizer imports configuration from Opsgenie schedules and exports shift assignments back to them.
Connection process
To connect an Opsgenie account to On-Call Optimizer:
- Click your organization’s name in the top navigation bar and open the On-call products tab.
- Click Add an on-call product.
- In the Select on-call product dialog, choose OpsGenie and click Begin connection.
- Enter your Opsgenie API key in the API key card and click Save at the top right of the page.
- On-Call Optimizer tests the key and fetches your Opsgenie schedules. When it is done, the connection page lists them in the Schedule status table.
To create an On-Call Optimizer schedule from one of them, go to Schedules → Create new schedule → Copy a schedule from your on-call product. See the full connection instructions.
Opsgenie schedules and rotations
On-Call Optimizer and Opsgenie model a schedule differently:
- An On-Call Optimizer schedule has a single configuration describing how and when shifts rotate between members. Each shift within the schedule may have one or more assignees (e.g. primary, secondary, tertiary).
- An Opsgenie schedule can contain one or more rotations, and each rotation can have an individual configuration for both how shifts rotate between
members and the list of members for the rotation.
- Alerts in Opsgenie may only be routed to a schedule, not a rotation.
- Alerts routed to a schedule will be delivered to any member currently assigned to any rotation within the schedule.
- Primary and secondary in one On-Call Optimizer schedule needs two Opsgenie schedules, each with its own rotation.
On-Call Optimizer handles that like this:
- Only an Opsgenie schedule can be the source or destination of an On-Call Optimizer schedule. You can’t point On-Call Optimizer at one rotation inside an Opsgenie schedule.
- When importing shifts from an Opsgenie schedule, assignees from each configured rotation within the schedule will be merged into a single On-Call Optimizer shift in the position indicated by their ordering in the Opsgenie interface (e.g. the first rotation will take the primary role in On-Call Optimizer, the second rotation will take the secondary role and so on).
- When exporting shifts to an Opsgenie schedule, the override entries created by On-Call Optimizer in Opsgenie will not specify any particular rotation, and will therefore apply to all rotations within the schedule. The On-Call Optimizer shift role that is exported to the override entries for each Opsgenie schedule is selected at the time the destination is configured and can be any of the available roles for the On-Call Optimizer schedule.
Shift end time alignment
Opsgenie override entries
On-Call Optimizer uses the Opsgenie override functionality to represent the assigned shifts for each schedule. It creates an override for each shift it assigns, so the Opsgenie UI shows the same cover.
Disconnecting
To remove an Opsgenie connection, it must not be in use by any schedule in On-Call Optimizer. The connection’s card on the On-call products tab shows how many schedules reference it.
- Remove every destination that uses the Opsgenie connection: on each schedule’s Integrations tab, click the Delete destination (trash) icon for it and confirm in the dialog. The schedules themselves can stay; they just stop exporting to Opsgenie.
- Remove any cross-schedule availability sources that use an Opsgenie schedule (shown as “OpsGenie: schedule” on a schedule’s Configuration tab).
Once the connection is no longer in use by any On-Call Optimizer schedule:
- Click your organization’s name in the top navigation bar and open the On-call products tab.
- Click the Disconnect icon (a circled cross) on the Opsgenie connection card, or open the connection and click Disconnect at the top of the page.
- Click Disconnect in the Disconnect OpsGenie dialog to confirm.
Required permissions and data
On-Call Optimizer requires a read-write Opsgenie API key to link to an Opsgenie schedule and export shifts to it as a destination.
A read-only API key is enough if you don’t need to export. It can only list schedules and import their configuration.
Data accessed
On-Call Optimizer uses only the Schedule, Schedule Rotation and Schedule Override endpoints of the Opsgenie API. It does not need any other API object types.
On-Call Optimizer reads the name, members and shift configuration of available Opsgenie schedules, so it can list them in the app.
For an Opsgenie schedule that an On-Call Optimizer schedule was copied from or exports to, it also reads assigned shifts and overrides, on an ongoing basis, to keep the two in sync and to check that sync.
For an Opsgenie schedule configured as a destination, On-Call Optimizer creates and deletes override entries so the Opsgenie schedule matches the shifts in On-Call Optimizer.