Can't find your datadog.yaml configuration?
Run datadog-agent status header
and look into the Paths section for the Config File value.
Set up Datadog Agent using the official install script to send metrics:
DD_URL="https://in-datadog.logs.betterstack.com" \
DD_API_KEY="$SOURCE_TOKEN" \
DD_HOSTNAME="$(hostname)" \
DD_INSTRUMENTATION_TELEMETRY_ENABLED="false" \
bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"
To enable log forwarding to Better Stack only, update the configuration file or use environment variables:
logs_enabled: true
logs_config:
logs_dd_url: "in-datadog.logs.betterstack.com:443"
force_use_http: true
DD_LOGS_ENABLED=true \
DD_LOGS_CONFIG_LOGS_DD_URL="in-datadog.logs.betterstack.com:443" \
DD_LOGS_CONFIG_FORCE_USE_HTTP=true \
Restart the Datadog Agent to apply the new configuration:
sudo service datadog-agent restart
sudo systemctl restart datadog-agent
Adjust Datadog Agent to send metrics and logs.
Update your existing configuration in /etc/datadog-agent/datadog.yaml
with the following:
# Metrics configuration
dd_url: "https://in-datadog.logs.betterstack.com"
api_key: "$SOURCE_TOKEN"
# Logs configuration
logs_enabled: true
logs_config:
logs_dd_url: "in-datadog.logs.betterstack.com:443"
force_use_http: true
# Disable unsupported optional telemetry settings
apm_config:
enabled: false
process_config:
process_collection:
enabled: false
container_collection:
enabled: false
network_path:
connections_monitoring:
enabled: false
Run datadog-agent status header
and look into the Paths section for the Config File value.
Restart the Datadog Agent to apply the new configuration:
sudo service datadog-agent restart
sudo systemctl restart datadog-agent
Please let us know at hello@betterstack.com.
We're happy to help! 🙏