• 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

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 add this integration from your team dashboard only. The Integrations page under Settings is not available in your plan.

  1. Go to Teams and select your team.

  2. Select Integrations on the left navigation and then select Add integration.

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. Follow the rest of the steps in this section to set up 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