Enable Infrastructure Monitoring

This guide explains how to update the Datadog Agent configuration to enable Infrastructure monitoring.

If your agent is deployed on a Linux host, the configuration update depends on the method you used to install the agent.

For a Datadog agent installed using the one-line installation command:

  1. Open the datadog.yaml configuration file.

  2. Remove the enable_payloads top-level attribute:

    - enable_payloads:
    -   series: false
    -   events: false
    -   service_checks: false
    -   sketches: false
    
      apm_config:
        enabled: true
        error_tracking_standalone:
          enabled: true
    
  3. Restart the Agent.

For a Datadog agent configured manually for Backend Error Tracking:

  1. Open the datadog.yaml configuration file.

  2. Remove the core_agent top-level attribute:

    - core_agent:
    -   enabled: false
      apm_config:
        error_tracking_standalone:
          enabled: true
    
  3. Restart the Agent.

If your agent is deployed in Kubernetes, you need to update its configuration in Datadog Operator or Helm depending on the method you used to install the agent.

For a Datadog agent installed with Helm:

  1. Update your datadog-values.yaml file

      agents:
        containers:
          agent:
            env:
              [...]
    -         - name: DD_CORE_AGENT_ENABLED
    -           value: "false"
      datadog:
    -   processAgent:
    -     enabled: false
    -     containerCollection: false
      apiKeyExistingSecret: datadog-secret
      site: <DATADOG_SITE>
      tags:
        - env:<AGENT_ENV>
      apm:
        errorTrackingStandalone:
          enabled: true
        # Required to enable Single-Step Instrumentation
        instrumentation:
          enabled: true
          libVersions:
            java: "1"
            dotnet: "3"
            python: "2"
            js: "5"
            php: "1"
    
  2. After making your changes, upgrade your Datadog Helm chart

    helm upgrade -f datadog-values.yaml datadog-agent datadog/datadog
    

For a Datadog agent installed with the Datadog Operator:

  1. Update your datadog-agent.yaml file:
      apiVersion: datadoghq.com/v2alpha1
      kind: DatadogAgent
      metadata:
        name: datadog
      spec:
        global:
          site: <DATADOG_SITE>
          tags:
            - env:<AGENT_ENV>
          credentials:
            apiSecret:
              secretName: datadog-secret
              keyName: api-key
          env:
    -       - name: DD_CORE_AGENT_ENABLED
    -         value: "false"
        features:
          apm:
            enabled: true
            errorTrackingStandalone:
              enabled: true
            instrumentation:
              enabled: true
              libVersions:
                java: "1"
                dotnet: "3"
                python: "2"
                js: "5"
                php: "1"
    
  2. Deploy the Datadog Agent with the updated configuration file:
    kubectl apply -f path/to/your/datadog-agent.yaml
    
PREVIEWING: camille.jouan/et-datadog-operator