Opsgenie
Summaryβ
OpsGenie is an alert and on-call management platform. You can use OpsGenie to drive insights into values such as:
- Oncall rotation
- Escalation policies
- Alerts in the Event Timeline
Setupβ
In order to connect Cortex to your OpsGenie instance, youβll need to create a OpsGenie API Key with Read
and Configuration Access
, and add it under Settings β OpsGenie.
If using the EU region of OpsGenie, just enable the "EU" toggle when adding the API Key.
Service Registrationβ
Oncallβ
The OpsGenie integration supports rotations by using the Rotation UUID or the Rotation name.
The UUID for the rotation can be found in URL when editing Rotation in the OpsGenie dashboard.
x-cortex-oncall:
opsgenie:
type: SCHEDULE
id: Cortex-Engineering # Optionally, can use the Rotation UUID instead
Ownershipβ
You can define the following block in your Cortex Service Descriptor to add your Google group as a service owner.x-cortex-owners:
- type: group
name: My Opsgenie Team
The value for name
should be the name of the team defined in Opsgenie (case-sensitive).
Alertsβ
Discoveryβ
By default, Cortex will use the service identifier (e.g. my-service
) as the "best guess" value for the backend
and service
tags
on your alerts. For example, if your alert in Opsgenie has the tag backend:my-service
, the alert will be automatically associated
with the service in Cortex whose unique identifier is my-service
.
Service Descriptorβ
If your Opsgenie tags donβt cleanly match the Cortex service identifier, or you use different identifying tags, you can override this in the Cortex Service Descriptor.
x-cortex-alerts:
- type: opsgenie
tag: different-tag
value: my-service-override-tag
For example, for the tag backend:my-service
, the yaml would have tag: backend
and value: my-service
.
You can add a list of tags to use for lookup. Cortex will use an OR
operator when querying Opsgenie,
e.g. backend:my-service OR service:another-value
.
The value
field supports wildcards, like value: my-service-*
.