Skip to content

Commit

Permalink
[docker] Kubernetes support (new cgroups path)
Browse files Browse the repository at this point in the history
On Kubernetes, container files are directly at the top level of cgroups,
instead of being in a directory (`docker` or `lxc`).
  • Loading branch information
degemer committed Jul 9, 2015
1 parent b53b370 commit af76c8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions checks.d/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ def _find_cgroup_filename_pattern(self):
return os.path.join('%(mountpoint)s/docker/%(id)s/%(file)s')
elif os.path.exists(stat_file_path_coreos):
return os.path.join('%(mountpoint)s/system.slice/docker-%(id)s.scope/%(file)s')
# Kubernetes, we can't test the existence of the path without the id
else:
return os.path.join('%(mountpoint)s/%(id)s/%(file)s')

raise Exception("Cannot find Docker cgroup directory. Be sure your system is supported.")

Expand Down

0 comments on commit af76c8f

Please sign in to comment.