Quick Guide for Datadog Agent on Docker for Events
-
Use the official Datadog Agent image with Docker’s environment variables to ensure that you collect all events from the containers.
docker run -d --name datadog-agent -e DD_API_KEY=kloudfuse -e DD_SITE=https://<kf-domain-name>/ingester -e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true -e DD_LOGS_ENABLED=true -e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true -e DD_APM_ENABLED=true -e DD_DD_URL=https://<kf-domain-name>/ingester --volume /var/run/docker.sock:/var/run/docker.sock:ro --volume /proc:/host/proc:ro --volume /sys:/host/sys:ro --volume /host:/host:ro --name datadog-agent datadog/agent:latest -
Enable collection of all Dockert container lifecycle events.
docker run -d --name datadog-agent -e DD_API_KEY=kloudfuse -e DD_SITE=https://<kf-domain-name>/ingester -e DD_EVENT_COLLECTION=true --volume /var/run/docker.sock:/var/run/docker.sock:ro --name datadog-agent datadog/agent:latest