HashiCorp Consul is a service networking solution that enables teams to manage secure network connectivity between services, and across on-prem and multi-cloud environments and runtimes. Consul offers service discovery, service mesh, traffic management, and automated updates to network infrastructure devices. Configure Consul to send cluster metrics to Honeycomb with an OpenTelemetry Collector.Documentation Index
Fetch the complete documentation index at: https://docs.honeycomb.io/llms.txt
Use this file to discover all available pages before exploring further.
Consul Cluster Metrics
The Consul agent’s metrics endpoint supports Prometheus-formatted metrics. As with other services which expose such an endpoint, use an OpenTelemetry Collector to scrape this endpoint and get these metrics into Honeycomb. Refer to the Consul documentation for a list of Key Metrics, as well as a full Metrics Reference.Configure Consul
Prometheus metrics are not enabled by default. Therefore, to enable, set theprometheus_retention_time value to at least twice the scrape interval of your OpenTelemetry Collector.
The HashiCorp documentation also suggests setting disable_hostname to avoid having hostname-prefixed metrics.
A suggested agent configuration can be created as /etc/consul.d/metrics.hcl on each Consul agent, as follows:
Configure the OpenTelemetry Collector
Scraping the Consul agent’s Prometheus metrics endpoint requires configuring a OpenTelemetry Collector with a pipeline that starts with a Prometheus receiver and ends with an OTLP exporter. Depending on your chosen method of Consul deployment, the resource detection processor may be helpful to further enrich the OTLP Metrics being sent to Honeycomb. The following example OpenTelemetry Collector configuration uses thesystem resource detector processor: