Export your Opsgenie setup¶
Before Opsgenie shuts down, save your on-call setup to a file you own. The script below reads it through the Opsgenie API and writes one JSON file. It is useful whatever you move to: the file is plain JSON in Opsgenie's own shapes, and Argavon imports it directly.
What is saved¶
Users, teams, schedules with their rotations and overrides, escalation policies, each team's routing
rules, services and integrations. With --extras also: team members, each user's contact methods and
notification rules, heartbeats and maintenance windows (for your records; the Argavon importer uses only
the first list).
Alert history is not included: export it from Opsgenie's own reports if you need it.
Run it¶
You need Python 3.8 or newer (no packages to install) and an Opsgenie API key with read access: in Opsgenie, Settings → API key management → Add new API key, with Read and Configuration access (or the key of an API integration).
curl -fsSLO https://raw.githubusercontent.com/neuroops/neuroops/main/scripts/opsgenie-export.py
export OPSGENIE_API_KEY=... # never on the command line, so it stays out of your shell history
python3 opsgenie-export.py --out opsgenie-export.json # add --region eu for api.eu.opsgenie.com
python3 opsgenie-export.py --out opsgenie-full.json --extras # everything, for your records
The script only reads. It waits and retries when Opsgenie rate limits it, and writes the file only when everything was read, so a half-finished export never overwrites a good one. Revoke the key afterwards.
Import it into Argavon¶
Import → Opsgenie → Upload an export (JSON), preview, then apply. What is imported and how is in Import from Opsgenie; the preview lists everything it could not carry over.
Keep the file safe¶
It holds your colleagues' names, email addresses and, with --extras, phone numbers. Store it like any
other personal data and delete it when you no longer need it.