Consul Integration

Consul is a tool for discovering and configuring services in your infrastructure. It provides several key features such as Service Discovery, Health Checking, Key/Value store and Multi Datacenters. Opsgenie is an alert and notification management solution that is complementary to Consul.

What does Opsgenie offer to Consul users?

Use Opsgenie's Consul integration to sends Consul alerts to Opsgenie API with detailed information. Opsgenie acts as a dispatcher for Consul alerts, determines the right people to notify based on on-call schedules-– notifies via email, text messages (SMS), phone calls and iPhone & Android push notifications, and escalates alerts until the alert is acknowledged or closed.

Functionality of the integration

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

Add Consul integration in Opsgenie

  1. Please create an Opsgenie account if you haven't done so already.
  2. Go to Opsgenie Consul 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 for Consul 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 API key to use in Consul configuration.
  2. Click Save Integration.

Configuration on the Consul server

  1. Apply the instructions below from your Consul Server.
  2. Install Consul-Alerts as shown here
  3. Once Consul-Alerts is running, configure the Opsgenie API key (Note: The consul agent's IP and port may vary).
curl -X PUT -d 'API_KEY' http://localhost:8500/v1/kv/consul-alerts/config/notifiers/opsgenie/api-key
  1. (Optional) Set the entity field value to show up in Opsgenie alert details (Default is "Cluster-Alert").
curl -X PUT -d 'true' http://localhost:8500/v1/kv/consul-alerts/config/notifiers/opsgenie/enabled
  1. Enable Opsgenie notifications in Consul-Alerts.
curl -X PUT -d 'Consul' http://localhost:8500/v1/kv/consul-alerts/config/notifiers/opsgenie/cluster-name
  1. When a Consul healthcheck becomes critical, an Opsgenie alert is automatically created.
  1. When the Consul healthcheck becomes passing again, the Opsgenie alert is automatically closed.

All done! You can now manage your Consul health-checks at Opsgenie and leverage Opsgenie's full alerting functionality.

🚧

Dynamic fields (custom priority, payload, url, and headers) are not available for this integration because of being API-based integration.

Updated 10 months ago


Consul Integration


Consul is a tool for discovering and configuring services in your infrastructure. It provides several key features such as Service Discovery, Health Checking, Key/Value store and Multi Datacenters. Opsgenie is an alert and notification management solution that is complementary to Consul.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.