Installing the Datadog Agent for Middleware

This guide explains how to configure the Datadog Agent to send data exclusively to Middleware. Middleware supports the ingestion of APM traces, metrics and logs from the Datadog Agent

This feature is supported in Datadog's Linux and Kubernetes Agent

Prerequisites

1 Traces

Datadog Agent version 6.7.0 or above

2 HTTP Logs

Datadog Agent version 6.13 or above

3 Metrics

Datadog Agent version 6.17 or above

Datadog Linux Agent

Datadog's Linux agent stores configuration in YAML format. This file is located in /etc/datadog-agent/datadog.yaml by default. You will need to update this file to enable sending metrics, traces, and logs to the Middleware platform.

Initial Configuration

Add the following configuration to your datadog.yaml file:

1api_key: "<MW_API_KEY>"
2dd_url: https://<MW_UID>.middleware.io:443

Trace Configuration

Add the following apm_dd_url within the apm_config section in your datadog.yaml file:

If you already have the apm_config section in your datadog.yaml file, add an apm_dd_url endpoint in the same section. Datadog agent does not support multiple apm_config sections.

The Linux Datadog Agent is configured by default in the following YAML file: /etc/datadog-agent/datadog.yaml

1apm_config:
2  enabled: true
3  apm_dd_url: https://<MW_UID>.middleware.io:443

Log Configuration

Add the following logs_dd_url within the logs_config section in your datadog.yaml file:

1logs_enabled: true
2logs_config:
3  logs_dd_url: https://<MW_UID>.middleware.io:443
4  container_collect_all: true
5  logs_no_ssl: true
6  use_http: true
7  auto_multi_line_detection: true

Configuration

1api_key: <MW_API_KEY>
2dd_url: https://<MW_UID>.middleware.io:443
3apm_config:
4  enabled: true
5  apm_dd_url: https://<MW_UID>.middleware.io:443
6logs_enabled: true
7logs_config:
8  logs_dd_url: https://<MW_UID>.middleware.io:443
9  container_collect_all: true
10  logs_no_ssl: true
11  use_http: true
12  auto_multi_line_detection: true

In order to get visibility into the processes running on your infrastructure, enable live processes collection under the process_config section as shown below:

1process_config:
2  process_collection:
3    enabled: true

Restart Datadog Agent

Run the following code in your terminal to restart the Datadog Agent:

1sudo systemctl restart datadog-agent

Replace <MW_API_KEY> with your Middleware API Key and {ACCOUNT-UID} with your Middleware account UID.

Datadog Kubernetes Agent

Datadog Kubernetes agent supports Helm and Operator modes of installation. Middleware can ingest traces, metrics, and logs from the Datadog Kubernetes agent installed using any of these modes.

Helm Chart Installation

If you have installed the Datadog Agent using their Helm chart, you must add the following sections to your datadog-values.yaml.

Replace <your-cluster-name> with your actual cluster name, and login to see your account's MW_API_KEY and MW_UID.

1datadog:
2  dd_url: https://<MW_UID>.middleware.io:443
3  logsEnabled: true
4  logs:
5    enabled: true
6    containerCollectAll: true
7    containerCollectUsingFiles: true
8    autoMultiLineDetection: true
9  clusterName: <your-cluster-name>
10  env:
11    - name: DD_CHECKS_TAG_CARDINALITY
12      value: "orchestrator"
13  apm:
14    enabled: true
15    portEnabled: true
16  kubelet:
17    tlsVerify: false
18  confd:
19    kubelet.yaml: |-
20      ad_identifiers:
21        - _kubelet
22      instances:
23        - tags:
24          - dd_cluster_name:<your cluster name>
25    container.yaml: |-
26      ad_identifiers:
27        - _container
28      instances:
29        - tags:
30          - dd_cluster_name:<your cluster name>
31  processAgent:
32    enabled: true
33    processCollection: true
34  cluster-agent:
35    enabled: true
36  orchestratorExplorer:
37    enabled: true
38  kubeStateMetricsCore:
39    enabled: true
40  containerImageCollection:
41    enabled: true
42  clusterChecks:
43    enabled: true
44    useClusterChecksRunners: true
45  targetSystem: linux
46  apiKey: <MW_API_KEY>
47
48agents:
49  useConfigMap: true
50  customAgentConfig:
51    use_v2_api:
52      series: true
53    process_config:
54      process_dd_url: https://<MW_UID>.middleware.io:443
55      container_collection:
56        enabled: true
57    logs_config:
58      logs_dd_url: https://<MW_UID>.middleware.io:443
59      logs_no_ssl: true
60      use_http: true
61      auto_multi_line_detection: true
62    apm_config:
63      enabled: true
64      apm_non_local_traffic: true
65      apm_dd_url: https://<MW_UID>.middleware.io:443
66    orchestrator_explorer:
67      orchestrator_dd_url: https://<MW_UID>.middleware.io:443
68      manifest_collection:
69        enabled: false
70
71clusterAgent:
72  useConfigMap: true
73  enabled: true
74  datadog_cluster_yaml:
75    use_v2_api:
76      series: true
77    process_config:
78      process_dd_url: https://<MW_UID>.middleware.io:443
79      container_collection:
80        enabled: true
81    orchestrator_explorer:
82      orchestrator_dd_url: https://<MW_UID>.middleware.io:443
83      manifest_collection:
84        enabled: false

You can remove the logs_config and/or apm_config sections if you don't want to send logs or APM to Middleware.

You can also remove the orchestrator section or other sections to prevent sending Kubernetes metrics and metadata info.

Please provide accurate ClusterName values where required in the YAML, as it helps in correctly correlating data in Middleware. Any issues with cluster names can lead to inconsistencies.

FAQs

How do I troubleshoot if I can't see my data in Middleware?

  1. For Datadog Linux agent, ensure that the agent is in an active state. You can issue the following command to find out the status:

    1sudo systemctl status datadog-agent
  2. Verify that the Middleware API key and target URLs are correct.

  3. Ensure there's only one apm_config and logs_config section in the configuration file (/etc/datadog/datadog.yaml).

  4. For Datadog Kubernetes agent, ensure that the datadog-agent and cluster-agent pods are operational. You should check that liveness and readiness checks are reporting healthy for both of these pods.

  5. For Kubernetes Helm chart installation method, check the datadog-values.yaml and ensure that the agents section is at the same level as the datadog section. The agents section should NOT be inside the datadog section.

Need assistance or want to learn more about Middleware? Contact our support team at [email protected] or join our Slack channel.