1. Begin collecting Consul metrics via StatsD
For details on gathering Consul control plane metrics via StatsD, see our blog post: Automatic intelligent observability into your HashiCorp Consul service mesh.
Following setup, you can verify if the integration works as expected by looking for Consul-related metrics using the Dynatrace metric browser. Check for metrics that have the consul prefix.
2. Add the extension to your Dynatrace environment
To add this extension to your environment, click Add to environment on the extension’s page in the Dynatrace Hub. After activating the extension, select Dashboards in Dynatrace. You should now see a pre-configured dashboard for Consul - Control Plane.
3. Activate metric events for alerting
The extension comes with the two pre-configured metric events for alerting. To activate them:
- From the Dynatrace menu, go to Settings > Anomaly detection > Custom events for alerting.
- Find the following events
- Consul - Autopilot Unhealthy: notifies you if the value of Consul autopilot health falls below 1 for 3 minutes during any 5-minute period.
- Consul - Dead Agents Detected: notifies you if there is more than 1 dead agent (failed serf member) detected for 3 minutes during any 5-minute period.
- If necessary, select Edit to customize the event conditions.
- To activate an event, set its toggle to the On position.