Better Stack Datadog Agent metrics & logs forwarding

Start logging in 2 minutes

1. Install Datadog Agent

Install Datadog Agent with preconfigured metrics forwarding:

Install Datadog Agent
DD_URL="https://in-datadog.logs.betterstack.com" \
DD_API_KEY="$SOURCE_TOKEN" \
DD_HOSTNAME="$(hostname)" \
bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"

You can check your metrics in the Datadog Agent dashboard.

2. Set up log forwarding (optional)

Open your Datadog Agent configuration file, which is usually in /etc/datadog-agent/datadog.yaml, and add the following to send the logs to Better Stack:

datadog.yaml
logs_enabled: true
logs_config:
  logs_dd_url: "in-datadog.logs.betterstack.com:443"
  force_use_http: true

Can't find your datadog.yaml configuration?

You can run datadog-agent status header and look into Paths section for the Config File value.

3. Restart Datadog Agent

Whenever you apply changes after installation, restart the Datadog Agent for the new configuration to take effect:

Ubuntu, Debian CentOS, Red Hat
sudo service datadog-agent restart
sudo systemctl restart datadog-agent

4. Verify metrics and logs forwarding


Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏

Additional information

To help you locate your main configuration file, see Datadog Agent configuration files docs.

Want to read about Datadog Agent data forwarding in more detail?
Check out the Datadog Agent dual shipping page.