Compose Integration

Compose is a cloud platform for MongoDB and Elasticsearch hosting. Used by developers, Compose provides data layers for easy deployment, hosting, and scaling.


​What does Opsgenie offer Compose users?

Compose sends alerts via email and using webhook. Either method is used to forward Compose alerts to Opsgenie. How to create alerts via email in Opsgenie is described in the email integration document. This document describes how to integrate Compose and Opsgenie using Opsgenie's Compose Integration.

Opsgenie provides a specific API for Compose Integration to create alerts directly in Opsgenie servers.

Functionality of the integration

  • When Compose triggers an alert, an alert is created in Opsgenie automatically through the integration.

Add Compose Integration in Opsgenie

  1. Please create an Opsgenie account if you haven't done so already.
  2. Go to Opsgenie's Compose Integration page.


For Free and Essentials plans, you can only add the integrations from the Team Dashboards, please use the alternative instructions given below to add this integration.

  1. Specify who is notified of Compose alerts using the Teams field. Auto-complete suggestions are provided as you type.


An alternative for Step 2) and Step 3) is to add the integration from the Team Dashboard of the team which will own the integration. To add an integration directly to a team, navigate to the Team Dashboard and open Integrations tab. Click Add Integration and select the integration that you would like to add.

  1. Copy the integration URL which includes Opsgenie endpoint as well as the API key.
  2. Click Save Integration.

Configuration in Compose

  1. From the Compose control panel, open Account->Notifications page.
  2. From this page, select Webhook as the type of the notification.
  3. Under Webhook Alerts, populate Webhook Url field with the integration URL copied when saving the integration.
  4. Click Save alert settings.
  1. Alert properties are configured from Compose Integration / Advanced Settings page.
    ​6. Now manage your Compose database alerts at Opsgenie and leverage its full alerting functionality.

Sample payload sent from Compose

  "alert_type_causes": "Some common causes are: * Network connectivity interuption * Server Failure * High load on primary",
  "alert_type_description": "A stepdown alert is raised when the primary member in a replica set is unavailable and a secondary is promoted to primary.",
  "alert_type_resolution": "There is generally nothing to do to resolve this type of alert. This is the expected behavior, but you should make sure that your app is configured to handle this type of failure by using a replica set in your connection info and using safe writes. Most drivers will recover automatically from this. If not an app restart might be required.",
  "databases[]": "db1,db2",
  "message": "There was a stepdown ->",
  "severity": "1",
  "source": "",
  "title": "stepdown alert on",
  "trigger_value": "The value that was triggered causing the alert. This only applies to alerts with limits.",
  "type": "stepdown"

Sample alert


Did this page help you?