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.
Creating Opsgenie API Key
Log in to your Opsgenie account.
Go to Teams in the top navbar, then click the Add team button:
Image 1: Add a new team to your Opsgenie account Hover over and click the name of the team that you've created:
Image 2: Go to Opsgenie team details Go to Integrations in the left sidebar, and click the Add integration button:
Image 3: Create an Opsgenie integration Click the API icon:
Image 4: Add opsgenie API key Copy your Opsgenie API Key:
Image 5: Opsgenie API key for the Nobl9 Integration
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 the
button.
- 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 then object is assigned to projectdefault
. - Enter a Display Name.
You can enter a 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-name
). This field is populated automatically when you enter a display name, 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 the Add Alert Method
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
- Navigate 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
- 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!
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.
- Navigate 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.