consul/website/content/docs/connect/dataplane/telemetry.mdx

44 lines
3.6 KiB
Markdown

---
layout: docs
page_title: Consul Dataplane - Enable Telemetry Metrics
description: >-
Configure telemetry to collect metrics you can use to debug and observe Consul Dataplane behavior and performance.
---
# Consul Dataplane Telemetry
Consul Dataplane collects metrics about its own status and performance.
The following external metrics stores are supported:
- [DogstatsD](https://docs.datadoghq.com/developers/dogstatsd/)
- [Prometheus](https://prometheus.io/docs/prometheus/latest/)
- [StatsD](https://github.com/statsd/statsd)
Consul Dataplane uses the same external metrics store that is configured for Envoy. To enable
telemetry for Consul Dataplane, enable telemetry for Envoy by specifying an external metrics store
in the proxy-defaults configuration entry or directly in the proxy.config field of the proxy service
definition. Refer to the [Envoy bootstrap
configuration](/docs/connect/proxies/envoy#bootstrap-configuration) for details.
## Prometheus Metrics Merging
When Prometheus metrics are used, Consul Dataplane configures Envoy to serve merged metrics through
a single endpoint. Metrics from the following sources are collected and merged:
- Consul Dataplane
- The Envoy process managed by Consul Dataplane
- (optionally) Your service instance running alongside Consul Dataplane
## Metrics Reference
Consul Dataplane supports the following metrics:
| Metric Name | Description | Unit | Type |
| :------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------- | :------ |
| `consul_dataplane.connect_duration` | Measures the time `consul-dataplane` spends connecting to a Consul server, including the time to discover Consul server addresses and to complete other setup prior to Envoy opening the xDS stream. | ms | timer |
| `consul_dataplane.connected` | Indicates whether `consul-dataplane` is currently connected to a Consul server. | 1 or 0 | gauge |
| `consul_dataplane.connection_errors` | Measures the number of errors encountered on gRPC streams. This is labeled with the gRPC error status code. | number of errors | gauge |
| `consul_dataplane.discover_servers_duration` | Measures the time `consul-dataplane` spends discovering Consul server IP addresses. | ms | timer |
| `consul_dataplane.envoy_connected` | Indicates whether Envoy is currently connected to `consul-dataplane` and able to receive xDS updates. | 1 or 0 | gauge |
| `consul_dataplane.login_duration` | Measures the time `consul-dataplane` spends logging in to an ACL auth method. | ms | timer |