Quick Guide for Datadog Agent on Hosted Platforms for Logs

The Datadog Agent on hosted platforms collects and forwards logs from your applications and infrastructure to Kloudfuse for centralized monitoring. This guide provides the installation and configuration steps needed to set up log collection in managed environments where you do not control the underlying infrastructure, such as cloud services or platform-as-a-service offerings.

The Datadog Agent on hosted platforms enables you to collect and send logs from your applications and infrastructure to Kloudfuse for centralized observation. This guide covers the essential steps to install and configure the agent for log collection in environments where you do not manage the underlying infrastructure, such as managed cloud services or PaaS offerings.

Install Datadog Agent

Run the following command on the host instance. It starts collecting and reporting metrics on CPU, memory, network, and uptime for the host instance.

Replace the placeholder <dns> with the correct endpoint name.

Basic Installation
DD_UPGRADE=true \
DD_API_KEY=kloudfuse \
DD_URL="https://<KFUSE-DNS>/ingester" \
bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"

Collect Logs

Edit your /etc/datadog-agent/datadog.yaml file to collect logs.

Collect logs
additional_endpoints:
  "https://<KFUSE-DNS>/ingester":
  - apikey1
logs_enabled: true
# collect_ec2_tags: true
# collect_gce_tags: false

metadata_providers:
  - name: host
    interval: 300

use_v2_api:
  series: true

enable_payloads:
  events: false
  series: false
  service_checks: false
  sketches: false
process_config:
  expvar_port: 0
  cmd_port: 0

logs_config:
  logs_dd_url: <KFUSE-DNS>:443
  logs_no_ssl: false
  force_use_http: true
  use_compression: true
  use_v2_api: false
yaml

Starting with v6.19+/v7.19+, Datadog uses HTTPS transport; see Datadog documentation on https://docs.datadoghq.com/agent/logs/log_transport/?tab=https [Agent Transport for Logs,role=external,window=_blank].

Add Source Files

To add source files for collection, see Datadog documentation of Custom log collection.

You must specify the start_position setting in the custom conf.yaml file if you are tailing custom files, to ensure that you receive all the data and not just the “live” data.

Get Kloudfuse and Datadog Logs

For Dual Shipping, use the following configuration:

Dual Shipping Logs for Datadog and Kloudfuse
logs_enabled: true

logs_config:
  logs_dd_url: <DATADOG_DNS>:443
  logs_no_ssl: false
  force_use_http: true
  use_compression: true
  use_v2_api: false
  additional_endpoints:
    - api_key: apikey1
      Host: "<KFUSE-DNS>"
      Port: 443
      use_compression: true
      use_http: true
      use_v2_api: false
yaml