Better management of cgroup path and docker connection and end of monitoring