Skip to content

OpsGenie

OpsGenie#

Overview#

This integration sends out notifications to OpsGenie.

Prerequisites#

Consult the OpsGenie documentation https://docs.opsgenie.com/docs/api-integration#section-using-api-integration to get or create your OpsGenie Alert Ingestion API key.

Configure the channel#

Go in Configuration Management

image

Go in Alert Channel, and hit the + button.

image

Select the OpsGenie2 template . Select the Analytic Engine on which you want this configuration to be deployed; and provide a Configuration Name that is meaningful for you. The Description is optional.

[opsgenie2]
  enabled = true
  api-key = "mysupersecretapikey"
  teams = ["team1", "team2"]
  recipients = ["recipient1", "recipient2"]
  url = "https://api.opsgenie.com/v2/alerts"
  recovery_action = "notes"
  global = false

Enter the correct settings: * api-key: Your OpsGenie API Key. * teams: Default OpsGenie teams. * recipients: Default OpsGenie recipients. * url: The OpsGenie API URL. This should not need to be changed. * recovery_action: specifies which action to take when alerts recover: notes, close, custom.

Other configuration options are possible, such as: * Global: When this option is set to true, OpsGenie notifications will be sent for all alerts, even if not explicitely specified in the alert configuration.

Once done, click Apply. Your Channel is ready.

Configure your Alert Definitions#

Go in Alert Definitions, and edit the configuration(s) for which you want OpsGenie notification.

image

Add the OpsGenie settings, as per the example below:

.opsGenie2().teams('team1', 'team2').recipients('recipient1', 'recipient2')

Once done, click Apply. Your Alert definition is ready to send OpsGenie notification.