Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Container disk usage in DataDog

Is there any way to monitor disk usage of docker containers in DataDog?

I can see in DataDog web all the CPU, RAM and IO metrics for my containers.

But I can't see any of disk space related metrics.

Their page https://docs.datadoghq.com/integrations/docker/ says about:

docker.disk.used (now reported as docker.data.used)
docker.disk.free (now reported as docker.data.free)
docker.disk.total (now reported as docker.data.total)

I can't find these neither in Dashboards > Docker nor in Metrics > Explorer

I'm new to DataDog, so possibly missing something obvious here.

like image 256
Ivan Avatar asked Oct 17 '22 09:10

Ivan


1 Answers

There are 2 relevant options in /etc/dd-agent/conf.d/docker_daemon.yaml:

  • collect_disk_stats
    If you use devicemapper-backed storage (which is default in ECS but not in vanilla Docker or Kubernetes), docker.data.* and docker.metadata.* statistics should do what you are looking for.

  • collect_container_size
    A generic way, using the docker API but virtually running df in every container. This enables the docker.container.* metrics.

See more here: https://help.datadoghq.com/hc/en-us/articles/115001786703-How-to-report-host-disk-metrics-when-dd-agent-runs-in-a-docker-container-

and here: https://github.com/DataDog/docker-dd-agent/blob/master/conf.d/docker_daemon.yaml#L46

like image 127
Ivan Avatar answered Oct 21 '22 06:10

Ivan