Skip to content

Instantly share code, notes, and snippets.

@bakins
Created December 9, 2015 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakins/00cc12f26e2947af6679 to your computer and use it in GitHub Desktop.
Save bakins/00cc12f26e2947af6679 to your computer and use it in GitHub Desktop.
datadog 5.6.2 patch
diff --git a/utils/dockerutil.py b/utils/dockerutil.py
index 975b260..d8e0868 100644
--- a/utils/dockerutil.py
+++ b/utils/dockerutil.py
@@ -82,6 +82,7 @@ def find_cgroup_filename_pattern(mountpoints, container_id):
stat_file_path_coreos = os.path.join(mountpoint, "system.slice")
stat_file_path_kubernetes = os.path.join(mountpoint, container_id)
stat_file_path_kubernetes_docker = os.path.join(mountpoint, "system", "docker", container_id)
+ stat_file_path_docker_daemon = os.path.join(mountpoint, "docker-daemon", "docker", container_id)
if os.path.exists(stat_file_path_lxc):
return os.path.join('%(mountpoint)s/lxc/%(id)s/%(file)s')
@@ -93,5 +94,7 @@ def find_cgroup_filename_pattern(mountpoints, container_id):
return os.path.join('%(mountpoint)s/%(id)s/%(file)s')
elif os.path.exists(stat_file_path_kubernetes_docker):
return os.path.join('%(mountpoint)s/system/docker/%(id)s/%(file)s')
+ elif os.path.exists(stat_file_path_docker_daemon):
+ return os.path.join('%(mountpoint)s/docker-daemon/docker/%(id)s/%(file)s')
raise MountException("Cannot find Docker cgroup directory. Be sure your system is supported.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment