• 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

  1. Go to Opsgenie Consul Integration page.

Under the Free and Essentials plans, the tabs under the Team dashboard are limited to Main, Integrations, Members, and Activity Stream.

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

An alternative for Step 1) and Step 2) 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.

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

4. Click Save Integration.

Consul 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.

Consul alert details

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

Last modified on Jan 11, 2021
Cached at 12:00 AM on Apr 13, 2021 |

Additional Help

Ask the Community