Opsgenie Alert
The OpsGenie Alert Method enables triggering 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.
Retrieving Opsgenie API Key
Navigate to Settings > App Settings >> API Key Management.
Click Add New API Key.
Enter a name for the API key and select the access rights to give to this API key.
Click Add API Key to save the new API key.
For more details refer to API Key Management | opsgenie Documentation.
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β
Go to Integrations > Alert Methods.
Click the
button.
Select Opsgenie.
Enter the URL starting with
https://
to configure Opsgenie (mandatory).Choose the Basic or GenieKey type of Authentication Method from the drop-down list.
The default value is GenieKey.Enter the API Key (mandatory).
Paste the API Key from Opsgenie.Select a Project (mandatory).
Using the Project is helpful when multiple users are spread across multiple teams or projects. When the Project field is left blank, a default value appears.Enter a Display name (optional).
You can enter a friendly name with spaces in this field.Enter a Name (mandatory).
The name is mandatory and can only contain lowercase, alphanumeric characters and dashes (for example,my-alertmethod-name
). This field is populated automatically when you enter a display name, but you can edit the result.Enter a Description (optional).
Here you can add details such as who is responsible for the integration (team/owner) and the purpose of creating it.Click the Add Alert Method button.
YAML Configuration for Opsgenieβ
- YAML - GenieKey
- YAML - Basic
Hereβs an example for adding an Opsgenie Alert through YAML (GenieKey):
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 a5983bf6-e378-4c97-a6ab-8be3589e190f
url: <https://api.opsgenie.com>
Hereβs an example for adding an Opsgenie Alert through YAML (basic):
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 YTU5ODNiZjYtZTM3OC00Yzk3LWE2YWItOGJlMzU4OWUxOTBm
url: <https://api.opsgenie.com>
Testing the Opsgenie Alert Method in the UIβ
Users can test their Alert Methods for all notification services supported by the Nobl9 platform through the UI.
To verify that your Opsgenie Alert Method is set up correctly at the time that you configure it:
Go to Integrations > Alert Methods.
Follow the process outlined above to add the Alert Method in the Nobl9 UI: complete the steps in the Create Alert Method wizard, and click the Add Alert Method button.
On the Details screen, click the Test button in the upper-right corner. If the configuration is correct, Nobl9 will display the following message next to the button:
Test completed successfully!
note
If the configuration is incorrect, Nobl9 will provide an error message with relevant details. The content of the error differs depending on the Alert Method channel.
You can also test an existing Alert Method. To do that:
Go to Integrations > Alert Methods.
Find the Alert Method you want to test in the list, and click it.
On the Details screen, click the Test button in the upper-right corner.