Better Stack Datadog Agent metrics & logs forwarding
Start monitoring in 2 minutes
1. Install Datadog Agent
Set up Datadog Agent using the official install script to send metrics:
2. Ensure metrics API v2 is used
Newest Datadog versions default to an incompatible metrics API version. For versions ≥ 7.81.0, add the following to /etc/datadog-agent/datadog.yaml:
3. (Optional) Enable log forwarding
To enable log forwarding to Better Stack, update the following values in /etc/datadog-agent/datadog.yaml config:
Can't find your datadog.yaml configuration?
Run datadog-agent status header | grep 'Config Path' to get the config path.
Custom log collection
By default, installed Datadog Agent doesn't collect any logs. You can start collecting logs from a log file by creating a custom configuration, for example to collect Apache logs:
You can find example configurations for commonly used services in /etc/datadog-agent/conf.d/.
Read more about Log collection configuration in the official docs.
4. Restart Datadog Agent
Restart the Datadog Agent to apply the new configuration:
5. Verify metrics and logs forwarding
- Metrics: Check your metrics in the Datadog Agent dashboard.
- Logs: If you enabled logs, check your logs in Better Stack → Live tail.
Adjust existing Datadog Agent
Adjust Datadog Agent to send metrics and logs.
Update configuration
Update the following values in your existing /etc/datadog-agent/datadog.yaml config:
Can't find your datadog.yaml configuration?
Run datadog-agent status header | grep 'Config Path' to get the config path.
Restart Datadog Agent
Restart the Datadog Agent to apply the new configuration:
Need help?
Please let us know at hello@betterstack.com.
We're happy to help! 🙏