PagerDuty / Opsgenie smart home integration, free and open source

On-call schedules and incidents from PagerDuty and Opsgenie in Gladys.
Bring your on-call schedules and your incidents from PagerDuty and Opsgenie into Gladys: see who is on call and which incidents are open on your dashboard, react to a new incident in a scene, and page someone from Gladys when something goes wrong at home (freezer too warm, water leak, server room alarm…).
The integration talks to the PagerDuty and Opsgenie cloud APIs: Gladys needs Internet access. It works with PagerDuty, Opsgenie or both at the same time.
Installation
- In Gladys, open Integrations, then the external integrations store.
- Search for PagerDuty / Opsgenie and click Install.
- Wait for the container to start: the integration shows up in the list.
Configuration
Open the Configuration tab of the integration, fill in the accounts you use, then save. The Test the connection button checks the keys.
PagerDuty
- REST API key: reads the services, the open incidents, the schedules and who is on call. In PagerDuty, Integrations → API Access Keys → Create New API Key; a read-only key is enough. Accounts hosted in Europe pick the Europe region.
- Integration key (Events API v2), optional: lets the scenes trigger, acknowledge and resolve incidents. In PagerDuty, open the service that should receive the incidents from Gladys, Integrations → Add an integration → Events API V2, and copy its Integration Key.
Opsgenie
- API key: in Opsgenie, Settings → Integrations → Add integration → API, with the Read and Create and Update rights. Accounts hosted in Europe pick the Europe region.
Refresh interval
How often the incidents and the on-call are read, one minute at least (60 s by default). Both services limit the number of API requests per account: keep a few minutes if many tools already use the same account.
Devices
The Discovery tab lists, for each account:
- one device per PagerDuty service, and one device for the Opsgenie account: number of triggered incidents, number of acknowledged incidents and title of the latest open incident;
- one device per schedule (PagerDuty or Opsgenie): who is on call right now.
Add the ones you want: they keep their history, and a service renamed in PagerDuty keeps its device. A service or a schedule created later shows up at the next refresh.
Scenes and dashboards
Scene triggers
- New incident: a PagerDuty incident or an Opsgenie alert was opened.
- Incident acknowledged: someone acknowledged an open incident.
- Incident resolved: an incident was resolved (an Opsgenie alert closed).
- On-call changed: someone else is now on call on a schedule.
The incident triggers can be filtered by service (or Opsgenie account), by provider and by urgency (Opsgenie priorities P1 and P2 count as high urgency). The scene can use the incident title, service, urgency, provider, key, number and link. On-call changed gives the schedule, the people now on call and the people before.
The changes are seen at each refresh: the first reading after a start only records the situation, without firing anything.
Scene actions
- Trigger an incident: opens a PagerDuty incident (on the service of the integration key) or an Opsgenie alert, with a title, details and a severity (critical, error, warning, information). Give it an incident key such as
freezer-temperatureto update the same incident instead of opening a new one each time. Output: the incident key. - Acknowledge an incident and Resolve an incident: by incident key, the output of Trigger an incident or the
incident_keyvariable of a trigger. On PagerDuty, they act on the incidents of the integration key's service. - Refresh the incidents: reads the accounts right away. Outputs: number of open, triggered and acknowledged incidents.
Example: when the freezer temperature goes above -15 °C, trigger the incident freezer-temperature; when it drops back, resolve it.
Dashboard widget
On-call board: the counters of triggered and acknowledged incidents, the open incidents (triggered first, with a link to each one), who is on call per schedule, the account in error if any, and a Refresh button.
Help
A question or a problem? Ask on the Gladys community forum or open an issue on the GitHub repository.
Configuration settings
These are the settings PagerDuty / Opsgenie asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Getting started | section | No | Fill in PagerDuty, Opsgenie or both. The integration reads the open incidents and who is on call at the chosen interval, and can page someone from a scene. |
| PagerDuty | section | No | The REST API key (read-only is enough) reads the incidents and the schedules. The Events API v2 integration key of a service lets the scenes trigger, acknowledge and resolve incidents on it. |
| PagerDuty REST API key | secret | No | |
| PagerDuty integration key (Events API v2) | secret | No | Optional: only to send incidents from Gladys. |
| PagerDuty region | select | No | |
| Opsgenie | section | No | Create an API integration in Opsgenie (Settings → Integrations → API) with the read and the create and update rights, then paste its key. |
| Opsgenie API key | secret | No | |
| Opsgenie region | select | No | |
| Refresh interval (s) | number | No | How often the incidents and the on-call are read, in seconds (one minute minimum). |
How to install PagerDuty / Opsgenie in Gladys
- In Gladys, open Integrations: PagerDuty / Opsgenie appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/prohand/gladys-pagerduty-opsgenie:1.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/prohand/gladys-pagerduty-opsgenie.
PagerDuty / Opsgenie requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
PagerDuty / Opsgenie is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by prohand, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation