Skip to main content
This guide provides instructions for configuring a Datadog agent to send telemetry data to the Sawmills Collector installed on a different Kubernetes cluster. For instructions on configuring external access to the Sawmills Collector, please refer to Configure the Sawmills Collector for External Access.

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 TypeSupportedNotes
LogsYesAll log formats
MetricsYesGauges, counts, rates, histograms, and distributions
TracesNoMust be sent directly to Datadog (see Traces)
Traces are not supported through the Sawmills Collector. If your Datadog agent sends traces through Sawmills, that trace data will be lost. Make sure APM/tracing is configured to send directly to Datadog. See Traces Bypass Configuration for details.

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 your values.yaml:
datadog:
    logs:
        enabled: true
        containerCollectAll: true # optional, collects all container logs by default
agents:
    useConfigMap: true
    customAgentConfig:
        logs_config:
            use_http: true
            force_use_http: true
            logs_dd_url: sawmills-collector.sawmills.svc.cluster.local:<port>
            logs_no_ssl: true

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.
logs_enabled: true
logs_config:
    use_http: true
    force_use_http: true
    logs_dd_url: sawmills-collector.sawmills.svc.cluster.local:<port>
    logs_no_ssl: true
Option 2: Configure sending only logs to Sawmills Collector (Environment Variables Method) This approach uses environment variables to configure single shipping, which is useful for containerized deployments or when you prefer environment-based configuration. Set the following environment variables in your Datadog agent deployment:
- name: "DD_LOGS_ENABLED"
  value: "true"
- name: "DD_LOGS_CONFIG_FORCE_USE_HTTP"
  value: "true"
- name: "DD_LOGS_CONFIG_USE_HTTP"
  value: "true"
- name: "DD_LOGS_CONFIG_LOGS_DD_URL"
  value: "sawmills-collector.sawmills.svc.cluster.local:<port>"
- name: "DD_LOGS_CONFIG_LOGS_NO_SSL"
  value: "true"
Option 3: Configure dual shipping (Environment Variables Method) This approach allows you to send logs to both Datadog and Sawmills Collector simultaneously using environment variables. Set the following environment variables in your Datadog agent deployment:
- name: "DD_LOGS_ENABLED"
  value: "true"
- name: "DD_LOGS_CONFIG_FORCE_USE_HTTP"
  value: "true"
- name: "DD_LOGS_CONFIG_USE_HTTP"
  value: "true"
- name: "DD_LOGS_CONFIG_LOGS_NO_SSL"
  value: "true"
- name: "DD_LOGS_CONFIG_ADDITIONAL_ENDPOINTS"
  value: '[{"api_key": "ignore", "host": "sawmills-collector.sawmills.svc.cluster.local", "port": <port>, "is_reliable": true}]'
Option 4: Configure dual shipping (Configuration File Method) This approach allows you to send logs to both Datadog and Sawmills Collector simultaneously. Add the following additional_endpoints section to your configuration:
logs_enabled: true
logs_config:
    use_http: true # ensures both primary and additional endpoints use HTTP transport
    force_use_http: true # this is important to force the agent to use http
    logs_no_ssl: true
    additional_endpoints:
        - api_key: ignore
          host: sawmills-collector.sawmills.svc.cluster.local
          port: <port>
          use_ssl: false
Different Datadog agent versions might have slightly different ways of configuring the agent. If you can’t manage to disable HTTPS, try using dev_mode_no_ssl: true under logs_config.
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. The DD_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.
- name: "DD_DD_URL"
  value: "http://sawmills-collector.sawmills.svc.cluster.local:<port>"
- name: "DD_USE_V2_API_SERIES"
  value: "true"
Using a configuration file:
dd_url: http://sawmills-collector.sawmills.svc.cluster.local:<port>
use_v2_api.series: true

Option 2: Dual Shipping (Environment Variables)

This approach sends metrics to both Datadog and the Sawmills Collector simultaneously.
- name: "DD_USE_V2_API_SERIES"
  value: "true"
