From 6435d67ea92655d48d7326cc2972bb1bc82ff65b Mon Sep 17 00:00:00 2001 From: natemollica-dev Date: Tue, 13 Feb 2024 20:42:21 -0800 Subject: [PATCH] datadog integration - dogstatsd codeblock example configurations --- .../k8s/connect/observability/datadog.mdx | 88 +++++++++++-------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/website/content/docs/k8s/connect/observability/datadog.mdx b/website/content/docs/k8s/connect/observability/datadog.mdx index 86a1a48290ef..16cb4d01329b 100644 --- a/website/content/docs/k8s/connect/observability/datadog.mdx +++ b/website/content/docs/k8s/connect/observability/datadog.mdx @@ -2,7 +2,7 @@ layout: docs page_title: Configure Datadog Metrics Collection for Consul on Kubernetes description: >- - Enable Consul Monitoring via Datadog using the `metrics.datadog` helm annotation. + Enable Consul Monitoring via Datadog using the `metrics.datadog` helm value override options. --- # Datadog Integration for Consul on Kubernetes @@ -12,17 +12,16 @@ The Helm chart includes automated configuration options in order to integrate wi ### Datadog Metrics Integration Methods - Choose one integration method from the three described below that best suites the intent for metrics collection. Consul Integration, DogStatsD, and Openmetrics Prometheus methods of integration are mutually exclusive. + Choose one integration method from the three described below that best suites the intent for metrics collection. DogStatsD, Consul Integration, and Openmetrics Prometheus methods of integration are mutually exclusive.

- Reasoning: The consul-k8s helm chart automated configuration implements Datadog's Consul Integration method using the use_prometheus_endpoint configuration parameter. DogstatsD, Consul Integration, and Openmetrics Prometheus Metrics by design share the same metric name syntax for collection, and would therefore cause a conflict. + Reasoning: The consul-k8s helm chart automated configuration implements Datadog's Consul Integration method using the use_prometheus_endpoint configuration parameter. DogstatsD, Consul Integration, and Openmetrics Prometheus Metrics by design share the same metric name syntax for collection, and would therefore cause a conflict. The consul.py integration source code, as well as the consul-k8s helm chart prohibit the enablement of more that one integration at a time.
+## Consul Server Agent DogstatsD Metrics Collection - -## Consul Metrics Integration Checks - - + + ```yaml metrics: @@ -31,29 +30,15 @@ The Helm chart includes automated configuration options in order to integrate wi datadog: enabled: true namespace: "datadog" + dogstatsd: + enabled: true + socketTransportType: "UDS" + dogstatsdAddr: "/var/run/datadog/dsd.socket" ``` - | Consul Component | Description | API Endpoint(s) | - |------------------|--------------------------------------------------|----------------------------------------------------------------------| - | Agent | Agent Metadata (i.e., version) | `/v1/agent/self` | - | Metrics | Prometheus formatted metrics | `/v1/agent/metrics` | - | Serf | Events and Membership Flaps | `/v1/health/service/consul` `/v1/agent/self` | - | Raft | Monitors Raft peer information | `/v1/status/leader` `/v1/status/peers` | - | Catalog Services | Service Health Status and Node Count | `/v1/catalog/services` `/v1/health/state/any` | - | Catalog Nodes | Node Service Count and Health Status | `/v1/health/state/any` `/v1/health/service/` | - | Consul Latency | Consul LAN + WAN Coordinate Latency Calculations | `/v1/agent/self` `/v1/coordinate/nodes` `/v1/coordinate/datacenters` | - - -### Metrics Data Collected - -Review the Datadog Documentation for the full description of Metrics data collected by the official Consul integration [here](https://docs.datadoghq.com/integrations/consul/?tab=host#data-collected). - -## Consul Server Agent DogstatsD Metrics Collection - - - + ```yaml metrics: @@ -64,25 +49,28 @@ Review the Datadog Documentation for the full description of Metrics data collec namespace: "datadog" dogstatsd: enabled: true - socketTransportType: "UDS" - dogstatsdAddr: "/var/run/datadog/dsd.socket" + socketTransportType: "UDP" + # Set `dogstatsdPort` to `0` (default) to omit port number append to address. + dogstatsdPort: 0 + dogstatsdAddr: "datadog.datadog.svc.cluster.local" ``` - + ```yaml metrics: enabled: true enableAgentMetrics: true - datadog: + datadog: + enabled: true + namespace: "datadog" + dogstatsd: enabled: true - namespace: "datadog" - dogstatsd: - enabled: true - socketTransportType: "UDP" - dogstatsdAddr: "datadog.datadog.svc.cluster.local" + socketTransportType: "UDP" + dogstatsdPort: 8125 + dogstatsdAddr: "172.20.180.10" ``` @@ -91,6 +79,36 @@ Review the Datadog Documentation for the full description of Metrics data collec - Collects DogstatsD formatted metrics pertaining to Consul Serf Membership, Raft, DNS Performance, Agent Telemetry, and much more. - Enables configuring DogstatsD metric collection using one of either `UDP` or `Unix Domain Socket configuration` +## Datadog Official Consul Integration Checks + + + + ```yaml + metrics: + enabled: true + enableAgentMetrics: true + datadog: + enabled: true + namespace: "datadog" + ``` + + + + | Consul Component | Description | API Endpoint(s) | + |------------------|-----------------------------------------------------|----------------------------------------------------------------------| + | Agent | Agent Metadata (i.e., version) | `/v1/agent/self` | + | Metrics | Prometheus formatted metrics | `/v1/agent/metrics` | + | Serf | Events and Membership Flaps | `/v1/health/service/consul` `/v1/agent/self` | + | Raft | Monitors Raft peer information and leader elections | `/v1/status/leader` `/v1/status/peers` | + | Catalog Services | Service Health Status and Node Count | `/v1/catalog/services` `/v1/health/state/any` | + | Catalog Nodes | Node Service Count and Health Status | `/v1/health/state/any` `/v1/health/service/` | + | Consul Latency | Consul LAN + WAN Coordinate Latency Calculations | `/v1/agent/self` `/v1/coordinate/nodes` `/v1/coordinate/datacenters` | + + +### Metrics Data Collected + +Review the Datadog Documentation for the full description of Metrics data collected by the official Consul integration [here](https://docs.datadoghq.com/integrations/consul/?tab=host#data-collected). + ## Consul Server Openmetrics Prometheus Metrics Collection