Datadog Agent for Docker :: Kloudfuse Docs
Datadog Agent for Docker
Basic Datadog Deployment on Docker Environments
Use the following steps to integrate the Datadog agent with Docker container services.
Add the following
datadog serviceentry in the existingdocker-compose.yaml:datadog: build: datadog container_name: datadog-agent #replace with anything specific to environment. links: - <<service>> # Add appropriate service links environment: - DD_API_KEY=temp_api_key - DD_CONTAINER_EXCLUDE=name:datadog-agent # OPTIONAL To exclude datadog agent logs to be sent to Kloudfuse volumes: - /var/run/docker.sock:/var/run/docker.sock - /proc/:/host/proc/:ro - /sys/fs/cgroup:/host/sys/fs/cgroup:ro - /var/lib/docker/containers:/var/lib/docker/containers:roCreate a directory
datadogto build the Datadog agent image.Create a
datadog.yamlfile in thedatadogdirectory to configure the agent to send data to the Kloudfuse ingester.api_key: temp_api_key site: datadoghq.com dd_url: "http://<URL>/ingester" # Use http or https depending on whether HTTPS/TLS is configured on Kloudfuse skip_ssl_validation: true # Skip this if you do not want to skip the SSL/TLS validation logs_enabled: true logs_config: logs_dd_url: "URL:80" # Use port 443 if HTTPS/TLS is enabled use_http: true logs_no_ssl: true # Set to false if HTTPS/TLS is enabled auto_multi_line_detection: false use_v2_api: false container_collect_all: true apm_config: enabled: true apm_dd_url: "URL:80/ingester" # User port 443 if HTTPS/TLS is enabled process_config: process_dd_url: "http://URL/ingester" # Use http or https depending on whether HTTPS/TLS is configured on Kloudfuse events_dd_url: "http://URL/ingester" # Use http or https depending on whether HTTPS/TLS is configured on Kloudfuse container_collection: enabled: false metadata_providers: - name: host interval: 300 use_v2_api: series: trueCreate a
Dockerfilein thedatadogdirectory.FROM gcr.io/datadoghq/agent:7 ADD datadog.yaml /etc/datadog-agent/datadog.yamlAdd the necessary yaml files to the
conf.ddirectory.Build the Datadog agent image.
docker-compose buildUpdate your current deployment to use the Datadog agent container to send Metrics, Logs, and Events data to Kloudfuse.
docker compose up -d
Adding Custom Tags
Add custom tags to the agent for all metrics, logs, and events collected by the agent. Follow these steps.
Update the
environmentsection of datadog in docker-compose.yml file to include the following code.datadog: ... environment: ... - DD_TAG=custom_tag_name:custom_tag_valueThe Kloudfuse helm
custom-values.yamlfile must list the custom tags.ingester: config: hostTagIncludes: ... - custom_tag_name (1) ...
| 1 | custom_tag_name: Add all custom tag names; otherwise, the system may overwrite existing configurations. |
Alternatively, if you don’t plan to maintain a long list of possible custom tags, set
allowAllHostTagstotrue. This effectively adds all extracted custom tags to the allow list.ingester: config: allowAllHostTags: true (1)
| 1 | allowAllHostTags: Adds all custom tag names to the allow list; otherwise, the system may overwrite existing configurations. |