From 45c3562477bb432fe7c22b53213c30c42f8b5c7b Mon Sep 17 00:00:00 2001 From: alex <8968914+acpana@users.noreply.github.com> Date: Mon, 25 Jul 2022 12:43:06 -0700 Subject: [PATCH] docs: add peering metric doc (#13862) Co-authored-by: Freddy Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com> Co-authored-by: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> --- website/content/docs/agent/telemetry.mdx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/website/content/docs/agent/telemetry.mdx b/website/content/docs/agent/telemetry.mdx index 3bb5013b87..01584fb183 100644 --- a/website/content/docs/agent/telemetry.mdx +++ b/website/content/docs/agent/telemetry.mdx @@ -684,3 +684,22 @@ agent. The table below describes the additional metrics exported by the proxy. | `consul.proxy.web.upstream.conns` | Shows the current number of connections open from a proxy instance to an upstream. Where supported a `src` label is added indicating the service name the proxy represents, and a `dst` label is added indicating the service name the upstream is connecting to. | connections | gauge | | `consul.proxy.web.inbound.rx_bytes` | Increments by the number of bytes received from an upstream connection. Where supported a `src` label is added indicating the service name the proxy represents, and a `dst` label is added indicating the service name the upstream is connecting to. | bytes | counter | | `consul.proxy.web.inbound.tx_bytes` | Increments by the number of bytes transferred to an upstream connection. Where supported a `src` label is added indicating the service name the proxy represents, and a `dst` label is added indicating the service name the upstream is connecting to. | bytes | counter | + +## Peering metrics + +**Requirements:** +- Consul 1.13.0+ + +[Cluster peering](/docs/connect/cluster-peering) refers enabling communication between Consul clusters through a peer connection, as opposed to a federated connection. Consul collects metrics that describe the number of services exported to a peered cluster. Peering metrics are only emitted by the leader server. + +| Metric | Description | Unit | Type | +| ------------------------------------- | ----------------------------------------------------------------------| ------ | ------- | +| `consul.peering.exported_services` | Counts the number of services exported to a peer cluster. | count | gauge | + +### Labels +Consul attaches the following labels to metric values. +| Label Name | Description | Possible values | +| ------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------ | +| `peer_name` | The name of the peering on the reporting cluster or leader. | Any defined peer name in the cluster | +| `peer_id` | The ID of a peer connected to the reporting cluster or leader. | Any UUID | +| `partition` | Name of the partition that the peering is created in. | Any defined partition name in the cluster |