Datadog Agent for Windows
Install the Datadog Agent on Windows hosts to collect metrics, logs, events, and traces and forward them to Kloudfuse. The agent runs as a Windows service and begins reporting immediately after installation.
Install the Datadog Agent
Run the following in PowerShell with administrator privileges.
Replace <kloudfuse-hostname> with your Kloudfuse cluster hostname.
$env:DD_UPGRADE="true"
$env:DD_API_KEY="kloudfuse"
$env:DD_URL="https://<kloudfuse-hostname>/ingester"
Start-BitsTransfer -Source "https://s3.amazonaws.com/ddagent-windows-stable/datadog-agent-7-latest.amd64.msi" -Destination "$env:TEMP\datadog-agent-7-latest.amd64.msi"
Start-Process msiexec.exe -Wait -ArgumentList "/qn /i $env:TEMP\datadog-agent-7-latest.amd64.msi APIKEY=$env:DD_API_KEY DD_URL=$env:DD_URL"
Collect Metrics
By default the agent collects system metrics (CPU, memory, disk, network). To collect additional application metrics via the OpenMetrics check, copy the example configuration:
Copy-Item "C:\ProgramData\Datadog\conf.d\openmetrics.d\conf.yaml.example" `
"C:\ProgramData\Datadog\conf.d\openmetrics.d\conf.yaml"
See Datadog — OpenMetrics Integration for configuration options.
Collect Logs
Edit C:\ProgramData\Datadog\datadog.yaml to enable log collection and point the log endpoint at Kloudfuse:
logs_enabled: true
logs_config:
logs_dd_url: <kloudfuse-hostname>:443
logs_no_ssl: false
force_use_http: true
use_compression: true
use_v2_api: false
| Starting with Datadog Agent v6.19+/v7.19+, the agent uses HTTPS transport for logs by default. See Agent Transport for Logs. |
Collect Custom Log Files
To tail custom log files, see Datadog — Custom Log Collection.
Set start_position: beginning in the custom conf.yaml to ensure you receive all historical data, not just new log lines.
Dual Ship to Kloudfuse and Datadog
To send logs to both Datadog and Kloudfuse simultaneously:
logs_enabled: true
logs_config:
logs_dd_url: <datadog-hostname>:443
logs_no_ssl: false
force_use_http: true
use_compression: true
use_v2_api: false
additional_endpoints:
- api_key: <api_key>
Host: "<kloudfuse-hostname>"
Port: 443
use_compression: true
use_http: true
use_v2_api: false
After making configuration changes, restart the Datadog Agent service:
Restart-Service -Name datadogagent
Collect Events
Edit C:\ProgramData\Datadog\datadog.yaml to enable event collection:
collect_events: true
Restart the agent after making changes:
Restart-Service -Name datadogagent
Collect Traces
-
Enable APM in
C:\ProgramData\Datadog\datadog.yaml:apm_config: enabled: trueyaml -
Restart the agent:
Restart-Service -Name datadogagentpowershell -
Instrument your application with the Datadog APM library for your language (
dd-tracefor Python,ddtracefor Java, etc.) and set the following environment variables:$env:DD_AGENT_HOST="localhost" $env:DD_TRACE_ENABLED="true" $env:DD_ENV="production" $env:DD_SERVICE="my-service" $env:DD_VERSION="1.0.0"powershell