datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Cannot discovery docker containers

Open greatbody opened this issue 5 years ago • 4 comments

Describe what happened: I have a host running Ubuntu, and have docker installed.

I started an docker agent to track server status.

I was expecting to see all containers running on this machine, however, I cannot see any container in Container tab.

Describe what you expected: I was expecting to see all containers running on this machine, however, I cannot see any container in Container tab.

Steps to reproduce the issue:

Set up docker agent of datadog

docker-compose file of datadog docker agent

services:
  dd-agent:
    container_name: dd-agent-app
    environment:
      DD_API_KEY: <key>
      DD_SITE: "datadoghq.com"
      DD_HOSTNAME: "pi"
      DD_TAGS: "host:pi"
      DD_PROCESS_AGENT_ENABLED: "true"
      DD_DOCKER_LABELS_AS_TAGS: "{\"<LABEL_NAME>\": \"<TAG_KEY>\"}"
      SD_BACKEND: "docker"
      DD_LOGS_ENABLED: "true"
      DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL: "true"
    image: gcr.io/datadoghq/agent:latest
    restart: always
    volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - /var/lib/docker/containers:/var/lib/docker/containers:ro
    - /proc/:/host/proc/:ro
    - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
version: '3'

Additional environment details (Operating System, Cloud provider, etc):

os : GNU/Linux kernel_name : Linux processor : aarch64 kernel_release : 5.11.0-1015-raspi kernel_version : #16-Ubuntu SMP PREEMPT Wed Jul 14 11:04:58 UTC 2021 machine : aarch64 hardware_platform : aarch64

Docker version 20.10.8, build 3967b7d

greatbody avatar Aug 15 '21 14:08 greatbody

Hey @greatbody

Thanks for opening an issue on the datadog repository. With the configuration you shared, I don't see why it shouldn't work.

Would you be able to open a ticket with our support team by emailing [email protected]? This way our Support team will be able to ask you more details about the issue and investigate it further.

Thanks!

Simon

Simwar avatar Aug 16 '21 15:08 Simwar

I believe this one targeted https://github.com/DataDog/docker-dd-agent, where the env vars are related, but the image itself is another. The issue is stale, and I guess the person found the fix by themselves or through private channels.

Adding here in case someone gets on the same page and misses that detail.

voiski avatar Apr 20 '23 16:04 voiski

This issue has been automatically marked as stale because it has not had activity in the past 15 days.

It will be closed in 30 days if no further activity occurs. If this issue is still relevant, adding a comment will keep it open. Also, you can always reopen the issue if you missed the window.

Thank you for your contributions!

dd-octo-sts avatar Oct 20 '25 22:10 dd-octo-sts

Hello, I'm closing this stale issue with no activity. Feel free to reopen it if you have any question. Thanks!

jacjtito avatar Feb 03 '26 19:02 jacjtito