Skip to main content

Datadog Agent

This document describes a sample setup for sending metrics and traces to Last9 from Datadog Agent

Introduction

Datadog Agent collects events and metrics from hosts and sends them to Datadog, where you can analyze your monitoring and performance data. The Datadog Agent is open source, and its source code is available on GitHub at DataDog/datadog-agent.

Prerequisites

  1. Create a Last9 cluster by following Getting Started guide.
  2. Keep the following information handy after creating the cluster from the Integrations page:
    • $last9_otlp_endpoint: Last9's OTLP endpoint
    • $last9_basic_auth_header: OTLP Basic authorization header
    • $last9_username: OTLP username
    • $last9_password: OTLP password
  3. You have access to the Datadog Agent configuration.

Configuration

Last9 leverages “Dual shipping” capability of Datadog Agent to ship telemetry data to Last9 in parallel to Datadog.

This requires the following changes in the Datadog agent configuration.

Set the Last9 ingestion endpoint as the following.

#########################
## Basic Configuration ##
#########################

api_key: <DD_API_KEY>

# For Metrics
additional_endpoints:
'https://{$last9_username}:{$last9_password}@{$last9_otlp_endpoint}/datadog':
- "<random_key>"


# For Traces
apm_config:
enabled: true
additional_endpoints:
'https://{$last9_username}:{$last9_password}@{$last9_otlp_endpoint}':
- <random_key>

Alternatively, you can also configure the Datadog agent to ship metrics and traces by setting the following environment variables.

DD_ADDITIONAL_ENDPOINTS=https://{$last9_username}:{$last9_password}@{$last9_otlp_endpoint/datadog
DD_APM_ADDITIONAL_ENDPOINT=https://{$last9_username}:{$last9_password}@{$last9_otlp_endpoint}

Restarting the Datadog agent will start shipping traces and metrics to Last9. You will see the following in the Datadog agent logs.

2024-10-09 09:19:39 IST | CORE | INFO | (comp/forwarder/defaultforwarder/default_forwarder.go:391 in Start) | Forwarder started, sending to 1 endpoint(s) with 1 worker(s) each: "https://***:********@otlp.last9.io/datadog" (2 api key(s))

Troubleshooting

Please get in touch with us on Discord or Email if you have any questions.