[ Datadog ] datadog.yaml configuration guide

Print

Provides a configuration guide for the Datadog.yaml file, which is the configuration file for the main settings of the Datadog Agent.

Please see the file All available setup options are: config_template.yaml provided by datadog

※This guide covers Agent v6 and v7 only.

Datadog.yaml file path

The datadog.yaml file can be found in the following paths for each platform.

플랫폼

명령어

AIX

/etc/datadog-agent/datadog.yaml

Linux

/etc/datadog-agent/datadog.yaml

macOS

~/.datadog-agent/datadog.yaml

Windows

%ProgramData%\Datadog\datadog.yaml

Main setting items

1. Basic Configuration

- Required settings required

Item

Default settings

Environment variables

Explanation

api_key

DD_API_KEY

Sets the API key of the organization to which the Datadog agent sends collected data (Organization Setting>Api Key).

site

datadoghq.com

DD_SITE

Sets the Datadog site where data is collected.

US1 : datadoghq.com
EU : datadoghq.eu
US3 : us3.datadoghq.com
US5 : us5.datadoghq.com
AP1 : ap1.datadoghq.com
US1-FED : ddog-gov.com

- Main setting items

Item

Basic Settings

Environment Variables

Explanation

dd_url

DD_DD_URL
DD_URL

When sending data from an agent through a specific server instead of directly to Datadog (e.g., via a proxy), configure the URL and IP/port accordingly. Reference guide for dd_url settings

proxy

DD_PROXY_HTTP
DD_PROXY_HTTPS
DD_PROXY_HTTPS

Configure this setting when a proxy is required for internet access. Reference guide for proxy settings

skip_ssl_validation

false

DD_SKIP_SSL_VALIDATION

Configures whether to skip SSL/TLS certificate validation.

hostname

DD_HOSTNAME

Specifies the hostname.

Reference guide for hostname determination

hostname_fqdn

false

DD_HOSTNAME_FQDN

Configures whether to enable the use of FQDN for the agent hostname.

- Tag setting


Item

Basic Settings

Environment Variables

Explanation

env

env: prod

DD_ENV

Sets the execution environment tag for the server where the agent is installed. The env tag must be set.

tags

tags:
- service:test
- os:linux
- category:aws
- location:

DD_TAGS

Configures tags that are added to metrics, events, logs, traces, and service checks.
It is recommended to set service and os tags.

Additional tags can be freely added if needed for grouped monitoring.

(Note: When setting tags, use the format tagname:tagvalue without spaces before or after the colon.)

reference guide : Tag Getting Started Guide

2. Advanced Configuration.

- Main setting items

Item

Default Settings

Environment Variables

Explanation

expvar_port

5000

DD_EXPVAR_PORT

Sets the port for exposing agent runtime metrics.
Reference guide for changes

cmd_port

5001

DD_CMD_PORT

Sets the port used for sending commands in the agent CLI and GUI, as well as retrieving information from the running agent.
Reference guide for changes

GUI_port

5002

DD_GUI_PORT

Sets the port for providing the GUI server on Windows and macOS.
Reference guide for changes

check_runners

4

DD_CHECK_RUNNERS

Sets the number of concurrent check runners (for service checks, SSH, HTTP, and other check-based processes).

  • Note: Having too many check runners can increase resource usage.

enable_gohai

true

DD_ENABLE_GOHAI

Determines whether to collect system information displayed in Host Info under Infrastructure. If set to false, data will not be collected. Reference guide

3. Log collection Configuration

- Main setting items

Item

Basic Settings

Environment variables

Explanation

logs_enabledfalseDD_LOGS_ENABLEDSpecifies whether to enable log collection.
Log Collection Guide
logs_config:
container_collect_all:
falseDD_LOGS_CONFIG_CONTAINER_COLLECT_ALLDetermines whether to collect logs from all containers. (Only used in container environments.)
Configuration Guide
logs_config:
logs_dd_url:
DD_LOGS_CONFIG_DD_URLDefines the endpoint and port for forwarding log data when using a proxy. Must support TCP connections.
TCP Agent Proxy Reference
logs_config:
logs_no_ssl:
falseDD_LOGS_CONFIG_LOGS_NO_SSLDetermines whether to disable SSL encryption. Used only when forwarding logs locally to a proxy.
TCP Agent Proxy Reference
logs_config:
processing_rules:
DD_LOGS_CONFIG_PROCESSING_RULESSets the RULE for log collection. Supports filtering, scrubbing, multi-line processing, etc.
Advanced Log Collection
logs_config:
open_files_limit:
500DD_LOGS_CONFIG_OPEN_FILES_LIMITSets the maximum number of files that can be collected simultaneously.
logs_config:
file_wildcard_selection_mode:
by_nameDD_LOGS_CONFIG_FILE_WILDCARD_SELECTION_MODEWhen collecting multiple files using a folder or wildcard (*), defines the selection criteria when exceeding open_files_limit.
Advanced Log Collection
logs_config:
max_message_size_bytes:
256000DD_LOGS_CONFIG_MAX_MESSAGE_SIZE_BYTESSets the maximum log message size in bytes. If the size exceeds 1MB (API limit), messages will be discarded.

For log collection and advanced settings, please refer to the guide below

4. Trace collection Configuration

- Main setting items

Item

Basic Settings

Environment variables

Explanation

apm_config:
enabled:

true

DD_APM_ENABLED추적 샘플링 사용사례 참고

Sets whether to collect APM.

apm_config:
apm_dd_url:

DD_APM_DD_URL

When using a proxy for APM, define the endpoint and port. Traces are forwarded over TCP, so the proxy must be able to handle TCP connections.

apm_config:
max_traces_per_second:
errors_per_second:
max_events_per_second:


10
10
200

DD_APM_MAX_TPS
DD_APM_ERROR_TPS
DD_APM_MAX_EPS

Configure the sampling settings.

Ingestion Mechanisms
See the use case for tracking sampling

apm_config:
max_memory:
max_cpu_percent:
connection_limit:


500000000
50
2000

DD_APM_MAX_MEMORY
DD_APM_MAX_CPU_PERCENT
DD_APM_CONNECTION_LIMIT

Limit the rate for APM.

Agent Rate Limit Note

For Tracing(APM) collection and configuration, please refer to the guide below

5. Process collection Configuration

- Main setting items

Item

Basic Settings

Environment variables

Explanation

process_config:
process_collection:
enabled:

false

DD_PROCESS_AGENT_PROCESS_COLLECTION_ENABLED

Sets whether to collect processes.
Real-time process reference

process_config:
process_dd_url:

DD_PROCESS_AGENT_URL

Defines the endpoint and port for the Process when using a proxy.

Czy ta odpowiedź była pomocna? Tak Nie

Wyślij opinię
Przykro nam, że nie mogliśmy Ci pomóc. Pomóż nam dopracować ten artykuł, pozostawiając informacje zwrotne.