{"action":"opened","issue":{"url":"https://api.github.com/repos/DataDog/dd-agent/issues/2841","repository_url":"https://api.github.com/repos/DataDog/dd-agent","labels_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2841/labels{/name}","comments_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2841/comments","events_url":"https://api.github.com/repos/DataDog/dd-agent/issues/2841/events","html_url":"https://github.com/DataDog/dd-agent/issues/2841","id":176722885,"number":2841,"title":"[docker] check considers docker daemon as a container on old docker versions","user":{"login":"hkaj","id":5287287,"avatar_url":"https://avatars.githubusercontent.com/u/5287287?v=3","gravatar_id":"","url":"https://api.github.com/users/hkaj","html_url":"https://github.com/hkaj","followers_url":"https://api.github.com/users/hkaj/followers","following_url":"https://api.github.com/users/hkaj/following{/other_user}","gists_url":"https://api.github.com/users/hkaj/gists{/gist_id}","starred_url":"https://api.github.com/users/hkaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkaj/subscriptions","organizations_url":"https://api.github.com/users/hkaj/orgs","repos_url":"https://api.github.com/users/hkaj/repos","events_url":"https://api.github.com/users/hkaj/events{/privacy}","received_events_url":"https://api.github.com/users/hkaj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DataDog/dd-agent/labels/bugfix","name":"bugfix","color":"eb6420"},{"url":"https://api.github.com/repos/DataDog/dd-agent/labels/checks","name":"checks","color":"444444"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-13T19:01:39Z","updated_at":"2016-09-13T19:01:39Z","closed_at":null,"body":"_this only affects older docker versions_\r\n\r\nIn older docker versions `/proc/$DOCKER_DAEMON_PID/cgroup` looks like\r\n```\r\n10:net_prio:/docker-daemon\r\n9:perf_event:/docker-daemon\r\n8:blkio:/docker-daemon\r\n7:net_cls:/docker-daemon\r\n6:freezer:/docker-daemon\r\n5:devices:/docker-daemon\r\n4:memory:/docker-daemon\r\n3:cpuacct:/docker-daemon\r\n2:cpu:/docker-daemon\r\n1:cpuset:/docker-daemon```\r\n\r\nIn the code we consider the process as a container if `'docker' in line[2]` here: https://github.com/DataDog/dd-agent/blob/5.8.5/checks.d/docker_daemon.py#L807\r\n\r\nRecent versions are not affected since the lines look like `i:whatever:/`, without the matching `docker` string.\r\n\r\nThis was discovered on a docker daemon version 1.9.1 so it should affect few people but should still be fixed."}}
{"actor":{"display_login":"hkaj"}}