Datadog Agent Installation using Docker-Compose

Following are thee steps for integrating container/services running using docker-compose with Kloudfuse.

  1. Add the following datadog service entry in the existing docker-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 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:ro
  2. Create a directory datadog to build the datadog agent image

  3. Create a datadog.yaml file in the datadog directory 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: true
  1. Create a Dockerfile in the datadog directory

FROM gcr.io/datadoghq/agent:7 ADD datadog.yaml /etc/datadog-agent/datadog.yaml

Add appropriate yamls in conf.d directory specific to your integrations.

  1. Build the datadog agent image using the following command

  1. Update your current deployment to use datadog agent container to send Metrics, Logs and Events data to Kloudfuse.

 

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.

  1. Update the `environment` section of datadog in docker-compose.yml file to include following for the custom tags:

  1. Kloudfuse custom-values.yaml file 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):