Opsgenie alert
The OpsGenie alert method sends alerts through Opsgenie to notify whenever an incident is triggered.
Authentication
Two authentication methods are supported for Opsgenie API integration:
-
Basic is a base64 hash created from the API Key, for example,
YTU5ODNiZjYtZTM3OC00Yzk3LWE2YWItOGJlMzU4OWUxOTBm
. -
GenieKey (default) only requires the API Key obtained directly from the Opsgenie panel, so it is easier to use.
The choice between the two authentication methods is offered for convenience, as some users may only have access to one of the methods.
Creating Opsgenie API Key
-
Log in to your Opsgenie account.
-
Go to Teams in the top navbar, then click the Add team button:
- Hover over and click the name of the team that you've created:
- Go to Integrations in the left sidebar, and click the Add integration button:
- Click the API icon:
- Copy your Opsgenie API Key:
Known limitations
Currently Nobl9 doesn't return the severity level when an OpsGenie alert is triggered.
Configuring the Opsgenie alert method
You can configure your Opsgenie alert method directly in the Nobl9 UI, or by applying a YAML file in sloctl
.
Nobl9 UI
To set up the alert method in the Nobl9 UI, follow these steps:
- Navigate to Integrations > Alert Methods.
- Click .
- Click the relevant Alert Method icon.
Then, in the OpsGenie Configuration Wizard:
-
Enter the URL (mandatory).
The URL must start withhttps://
. -
Choose the Basic or GenieKey type of Authentication Method from the drop-down list.
The default value is GenieKey. For more information, refer to the Authentication section. -
Enter the API Key (mandatory).
Paste the API Key from Opsgenie. For more information, refer to the Authentication section.
- Select a Project.
Specifying a project is helpful when multiple users are spread across multiple teams or projects. When the Project field is left blank, Nobl9 uses thedefault
project. - Enter a Display Name.
You can enter a user-friendly name with spaces in this field. - Enter a Name.
The name is mandatory and can only contain lowercase, alphanumeric characters, and dashes (for example,my-alert-method-1
). Nobl9 duplicates the display name here, transforming it into the supported format, but you can edit the result. - Enter a Description.
Here you can add details such as who is responsible for the integration (team/owner) and the purpose of creating it. - Click Add Alert Method
YAML configuration for Opsgenie
- YAML - GenieKey
- YAML - Basic
apiVersion: n9/v1alpha
kind: AlertMethod
metadata:
name: opsgenie-notification-key
displayName: Opsgenie notification with GenieKey
spec:
description: Sends HTTP request to Opsgenie
opsgenie:
auth: GenieKey eb243592-faa2-4ba2-a551q-12345565c889
url: <https://api.opsgenie.com>
apiVersion: n9/v1alpha
kind: AlertMethod
metadata:
name: opsgenie-notification-basic
displayName: Opsgenie notification with Basic
spec:
description: Sends HTTP request to Opsgenie
opsgenie:
auth: Basic ZWIyNDM1OTItZmFhMi00YmEyLWE1NTFxLTFhbHBmNTY1Yzg4OQ==
url: <https://api.opsgenie.com>
Testing the Opsgenie alert method in the UI
- Navigate to Integrations > Alert Methods.
- Click the required alert method.
Its Details page opens. - Click Test under the alert method name:
- For the correct configuration, Nobl9 displays Test completed successfully! under the button
- Otherwise, Nobl9 displays the Test failed message, specifying what is set incorrectly