Prerequisites
- A Datadog agent installed in the source cluster.
- The Sawmills Collector deployed and accessible in the destination Kubernetes cluster.
- Network connectivity between the source and destination clusters.
Supported Data Types
| Data Type | Supported | Notes |
|---|---|---|
| Logs | Yes | All log formats |
| Metrics | Yes | Gauges, counts, rates, histograms, and distributions |
| Traces | No | Must be sent directly to Datadog (see Traces) |
Logs Configuration
Configuration Options
There are several ways to configure the Datadog agent to send log data to the Sawmills Collector. Choose the method that best fits your deployment:- Option 1: Send only logs to Sawmills Collector (single shipping) - Configuration file method
- Option 2: Send only logs to Sawmills Collector (single shipping) - Environment variables method
- Option 3: Send logs to both Datadog and Sawmills Collector (dual shipping) - Environment variables method
- Option 4: Send logs to both Datadog and Sawmills Collector (dual shipping) - Configuration file method
Configure the Datadog Agent for Logs
Before updating endpoints, make sure the Datadog Agent is collecting logs. The examples below include the required flags (logs_enabled: true or DD_LOGS_ENABLED=true) so the Agent actually ships log data to the Sawmills Collector.
Helm Chart Configuration
If you installed the Datadog agent using a Helm chart, add the following to yourvalues.yaml:
Configuration File Method
Option 1: Configure sending only logs to Sawmills Collector (Single Shipping) This approach sends only logs to the Sawmills Collector while keeping metrics and traces going to Datadog.additional_endpoints section to your configuration:
Adjust
sawmills-collector.sawmills:<port> to match the domain and port you configured in the Sawmills Collector’s external access setup.Metrics Configuration
The Sawmills Collector supports all Datadog metric types: gauges, counts, rates, histograms, and distributions. TheDD_DD_URL environment variable controls where the agent sends metric data (both regular series and distribution sketches).
Configuration Options
- Option 1: Send only metrics to Sawmills Collector (single shipping)
- Option 2: Send metrics to both Datadog and Sawmills Collector (dual shipping)
Option 1: Single Shipping (Environment Variables)
This approach redirects all metric data to the Sawmills Collector. Metrics will no longer be sent directly to Datadog.Option 2: Dual Shipping (Environment Variables)
This approach sends metrics to both Datadog and the Sawmills Collector simultaneously.The default port for the Datadog metrics source in the Sawmills Collector is 8126. Make sure the port in your configuration matches the port configured in your Datadog Source.
Helm Chart Configuration (Metrics)
To configure metrics forwarding via Helm, add the following to yourvalues.yaml:
Traces Bypass Configuration
When configuring the Datadog agent to send logs and/or metrics through Sawmills, make sure traces are not redirected. The APM endpoint is controlled independently from logs and metrics:- Do not set
DD_APM_DD_URLto the Sawmills Collector address. - Do not set
DD_TRACE_DD_URLto the Sawmills Collector address. - If you are using
DD_DD_URLfor metrics single shipping, APM will continue to send traces directly to Datadog as long asDD_APM_DD_URLis not explicitly overridden.
Replace
datadoghq.com with your Datadog site (e.g., us5.datadoghq.com, datadoghq.eu) if you are not on the US1 site.Combined Configuration Example
Below is a complete example that sends both logs and metrics through the Sawmills Collector while keeping traces going directly to Datadog:Environment Variables
Configuration File
Replace
<logs-port> and <metrics-port> with the ports configured in your Sawmills Collector’s Datadog Source. The default logs port is 10518 and the default metrics port is 8126.Restart the Datadog Agent
After saving the configuration changes, restart the Datadog agent to apply them:Verify Data Flow
To confirm the data flow from the Datadog agent to the Sawmills Collector:-
View the Datadog agent logs to confirm there are no errors in connecting to the Sawmills Collector:
- Check the Sawmills Collector logs in the destination cluster to ensure it is receiving data from the Datadog agent.
- Check your backend or monitoring system (e.g., Prometheus, Grafana) to ensure the Sawmills Collector is forwarding data as expected.
Configuration File Location
If you installed the Datadog agent using a different method, the configuration file is usually located at/etc/datadog-agent/datadog.yaml on your Datadog agent host.
Troubleshooting
- Connection Issues: If the Datadog agent can’t reach the Sawmills Collector, verify network connectivity and firewall settings.
- Configuration Errors: Double-check the Datadog agent’s configuration for correct endpoints, ports, and protocols.
- External Accessibility: Ensure that your Ingress or NodePort service for the Sawmills Collector is accessible from the source cluster.
- Missing Metrics: Ensure
DD_USE_V2_API_SERIESis set totrue. The Sawmills Collector requires the v2 series API format. - Missing Traces: Traces are not supported through the Sawmills Collector. Verify that
DD_APM_DD_URLis not pointing to the Sawmills Collector.