Agent Environment Variables
Rapport de recherche Datadog : Bilan sur l'adoption de l'informatique sans serveur Rapport : Bilan sur l'adoption de l'informatique sans serveur

Agent Environment Variables

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.
For Agent v5, reference the Docker Agent GitHub repo.

Overview

For Agent v6, most of the configuration options in the Agent’s main configuration file (datadog.yaml) can be set through environment variables.

General use

In general, use the following rules:

  • Option names should be uppercase with the DD_ prefix: hostname -> DD_HOSTNAME

  • List values should be separated by spaces:

      ac_include:
        - "image:cp-kafka"
        - "image:k8szk"
      # DD_AC_INCLUDE="image:cp-kafka image:k8szk"
  • The nesting of config options with predefined keys should be separated with an underscore:

      cluster_agent:
        cmd_port: 5005
      # DD_CLUSTER_AGENT_CMD_PORT=5005
  • The nesting of config options with user-defined keys must be JSON-formatted:

      docker_env_as_tags:
        ENVVAR_NAME: tag_name
      # DD_DOCKER_ENV_AS_TAGS='{"ENVVAR_NAME": "tag_name"}'

Note: Specifying a nested option with an environment variable overrides all the nested options specified under the config option. The exception to this rule is the proxy config option. Reference the Agent proxy documentation for more details.

Exceptions

  • For the collection Agents (APM, process, and logs), drop the _config in the option name, for example:

      apm_config:
        enabled: true
      # DD_APM_ENABLED=true
  • Not all datadog.yaml options are available with environment variables. Refer to config.go in the Datadog Agent GitHub repo. Options with environment variables start with config.BindEnv*.

Further Reading