Datadog Agent Installation using Docker-Compose
Following are thee steps for integrating container/services running using docker-compose with Kloudfuse.
Add the following
datadog serviceentry in the existingdocker-compose.yamldatadog: 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 Klodfuse 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 thedatadog agentimageCreate a
datadog.yamlfile in thedatadogdirectory to configure the agent to send data to 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're 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 appropriate yamls in conf.d directory specific to your integrations.
Build the
datadogagent image using the following command
docker-compose buildUpdate your current deployment to use
datadogagent container to send Metrics, Logs and Events data to Kloudfuse.
docker compose up -d
Adding custom tags
Custom tags can be added to the agent such that all metrics, logs, and events collected by the agent will have the tag added. To add custom tags, please follow these steps.
Update the `environment` section of datadog in
docker-compose.ymlfile to include following for the custom tags:
datadog:
...
environment:
...
- DD_TAG=custom_tag_name:custom_tag_valueKloudfuse
custom-values.yamlfile needs to be updated to whitelist the new custom tag (note that the following entry needs to be “appended” to the existing list, without which some default values will get overwritten which is not the desired behavior. Please contact the Kloudfuse team for assistance):
ingester:
config:
hostTagIncludes:
- kfuse
- kube_cluster_name
- kubernetes.io/hostname
- node.kubernetes.io/instance-type
- org_id
- project
- topology.kubernetes.io/region
- topology.kubernetes.io/zone
...
- custom_tag_name