Compose Integration

is a cloud platform for MongoDB and Elasticsearch hosting. Used by developers, Compose provides data layers for easy deployment, hosting and scaling. By forwarding Compose database alerts to OpsGenie, you can notify users via iPhone and Android push notifications, email, SMS, and phone calls, track of the alert life cycle, escalate alerts, etc.

​What does OpsGenie offer to Compose users?

Compose can send alerts via email and using webhook. Either method can be 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 already
  2. Go to OpsGenie Compose Integration page,
  3. Specify who should be notified for the Compose alerts using the "Recipients" field. User(s), group(s), escalations policies and on-call schedules can be specified as the alert recipients. Auto-complete suggestions will be provided as you type. 
  4. Copy the integration URL by clicking on the copy button or selecting. URL includes OpsGenie endpoint as well as the API key.
  5. Click on "Save Integration"

Configuration in Compose

  1. From the Compose control panel, open Account->Notifications page
  2. From this page, select the Webhook as the type of the notification.
  3. Under Webhook Alerts, populate "Webhook Url" field with the integration URL you copied when saving integration
  4. Click "Save alert settings".
  5. Alert properties can be configured from Compose Integration / Advanced Settings page.
  6. ​ You can 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 c235.candidate.17.mongolayer.com:10235 -> c235.candidate.16.mongolayer.com:10235",
  "severity": "1",
  "source": "candidate.16.mongolayer.com:10235",
  "title": "stepdown alert on candidate.16.mongolayer.com:10235",
  "trigger_value": "The value that was triggered causing the alert. This only applies to alerts with limits.",
  "type": "stepdown"
}

Sample alert