To set up an Opsgenie integration, you will first need to configure it in Opsgenie, then in Cmd. (For an overview of Cmd webhooks, see configuring webhooks.)
View the Opsgenie “Integrations Overview” documentation here. Follow those instructions to create an “API” integration with the default settings. This will generate an API key that will enable Cmd to send alerts to Opsgenie via your new API integration. Save the API key for later.
- Confirm that you are adding the integration to the correct project by reviewing the name of the project you're currently viewing in the top-right corner of the page.
- Click the current project's name to open the drop-down menu.
- Select Project & app settings.
- On the left-hand menu, under the 'Project settings' section, select Integrations preferences.
- Select Webhook.
- Click Add integration in the top-right corner.
- Give your integration a name to identify it in the Cmd web app (e.g. “Opsgenie webhook”).
- Under `Webhook URL`, input the following: https://us-central1-cmd-production.cloudfunctions.net/opsgenie-forwarder.
Custom JSON to send, input the following (with the API key you copied instead of "API_KEY"):
- Next, under
CQL properties to send, you will select which CQL values to send to Opsgenie. Select the following properties:
- To test the integration, copy the 'Webhook test command' and run it in a terminal. If it is working, the team in Opsgenie where you configured the integration will receive an alert.
(Note that the "trigger_name" property - in this case "Opsgenie-Cmd test" - appears in the alert's title.)
- Assuming that worked, go back to Cmd and click Save on the webhook configuration window.
- Now, you can configure any of your triggers to send alerts via this integration. To do so, add the action “Send custom webhook alert” to a trigger, and make sure to select the Opsgenie integration.