Prereq
- Install Datadog Infra Agent
Step 1 – Enable Datadog Process Monitoring
Step 2 – Install Docker Server
Step 3 – Enable Docker integration with Datadog


# These commands to configure Agent for Docker Intergration.
# Add the user running the Agent to Docker's group.
$ usermod -a -G docker dd-agent
$ cd /etc/datadog-agent/conf.d/docker.d/
$ cp conf.yaml.default conf.yaml
$ vi conf.yaml [ FOLLOW IMAGE BELOW ]
$ systemctl restart datadog-agent
$ systemctl status datadog-agent
ad_identifiers:
- _docker
init_config:
instances:
- url: "unix://var/run/docker.sock"
new_tag_names: true

How to Check if docker is enabled or not?

$ datadog-agent configcheck
$ datadog-agent check docker
$ datadog-agent status
datadog-agent status | grep docker -B 5 -A 5
Average Execution Time : 30ms
Last Execution Date : 2023-09-06 09:02:07 UTC (1693990927000)
Last Successful Execution Date : 2023-09-06 09:02:07 UTC (1693990927000)
docker
------
Instance ID: docker [OK]
Configuration Source: file:/etc/datadog-agent/conf.d/docker.d/conf.yaml.default
Total Runs: 15
Metric Samples: Last Run: 11, Total: 116
Events: Last Run: 1, Total: 1
Service Checks: Last Run: 1, Total: 15
Average Execution Time : 4ms
--
=========
Collector
=========
Last collection time: 2023-09-06 09:02:08
Docker socket: /var/run/docker.sock
Number of processes: 0
Number of containers: 0
Process Queue length: 0
RTProcess Queue length: 0
Connections Queue length: 0
Step 4 – Create few containers and Verify
$ docker run -itd ubuntu
$ docker run -itd ubuntu
$ docker run -itd ubuntu
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0bc26ab4b940 ubuntu "/bin/bash" 3 seconds ago Up 2 seconds compassionate_brahmagupta
2fb7163a3a17 ubuntu "/bin/bash" 8 seconds ago Up 6 seconds romantic_hertz
bd76230bbb70 ubuntu "/bin/bash" 10 seconds ago Up 8 seconds compassionate_curran
How to verify the containers at Datadog?




Docker Tutorials Fundamental To Advanced-2021 Crash Course:- https://bit.ly/3hOIbTB













I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND