• Products
  • Get started
  • Documentation
  • Resources

Integrate Opsgenie with Consul

Consul logo

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

You can add this integration from your team dashboard

If you're using Opsgenie's Free or Essentials plan, or if you’re using Opsgenie with Jira Service Management's Standard plan, you can only add this integration from your team dashboard as the Integrations page under Settings is not available in your plan.

Adding the integration from your team dashboard will make your team the owner of the integration. This means Opsgenie will assign the alerts received through this integration to your team only.

To do that,

  1. Go to your team’s dashboard from Teams,

  2. Select Integrations, and select Add integration.

Follow the rest of the steps to complete the integration.

  1. Go to Settings > Integrations. Search for Consul and select Add

  2. Specify who is notified for Consul alerts using the Responders field. Auto-complete suggestions are provided as you type.

  3. Copy the integration API key to use in Consul configuration.

  4. Select 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

1 curl -X PUT -d 'API_KEY' http://localhost:8500/v1/kv/consul-alerts/config/notifiers/opsgenie/api-key

4. (Optional) Set the entity field value to show up in Opsgenie alert details (Default is "Cluster-Alert").

cURL

1 curl -X PUT -d 'true' http://localhost:8500/v1/kv/consul-alerts/config/notifiers/opsgenie/enabled

5. Enable Opsgenie notifications in Consul-Alerts.

cURL

1 curl -X PUT -d 'Consul' http://localhost:8500/v1/kv/consul-alerts/config/notifiers/opsgenie/cluster-name

6. When a Consul healthcheck becomes critical, an Opsgenie alert is automatically created.

Consul health check

7. When the Consul healthcheck becomes passing again, the Opsgenie alert is automatically closed.

Consul health check

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.

Additional Help