Datadog Agent on Standalone Hosts
The Datadog Agent collects metrics, logs, events, and traces from your infrastructure and forwards them to Kloudfuse. This guide covers how to install and configure the agent directly on standalone hosts such as AWS EC2, Azure VMs, and GCP instances, where you manage the underlying operating system.
Install the Datadog Agent
Run the following command on the host instance. It installs the agent and starts collecting and reporting host-level metrics such as CPU, memory, network, and uptime.
Replace <KFUSE-DNS> with your Kloudfuse cluster hostname.
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 Metrics
Host-level metrics (CPU, memory, network, disk) are collected automatically once the agent is installed.
To collect additional Prometheus-style metrics, enable the OpenMetrics check by copying the example configuration:
cp /etc/datadog-agent/conf.d/openmetrics.d/conf.yaml.example \
/etc/datadog-agent/conf.d/openmetrics.d/conf.yaml
See Datadog — OpenMetrics Integration for configuration options.
Collect Logs
Edit your /etc/datadog-agent/datadog.yaml file to enable log collection.
Replace <KFUSE-DNS> with your Kloudfuse cluster hostname.
logs_enabled: true
logs_config:
logs_dd_url: "<KFUSE-DNS>:443"
logs_no_ssl: false
force_use_http: true
use_compression: true
use_v2_api: false
metadata_providers:
- name: host
interval: 300
use_v2_api:
series: true
| Starting with v6.19+/v7.19+, the Datadog Agent uses HTTPS transport by default. See Datadog — Agent Transport for Logs. |
Collect Custom Log Files
To tail custom log files, add a custom conf.yaml in the appropriate conf.d subdirectory.
Specify start_position to ensure all data is collected rather than only new "live" data.
Dual Shipping Logs
To send logs to both Datadog and Kloudfuse simultaneously:
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
Collect Events
Edit your /etc/datadog-agent/datadog.yaml file to enable event collection and forward events to Kloudfuse.
collect_events: true
process_config:
events_dd_url: "https://<KFUSE-DNS>/ingester"
The collect_events option enables collection of container lifecycle events (start, stop, die) and system events such as log rotations.
The process_config.events_dd_url setting forwards those events to Kloudfuse.
Collect Traces
-
Open
/etc/datadog-agent/datadog.yamland enable APM, pointing the trace endpoint at Kloudfuse:apm_config: enabled: true apm_dd_url: "<KFUSE-DNS>:443/ingester"yaml -
Instrument your applications with the Datadog APM library for your language (
dd-tracefor Python,ddtracefor Java, and so on). -
Configure your application to send traces to the local agent:
DD_AGENT_HOST=localhost DD_TRACE_ENABLED=true DD_ENV=<YOUR_ENV_NAME> DD_SERVICE=<YOUR_SERVICE_NAME> DD_VERSION=<YOUR_SERVICE_VERSION>text