Opsgenie Integration

What does ChaosSearch offer Opsgenie users?

ChaosSearch has a one-directional integration with Opsgenie. It's easy to configure alerts to go right into your Opsgenie account to start notifying the right engineers.

Add a Custom Webhook Integration in ChaosSearch, and start taking advantage of Opsgenie's alert and incident management platform with the ChaosSearch alert notification system.

Functionality of the integration

When an alert is triggered in ChaosSearch, an alert is created in Opsgenie automatically through the integration.

Configuring the integration

In Opsgenie add an API integration for ChaosSearch

  • You'll need to have Opsgenie account
  • You'll need to create a team in your Opsgenie settings from this link if using the Free or Essentials OpsGenie Plan: Create teams in Opsgenie
  • Create a default API integration in your OpsGenie Teams settings from this link: Create an API integration in OpsGenie
  • An API Key is generated for the integration, copy the API Key and use in your API requests.

In ChaosSearch

  • Navigate to Alerts in the Analytics section
  • Click Destinations and Add Destination
  • Give the destination a name and change Type to Custom Webhook
    Check Define endpoint by custom attributes URL
  • In the Types section, select HTTPS
  • In the Host section, input “api.opsgenie.com” (or “api.eu.opsgenie.com if you are in the EU region).
  • In the Port section, input 443 for the HTTPS protocol
  • In the Path section, input /v2/alerts
  • Remove all parameters just above the Path section by clicking on the “Remove Parameter” button
  • In the Method section, select POST
  • At the bottom in the Header Information click add header and add the Key authorization and the value "GenieKey $API_KEY" (where $API_KEY is the API Key from your OpsGenie API Integration).
  • Click Create

Create Monitor

To create a monitor in ChaosSearch, please follow these instructions

Once you completed the Monitor creation, you will then need to define the trigger.


Configure Actions section

In the final step of creating a trigger, the Message payload should be configured as seen below.

{ "message": "{{{ctx.trigger.name}}} just entered alert status. Please investigate the issue.", "description" : "Monitor {{{ctx.monitor.name}}} \n - Trigger: {{{ctx.trigger.name}}} \n - Severity: {{ctx.trigger.severity}} \n - Period start: {{ctx.periodStart}} \n  - Period end: {{ctx.periodEnd}}", "priority": "P{{ctx.trigger.severity}}"}

Verify Creation of OpsGenie Alert from OpsGenie UI

  • In your account’s OpsGenie UI, navigate to the Alerts and verify that you can see the new OpsGenie alert that came from the Chaossearch UI’s monitoring alert’s trigger message:
  • Click on the newly created OpsGenie alert and verify the detailed contents of the alert

Did this page help you?