Skip to content

consul-telemetry-collector receives metrics from Envoy proxies in a Consul service mesh and exports them to HCP and other OTLP compliant endpoint

License

Notifications You must be signed in to change notification settings

kisunji/consul-telemetry-collector

 
 

Repository files navigation

Consul logo Consul Telemetry Collector

Consul Telemetry Collector is a lightweight OpenTelemetry Collector used to collect metrics from Envoy proxies and export them to HCP and other OTLP compliant metrics endpoints. The Envoy stats sink is encrypted and authorized by the Consul service mesh.

Installation

Documentation on deploying the Consul Telemetry Collector to a Kubernetes runtime are provided in the HCP documentation:

Configuration

HCP automatically configures these values for you when you link self-managed clusters using consul-k8s with the -cloud preset. For more information, refer to Consul telemetry collector in the documentation.

All configuration options available are listed below. Use the CLIENT_ID, CLIENT_SECRET, and RESOURCE_ID created for observability from HCP Consul Central to send metrics to HCP.

Configurations load in the following order of precedence:

1. command line opts if specified
2. env variables if specified
3. file configuration
Usage: consul-telemetry-collector agent [options]

        Starts the telemetry-collector and runs until an interrupt is received. The
        collector can forward all metrics to an otlphttp endpoint or to the Hashicorp
        cloud platform.

  -config-file-path=<string>
     Load configuration from a config file.

  -hcp-client-id=<string>
     HCP Service Principal Client ID Environment variable HCP_CLIENT_ID

  -hcp-client-secret=<string>
     HCP Service Principal Client Secret Environment variable
     HCP_CLIENT_SECRET

  -hcp-resource-id=<string>
     HCP Resource ID Environment variable HCP_RESOURCE_ID

  -http-collector-endpoint=<string>
     OTLP HTTP endpoint to forward telemetry to Environment variable
     CO_OTEL_HTTP_ENDPOINT

Development

Build

Binary

make dev

Docker Image

make docker

Test

Unit Tests

make unit-tests

About

consul-telemetry-collector receives metrics from Envoy proxies in a Consul service mesh and exports them to HCP and other OTLP compliant endpoint

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 93.5%
  • HCL 3.2%
  • Dockerfile 2.0%
  • Makefile 1.3%