- name: "DD_ADDITIONAL_ENDPOINTS"
  value: '{"http://sawmills-collector.sawmills.svc.cluster.local:<port>": ["ignore"]}'
Using a configuration file:
use_v2_api.series: true
additional_endpoints:
    "http://sawmills-collector.sawmills.svc.cluster.local:<port>":
        - ignore
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 your values.yaml:
datadog:
    dd_url: http://sawmills-collector.sawmills.svc.cluster.local:<port>
agents:
    containers:
        agent:
            env:
                - name: "DD_USE_V2_API_SERIES"
                  value: "true"
For dual shipping with Helm:
agents:
    containers:
        agent:
            env:
                - name: "DD_USE_V2_API_SERIES"
                  value: "true"
                - name: "DD_ADDITIONAL_ENDPOINTS"
                  value: '{"http://sawmills-collector.sawmills.svc.cluster.local:<port>": ["ignore"]}'

Traces Bypass Configuration

Traces are not supported through the Sawmills Collector. You must ensure that APM/trace data continues to be sent directly to Datadog. If trace data is routed through Sawmills, it will be dropped and you will lose trace data.
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_URL to the Sawmills Collector address.
  • Do not set DD_TRACE_DD_URL to the Sawmills Collector address.
  • If you are using DD_DD_URL for metrics single shipping, APM will continue to send traces directly to Datadog as long as DD_APM_DD_URL is not explicitly overridden.
To explicitly ensure traces go directly to Datadog, you can set:
- name: "DD_APM_ENABLED"
  value: "true"
- name: "DD_APM_DD_URL"
  value: "https://trace.agent.datadoghq.com"
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

# Logs → Sawmills Collector
- name: "DD_LOGS_ENABLED"
  value: "true"
- name: "DD_LOGS_CONFIG_FORCE_USE_HTTP"
  value: "true"
- name: "DD_LOGS_CONFIG_USE_HTTP"
  value: "true"
- name: "DD_LOGS_CONFIG_LOGS_DD_URL"
  value: "sawmills-collector.sawmills.svc.cluster.local:<logs-port>"
- name: "DD_LOGS_CONFIG_LOGS_NO_SSL"
  value: "true"

# Metrics → Sawmills Collector
- name: "DD_DD_URL"
  value: "http://sawmills-collector.sawmills.svc.cluster.local:<metrics-port>"
- name: "DD_USE_V2_API_SERIES"
  value: "true"

# Traces → Datadog directly (do NOT route through Sawmills)
- name: "DD_APM_ENABLED"
  value: "true"
- name: "DD_APM_DD_URL"
  value: "https://trace.agent.datadoghq.com"

Configuration File

# Logs → Sawmills Collector
logs_enabled: true
logs_config:
    use_http: true
    force_use_http: true
    logs_dd_url: sawmills-collector.sawmills.svc.cluster.local:<logs-port>
    logs_no_ssl: true

# Metrics → Sawmills Collector
dd_url: http://sawmills-collector.sawmills.svc.cluster.local:<metrics-port>
use_v2_api.series: true

# Traces → Datadog directly (do NOT route through Sawmills)
apm_config:
    enabled: true
    dd_url: https://trace.agent.datadoghq.com
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:
sudo systemctl restart datadog-agent

Verify Data Flow

To confirm the data flow from the Datadog agent to the Sawmills Collector:
  1. View the Datadog agent logs to confirm there are no errors in connecting to the Sawmills Collector:
    sudo tail -f /var/log/datadog/agent.log
    
  2. Check the Sawmills Collector logs in the destination cluster to ensure it is receiving data from the Datadog agent.
  3. 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_SERIES is set to true. The Sawmills Collector requires the v2 series API format.
  • Missing Traces: Traces are not supported through the Sawmills Collector. Verify that DD_APM_DD_URL is not pointing to the Sawmills Collector.