{"action":"opened","issue":{"url":"https://api.github.com/repos/pm2-hive/pm2-docker/issues/1","labels_url":"https://api.github.com/repos/pm2-hive/pm2-docker/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/pm2-hive/pm2-docker/issues/1/comments","events_url":"https://api.github.com/repos/pm2-hive/pm2-docker/issues/1/events","html_url":"https://github.com/pm2-hive/pm2-docker/issues/1","id":99167167,"number":1,"title":"Retrieve CPU and Memory stats of Docker containers","user":{"login":"Unitech","id":757747,"avatar_url":"https://avatars.githubusercontent.com/u/757747?v=3","gravatar_id":"","url":"https://api.github.com/users/Unitech","html_url":"https://github.com/Unitech","followers_url":"https://api.github.com/users/Unitech/followers","following_url":"https://api.github.com/users/Unitech/following{/other_user}","gists_url":"https://api.github.com/users/Unitech/gists{/gist_id}","starred_url":"https://api.github.com/users/Unitech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unitech/subscriptions","organizations_url":"https://api.github.com/users/Unitech/orgs","repos_url":"https://api.github.com/users/Unitech/repos","events_url":"https://api.github.com/users/Unitech/events{/privacy}","received_events_url":"https://api.github.com/users/Unitech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jshkurti","id":7647602,"avatar_url":"https://avatars.githubusercontent.com/u/7647602?v=3","gravatar_id":"","url":"https://api.github.com/users/jshkurti","html_url":"https://github.com/jshkurti","followers_url":"https://api.github.com/users/jshkurti/followers","following_url":"https://api.github.com/users/jshkurti/following{/other_user}","gists_url":"https://api.github.com/users/jshkurti/gists{/gist_id}","starred_url":"https://api.github.com/users/jshkurti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshkurti/subscriptions","organizations_url":"https://api.github.com/users/jshkurti/orgs","repos_url":"https://api.github.com/users/jshkurti/repos","events_url":"https://api.github.com/users/jshkurti/events{/privacy}","received_events_url":"https://api.github.com/users/jshkurti/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-08-05T09:48:21Z","updated_at":"2015-08-05T09:48:21Z","closed_at":null,"body":"You should install the latest version of Docker (for the stats command).\r\nTo interact with Docker we use the npm module dockerode\r\n\r\nDocker retrieve stats about a container with `docker stats <container-name|id>`. \r\n\r\nI managed to retrieve all [containers running](https://github.com/pm2-hive/pm2-docker/blob/master/index.js#L73) but I have problems concerning the [.stats command](https://github.com/pm2-hive/pm2-docker/blob/master/index.js#L76), the stream returned by .stats does not emit any end event.\r\n\r\nI need to be able to call a fonction with a container.id as option and retrieve the CPU usage, memory stats and other data (network rx/tx..)"}}