)]}'
{"conf.d/docker.yaml.example":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"instances:"},{"line_number":16,"context_line":"    # URL of the Docker daemon socket to reach the Docker API. HTTP also works."},{"line_number":17,"context_line":"  - url: \"unix://var/run/docker.sock\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # Set to true if you want the kubernetes namepsace and pod name to be set as dimensions"},{"line_number":20,"context_line":"    kubernetes_tags: True"}],"source_content_type":"application/octet-stream","patch_set":22,"id":"ba5da102_ac02db70","line":17,"updated":"2016-11-04 12:59:31.000000000","message":"If http is used for the Docker API, would there need to be other connection info supplied, such as username, or is the connection unauthenticated?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"dd087c21034013ed13aa7a9d8235624c8f25effa","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"instances:"},{"line_number":16,"context_line":"    # URL of the Docker daemon socket to reach the Docker API. HTTP also works."},{"line_number":17,"context_line":"  - url: \"unix://var/run/docker.sock\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # Set to true if you want the kubernetes namepsace and pod name to be set as dimensions"},{"line_number":20,"context_line":"    kubernetes_tags: True"}],"source_content_type":"application/octet-stream","patch_set":22,"id":"ba5da102_ca4d1ac6","line":17,"in_reply_to":"ba5da102_2ddcfb45","updated":"2016-11-04 18:19:21.000000000","message":"Yes, I\u0027m OK. Just thought I would ask.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"instances:"},{"line_number":16,"context_line":"    # URL of the Docker daemon socket to reach the Docker API. HTTP also works."},{"line_number":17,"context_line":"  - url: \"unix://var/run/docker.sock\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # Set to true if you want the kubernetes namepsace and pod name to be set as dimensions"},{"line_number":20,"context_line":"    kubernetes_tags: True"}],"source_content_type":"application/octet-stream","patch_set":22,"id":"ba5da102_2ddcfb45","line":17,"in_reply_to":"ba5da102_ac02db70","updated":"2016-11-04 14:34:32.000000000","message":"have not looked into authentication yet to be honest was worried about basic connection for now and was going to address this as we move forward. I know in datadog they address tls as an option when connecting to docker. \n\nOkay with addressing this in another patch set?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  - url: \"unix://var/run/docker.sock\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # Set to true if you want the kubernetes namepsace and pod name to be set as dimensions"},{"line_number":20,"context_line":"    kubernetes_tags: True"}],"source_content_type":"application/octet-stream","patch_set":22,"id":"ba5da102_cce0efcf","line":20,"updated":"2016-11-04 12:59:31.000000000","message":"kubernetes_dimensions would be a better name. Tags is a DataDog concept.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  - url: \"unix://var/run/docker.sock\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # Set to true if you want the kubernetes namepsace and pod name to be set as dimensions"},{"line_number":20,"context_line":"    kubernetes_tags: True"}],"source_content_type":"application/octet-stream","patch_set":22,"id":"ba5da102_ad8f2b74","line":20,"in_reply_to":"ba5da102_cce0efcf","updated":"2016-11-04 14:34:32.000000000","message":"true dat","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  - url: \"unix://var/run/docker.sock\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    # Set to true if you want the kubernetes namepsace and pod name to be set as dimensions"},{"line_number":20,"context_line":"    kubernetes_dimensions: True"}],"source_content_type":"application/octet-stream","patch_set":23,"id":"9a629dbe_52deed3f","line":20,"range":{"start_line":20,"start_character":4,"end_line":20,"end_character":25},"updated":"2016-11-08 17:18:04.000000000","message":"Should this be add_kubernetes_dimensions?","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"}],"docs/Plugins.md":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":631,"context_line":"| directory.files_count  | path, hostname, service |"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"## Docker"},{"line_number":634,"context_line":"This section describes the docker check that can be performed by the Agent. The Docker check is used for gathering the metrics on docker containers. "},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"A YAML file (docker.yaml) contains the url of the docker api to connect to and the root of docker that is used for looking for docker proc metrics."},{"line_number":637,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":15,"id":"fa6399be_bc3710af","line":634,"range":{"start_line":634,"start_character":148,"end_line":634,"end_character":149},"updated":"2016-10-12 17:27:45.000000000","message":"extra space","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":635,"context_line":""},{"line_number":636,"context_line":"A YAML file (docker.yaml) contains the url of the docker api to connect to and the root of docker that is used for looking for docker proc metrics."},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"For this check the user that is running the monasca agent (usually the mon-agent user) must be apart of the docker group"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"Also if you want to want to attach kubernetes dimensions to each metric you can set set_kubernetes_tags to true in the yaml file. This will set the pod_name and namespace. "},{"line_number":641,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":15,"id":"fa6399be_5cc0b47c","line":638,"range":{"start_line":638,"start_character":95,"end_line":638,"end_character":100},"updated":"2016-10-12 17:27:45.000000000","message":"a part","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":637,"context_line":""},{"line_number":638,"context_line":"For this check the user that is running the monasca agent (usually the mon-agent user) must be apart of the docker group"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"Also if you want to want to attach kubernetes dimensions to each metric you can set set_kubernetes_tags to true in the yaml file. This will set the pod_name and namespace. "},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"Sample config:"},{"line_number":643,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":15,"id":"fa6399be_5c47d41c","line":640,"range":{"start_line":640,"start_character":171,"end_line":640,"end_character":172},"updated":"2016-10-12 17:27:45.000000000","message":"extra space","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":661,"context_line":"    set_kubernetes_tags: True"},{"line_number":662,"context_line":"```"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":" "},{"line_number":665,"context_line":"The docker check return the following metrics:"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"| Metric Name | Metric Type | Dimensions | Optional_dimensions (set if kubernetes tags is true) | Semantics |"}],"source_content_type":"text/x-markdown","patch_set":15,"id":"fa6399be_7c5658d3","line":664,"range":{"start_line":664,"start_character":0,"end_line":664,"end_character":1},"updated":"2016-10-12 17:27:45.000000000","message":"extra space","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":662,"context_line":"```"},{"line_number":663,"context_line":""},{"line_number":664,"context_line":" "},{"line_number":665,"context_line":"The docker check return the following metrics:"},{"line_number":666,"context_line":""},{"line_number":667,"context_line":"| Metric Name | Metric Type | Dimensions | Optional_dimensions (set if kubernetes tags is true) | Semantics |"},{"line_number":668,"context_line":"| ----------- | ---------- | --------- |"}],"source_content_type":"text/x-markdown","patch_set":15,"id":"fa6399be_dc6124aa","line":665,"range":{"start_line":665,"start_character":17,"end_line":665,"end_character":23},"updated":"2016-10-12 17:27:45.000000000","message":"returns","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":674,"context_line":"| docker.cpu.utilization_perc | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The percentage of CPU used by the container |"},{"line_number":675,"context_line":"| docker.io.read_bytes  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount bytes read from the processes in the container |"},{"line_number":676,"context_line":"| docker.io.read_bytes_sec  | Rate | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes read from the processes in the container |"},{"line_number":677,"context_line":"| docker.io.write_bytes  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount bytes wrote from the processes in the container |"},{"line_number":678,"context_line":"| docker.io.write_bytes_sec  | Rate | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes written from the processes in the container |"},{"line_number":679,"context_line":"| docker.mem.cache | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace |The amount of cached memory that belongs to the container\u0027s processes |"},{"line_number":680,"context_line":"| docker.mem.rss  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The amount of non-cached memory used by the container\u0027s processes |"}],"source_content_type":"text/x-markdown","patch_set":15,"id":"fa6399be_bcbab0df","line":677,"range":{"start_line":677,"start_character":140,"end_line":677,"end_character":145},"updated":"2016-10-12 17:27:45.000000000","message":"written","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":680,"context_line":"| docker.mem.rss  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The amount of non-cached memory used by the container\u0027s processes |"},{"line_number":681,"context_line":"| docker.mem.swap  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The amount of swap memory used by the processes in the container |"},{"line_number":682,"context_line":"| docker.mem.used_perc | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The percentage of memory used out of the given limit of the container |"},{"line_number":683,"context_line":"| docker.net.bytes_rcvd  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes received by the container per an interface |"},{"line_number":684,"context_line":"| docker.net.bytes_rcvd_sec  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes received by the container per an interface |"},{"line_number":685,"context_line":"| docker.net.bytes_sent  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes sent by the container per an interface |"},{"line_number":686,"context_line":"| docker.net.bytes_sent_sec  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes sent by the container per an interface |"}],"source_content_type":"text/x-markdown","patch_set":15,"id":"fa6399be_1c863c13","line":683,"range":{"start_line":683,"start_character":180,"end_line":683,"end_character":196},"updated":"2016-10-12 17:27:45.000000000","message":"either \u0027per interface\u0027 or \u0027for the interface\u0027 would make more sense, I think","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"5e8950c88df4a66ea2eae568bec99cc23792f91c","unresolved":false,"context_lines":[{"line_number":666,"context_line":""},{"line_number":667,"context_line":"| Metric Name | Metric Type | Dimensions | Optional_dimensions (set if kubernetes tags is true) | Semantics |"},{"line_number":668,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":669,"context_line":"| docker.containers.running | Gauge | hostname, service\u003ddocker | | Number of containers running on the host |"},{"line_number":670,"context_line":"| docker.cpu.system  | Gauge| hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total time the CPU is executing system calls on behalf of the processes in the container |"},{"line_number":671,"context_line":"| docker.cpu.system_sec  | Rate | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate the CPU is executing system calls on behalf of the processes in the container |"},{"line_number":672,"context_line":"| docker.cpu.user  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total time the CPU is under direct control of the processes in this container |"}],"source_content_type":"text/x-markdown","patch_set":17,"id":"fa6399be_a802b9b2","line":669,"range":{"start_line":669,"start_character":9,"end_line":669,"end_character":19},"updated":"2016-10-18 00:53:07.000000000","message":"should probably add an \"_count\" suffix, similar to some of the other metrics that are counts of objects.","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"5e8950c88df4a66ea2eae568bec99cc23792f91c","unresolved":false,"context_lines":[{"line_number":667,"context_line":"| Metric Name | Metric Type | Dimensions | Optional_dimensions (set if kubernetes tags is true) | Semantics |"},{"line_number":668,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":669,"context_line":"| docker.containers.running | Gauge | hostname, service\u003ddocker | | Number of containers running on the host |"},{"line_number":670,"context_line":"| docker.cpu.system  | Gauge| hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total time the CPU is executing system calls on behalf of the processes in the container |"},{"line_number":671,"context_line":"| docker.cpu.system_sec  | Rate | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate the CPU is executing system calls on behalf of the processes in the container |"},{"line_number":672,"context_line":"| docker.cpu.user  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total time the CPU is under direct control of the processes in this container |"},{"line_number":673,"context_line":"| docker.cpu.user_sec  | Rate | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate the CPU is under direct control of the processes in this container |"}],"source_content_type":"text/x-markdown","patch_set":17,"id":"fa6399be_88e33505","line":670,"range":{"start_line":670,"start_character":8,"end_line":670,"end_character":9},"updated":"2016-10-18 00:53:07.000000000","message":"system what? system perc, system time. Should there be an added qualifier on this name?","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"5e8950c88df4a66ea2eae568bec99cc23792f91c","unresolved":false,"context_lines":[{"line_number":680,"context_line":"| docker.mem.rss  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The amount of non-cached memory used by the container\u0027s processes |"},{"line_number":681,"context_line":"| docker.mem.swap  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The amount of swap memory used by the processes in the container |"},{"line_number":682,"context_line":"| docker.mem.used_perc | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The percentage of memory used out of the given limit of the container |"},{"line_number":683,"context_line":"| docker.net.bytes_rcvd  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes received by the container per interface |"},{"line_number":684,"context_line":"| docker.net.bytes_rcvd_sec  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes received by the container per interface |"},{"line_number":685,"context_line":"| docker.net.bytes_sent  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes sent by the container per interface |"},{"line_number":686,"context_line":"| docker.net.bytes_sent_sec  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes sent by the container per interface |"}],"source_content_type":"text/x-markdown","patch_set":17,"id":"fa6399be_4be117fe","line":683,"updated":"2016-10-18 00:53:07.000000000","message":"I think we should take a look at all the other names that we\u0027ve used. In the case of networking, we have names like net.in_bytes, which doesn\u0027t match what we currently have.","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8dc5fdf65f21de7b37d84bbedd5e91debb74fd15","unresolved":false,"context_lines":[{"line_number":631,"context_line":"| directory.files_count  | path, hostname, service |"},{"line_number":632,"context_line":""},{"line_number":633,"context_line":"## Docker"},{"line_number":634,"context_line":"This section describes the docker check that can be performed by the Agent. The Docker check is used for gathering the metrics on docker containers."},{"line_number":635,"context_line":""},{"line_number":636,"context_line":"A YAML file (docker.yaml) contains the url of the docker api to connect to and the root of docker that is used for looking for docker proc metrics."},{"line_number":637,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":19,"id":"fa6399be_a170aedd","line":634,"range":{"start_line":634,"start_character":5,"end_line":634,"end_character":118},"updated":"2016-10-19 21:42:04.000000000","message":"Replace all this with: \"plugin gathers\"","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8dc5fdf65f21de7b37d84bbedd5e91debb74fd15","unresolved":false,"context_lines":[{"line_number":667,"context_line":"| Metric Name | Metric Type | Dimensions | Optional_dimensions (set if kubernetes tags is true) | Semantics |"},{"line_number":668,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":669,"context_line":"| docker.containers.running_count | Gauge | hostname, service\u003ddocker | | Number of containers running on the host |"},{"line_number":670,"context_line":"| docker.cpu.system_time  | Gauge| hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total time the CPU is executing system calls on behalf of the processes in the container |"},{"line_number":671,"context_line":"| docker.cpu.system_time_sec  | Rate | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate the CPU is executing system calls on behalf of the processes in the container |"},{"line_number":672,"context_line":"| docker.cpu.user_time  | Gauge | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total time the CPU is under direct control of the processes in this container |"},{"line_number":673,"context_line":"| docker.cpu.user_time_sec  | Rate | hostname, id, image, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate the CPU is under direct control of the processes in this container |"}],"source_content_type":"text/x-markdown","patch_set":19,"id":"fa6399be_c125a2c2","line":670,"range":{"start_line":670,"start_character":140,"end_line":670,"end_character":152},"updated":"2016-10-19 21:42:04.000000000","message":"Should this be \"has executed\"?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"24107898685659f016a1fe1c983d910bfbb23abf","unresolved":false,"context_lines":[{"line_number":683,"context_line":"| docker.net.in_bytes  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes received by the container per interface |"},{"line_number":684,"context_line":"| docker.net.in_bytes_sec  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes received by the container per interface |"},{"line_number":685,"context_line":"| docker.net.out_bytes  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes sent by the container per interface |"},{"line_number":686,"context_line":"| docker.net.out_bytes_sent  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes sent by the container per interface |"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"## Elasticsearch Checks"}],"source_content_type":"text/x-markdown","patch_set":19,"id":"fa6399be_f50ee830","line":686,"updated":"2016-10-19 19:08:47.000000000","message":"Should this be .out_bytes_sec?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"9e5c82c014b84f9161581efa5757d0c621738dd4","unresolved":false,"context_lines":[{"line_number":683,"context_line":"| docker.net.in_bytes  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes received by the container per interface |"},{"line_number":684,"context_line":"| docker.net.in_bytes_sec  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes received by the container per interface |"},{"line_number":685,"context_line":"| docker.net.out_bytes  | Gauge | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes sent by the container per interface |"},{"line_number":686,"context_line":"| docker.net.out_bytes_sent  | Rate | hostname, id, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes sent by the container per interface |"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"## Elasticsearch Checks"}],"source_content_type":"text/x-markdown","patch_set":19,"id":"fa6399be_e6639cdb","line":686,"in_reply_to":"fa6399be_f50ee830","updated":"2016-10-19 20:29:15.000000000","message":"yes","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":696,"context_line":"| container.net.in_bytes  | Gauge | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes received by the container per interface |"},{"line_number":697,"context_line":"| container.net.in_bytes_sec  | Rate | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes received by the container per interface |"},{"line_number":698,"context_line":"| container.net.out_bytes  | Gauge | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes sent by the container per interface |"},{"line_number":699,"context_line":"| container.net.out_bytes_sec  | Rate | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes sent by the container per interface |"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"## Elasticsearch Checks"}],"source_content_type":"text/x-markdown","patch_set":22,"id":"ba5da102_6c57e326","line":699,"updated":"2016-11-04 12:59:31.000000000","message":"Would it be better to have a prefix of \"docker\" rather than \"container\". Container is more general, but the plugin is for Docker. Do you think we would have another plugin for another container technology that would also use the \"container\" prefix?\n\nI\u0027m not sure about setting service\u003ddocker. In the container world I think the service name should be set to what is running in it, such as mysql or rabbitmq. Would it be better to remove service\u003ddocker?\n\nIn Kubernetes the service name can be determined, but there probably isn\u0027t anything in Docker to help in that area.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":696,"context_line":"| container.net.in_bytes  | Gauge | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes received by the container per interface |"},{"line_number":697,"context_line":"| container.net.in_bytes_sec  | Rate | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes received by the container per interface |"},{"line_number":698,"context_line":"| container.net.out_bytes  | Gauge | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes sent by the container per interface |"},{"line_number":699,"context_line":"| container.net.out_bytes_sec  | Rate | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes sent by the container per interface |"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"## Elasticsearch Checks"}],"source_content_type":"text/x-markdown","patch_set":22,"id":"ba5da102_adac8b8d","line":699,"in_reply_to":"ba5da102_6c57e326","updated":"2016-11-04 14:34:32.000000000","message":"Where would the kubernetes service name be determined for each container? And I changed from docker after talking with Joe. He brought up this would leave us open to adding other container technology monitoring if we ever have to go that direction and I agree with him. Let me know if you strongly disagree.\n\nfor the dimension service maybe component\u003ddocker would be better??","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"dd087c21034013ed13aa7a9d8235624c8f25effa","unresolved":false,"context_lines":[{"line_number":696,"context_line":"| container.net.in_bytes  | Gauge | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes received by the container per interface |"},{"line_number":697,"context_line":"| container.net.in_bytes_sec  | Rate | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes received by the container per interface |"},{"line_number":698,"context_line":"| container.net.out_bytes  | Gauge | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The total amount of bytes sent by the container per interface |"},{"line_number":699,"context_line":"| container.net.out_bytes_sec  | Rate | hostname, name, image, interface, service\u003ddocker | kubernetes_pod_name, kubernetes_namespace | The rate of bytes sent by the container per interface |"},{"line_number":700,"context_line":""},{"line_number":701,"context_line":""},{"line_number":702,"context_line":"## Elasticsearch Checks"}],"source_content_type":"text/x-markdown","patch_set":22,"id":"ba5da102_f1ff35a8","line":699,"in_reply_to":"ba5da102_adac8b8d","updated":"2016-11-04 18:19:21.000000000","message":"I\u0027m not sure that service or component is a good dimension to have where it is set to \"docker\". The container is the technology that is responsible for running some service or component. It isn\u0027t as important what the container technology is, but what is running in the container. It might also be the case that most deployments will use the same container technology, docker. Is it really expected to identify metrics based on the container technology. If so, possibly a dimension of \"container_type\" would be better, but also it might be better to leave it out completely as it\u0027s value seems to be of limited utility right now.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":673,"context_line":"  - url: \"unix://var/run/docker.sock\""},{"line_number":674,"context_line":"    kubernetes_dimensions: True"},{"line_number":675,"context_line":"```"},{"line_number":676,"context_line":""},{"line_number":677,"context_line":""},{"line_number":678,"context_line":"The docker check return the following metrics:"},{"line_number":679,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":23,"id":"9a629dbe_72b851e6","line":676,"updated":"2016-11-08 17:18:04.000000000","message":"Since you only allow one instance, you should document that here","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"}],"monasca_agent/collector/checks_d/docker.py":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c77636d51712be2e107d19aeea9d2548e9cd768b","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.docker_client \u003d Client(base_url\u003ddocker_url, version\u003ddocker_version, timeout\u003dconnection_timeout)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        # Locate cgroups directories"},{"line_number":35,"context_line":"        self._mountpoints \u003d {}"},{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_9d1ab1c4","line":35,"updated":"2016-10-04 04:34:48.000000000","message":"mount_points ? ;-)","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"17114cb5a9ec2c5389ab4554a5b5a5a2ee433bc3","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        self.docker_client \u003d Client(base_url\u003ddocker_url, version\u003ddocker_version, timeout\u003dconnection_timeout)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        # Locate cgroups directories"},{"line_number":35,"context_line":"        self._mountpoints \u003d {}"},{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_bef2f56d","line":35,"in_reply_to":"3a98d1f4_9d1ab1c4","updated":"2016-10-04 14:24:28.000000000","message":"yes will fix","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c77636d51712be2e107d19aeea9d2548e9cd768b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        # Locate cgroups directories"},{"line_number":35,"context_line":"        self._mountpoints \u003d {}"},{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"},{"line_number":39,"context_line":"            self._mountpoints[cgroup] \u003d self._find_cgroup(cgroup, self.docker_root)"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_5d6bc91d","line":37,"updated":"2016-10-04 04:34:48.000000000","message":"default values for configuration are put as constants above, this one seems to be a leftover.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"17114cb5a9ec2c5389ab4554a5b5a5a2ee433bc3","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        # Locate cgroups directories"},{"line_number":35,"context_line":"        self._mountpoints \u003d {}"},{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"},{"line_number":39,"context_line":"            self._mountpoints[cgroup] \u003d self._find_cgroup(cgroup, self.docker_root)"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_3effc535","line":37,"in_reply_to":"3a98d1f4_5d6bc91d","updated":"2016-10-04 14:24:28.000000000","message":"will move","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c77636d51712be2e107d19aeea9d2548e9cd768b","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        self._mountpoints \u003d {}"},{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"},{"line_number":39,"context_line":"            self._mountpoints[cgroup] \u003d self._find_cgroup(cgroup, self.docker_root)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self._prev_cpu \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_bd620d3c","line":38,"updated":"2016-10-04 04:34:48.000000000","message":"constant ?","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"17114cb5a9ec2c5389ab4554a5b5a5a2ee433bc3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        self._mountpoints \u003d {}"},{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"},{"line_number":39,"context_line":"            self._mountpoints[cgroup] \u003d self._find_cgroup(cgroup, self.docker_root)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self._prev_cpu \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_9e9459e9","line":38,"in_reply_to":"3a98d1f4_bd620d3c","updated":"2016-10-04 14:24:28.000000000","message":"agreed","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c77636d51712be2e107d19aeea9d2548e9cd768b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"},{"line_number":39,"context_line":"            self._mountpoints[cgroup] \u003d self._find_cgroup(cgroup, self.docker_root)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self._prev_cpu \u003d {}"},{"line_number":42,"context_line":"        self._curr_cpu \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_3d57dd58","line":39,"updated":"2016-10-04 04:34:48.000000000","message":"I think that you can drop self.docker_root as 2nd argument of this method. You\u0027ve got _find_cgroup bound to the Docker class instance, so docker_root is available in the object.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"17114cb5a9ec2c5389ab4554a5b5a5a2ee433bc3","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":37,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":38,"context_line":"        for cgroup in [\u0027cpuacct\u0027, \u0027memory\u0027, \u0027blkio\u0027]:"},{"line_number":39,"context_line":"            self._mountpoints[cgroup] \u003d self._find_cgroup(cgroup, self.docker_root)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self._prev_cpu \u003d {}"},{"line_number":42,"context_line":"        self._curr_cpu \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_3ead0532","line":39,"in_reply_to":"3a98d1f4_3d57dd58","updated":"2016-10-04 14:24:28.000000000","message":"great idea","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c77636d51712be2e107d19aeea9d2548e9cd768b","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        running_containers_dict \u003d {}"},{"line_number":63,"context_line":"        for container in running_containers:"},{"line_number":64,"context_line":"            running_containers_dict[container[\u0027Id\u0027]] \u003d container"},{"line_number":65,"context_line":"        return running_containers_dict"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _report_container_metrics(self, container_dict, dimensions):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_fdcf3526","line":64,"updated":"2016-10-04 04:34:48.000000000","message":"I am not sure if I can see it, but looking at this piece here it looks like you need only only its. Last time I checked containers() method could return only that. Seems that 2nd option I am proposing is slightly faster as well. Did couple tests with %%timeit and it was just bit faster ;-). Though I have only like 5 container tops deployed at my workstation so I cannot tell if difference would get bigger with more containers.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"839ed3b41adeee14e542e00485d2bd3315d673d9","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        running_containers_dict \u003d {}"},{"line_number":63,"context_line":"        for container in running_containers:"},{"line_number":64,"context_line":"            running_containers_dict[container[\u0027Id\u0027]] \u003d container"},{"line_number":65,"context_line":"        return running_containers_dict"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _report_container_metrics(self, container_dict, dimensions):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_6ac42740","line":64,"in_reply_to":"3a98d1f4_fdcf3526","updated":"2016-10-04 15:35:04.000000000","message":"We actually use more than just IDs, the whole container dict is stored in running_containers_dict and we grab the image name and kubernetes labels from it.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"17114cb5a9ec2c5389ab4554a5b5a5a2ee433bc3","unresolved":false,"context_lines":[{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        running_containers_dict \u003d {}"},{"line_number":63,"context_line":"        for container in running_containers:"},{"line_number":64,"context_line":"            running_containers_dict[container[\u0027Id\u0027]] \u003d container"},{"line_number":65,"context_line":"        return running_containers_dict"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _report_container_metrics(self, container_dict, dimensions):"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_7e7eadaf","line":64,"in_reply_to":"3a98d1f4_fdcf3526","updated":"2016-10-04 14:24:28.000000000","message":"let me look into this","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c77636d51712be2e107d19aeea9d2548e9cd768b","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _report_cgroup_cpuacct(self, container_id, container_dimensions):"},{"line_number":94,"context_line":"        stat_file \u003d self._get_cgroup_file(\u0027cpuacct\u0027, container_id, \u0027cpuacct.stat\u0027)"},{"line_number":95,"context_line":"        stats \u003d self._parse_cgroup_pairs(stat_file)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.gauge(\u0027docker.cpu.user\u0027, stats[\u0027user\u0027], dimensions\u003dcontainer_dimensions)"},{"line_number":98,"context_line":"        self.gauge(\u0027docker.cpu.system\u0027, stats[\u0027system\u0027], dimensions\u003dcontainer_dimensions)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_1db86174","line":95,"updated":"2016-10-04 04:34:48.000000000","message":"Looks like this method call is duplicated at L#95 and L#102. If that is the same call (i.e. the same argument is passed) maybe you could just wrap it up in the calling method and pass down","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"17114cb5a9ec2c5389ab4554a5b5a5a2ee433bc3","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _report_cgroup_cpuacct(self, container_id, container_dimensions):"},{"line_number":94,"context_line":"        stat_file \u003d self._get_cgroup_file(\u0027cpuacct\u0027, container_id, \u0027cpuacct.stat\u0027)"},{"line_number":95,"context_line":"        stats \u003d self._parse_cgroup_pairs(stat_file)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.gauge(\u0027docker.cpu.user\u0027, stats[\u0027user\u0027], dimensions\u003dcontainer_dimensions)"},{"line_number":98,"context_line":"        self.gauge(\u0027docker.cpu.system\u0027, stats[\u0027system\u0027], dimensions\u003dcontainer_dimensions)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_c103660c","line":95,"in_reply_to":"3a98d1f4_1db86174","updated":"2016-10-04 14:24:28.000000000","message":"could we do that since they are specific to a file for cpu and memory that is why we have it in both methods?","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":17001,"name":"Tim Buckley","email":"timothy.jas.buckley@hpe.com","username":"timothy.jas.buckley"},"change_message_id":"839ed3b41adeee14e542e00485d2bd3315d673d9","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    def _report_cgroup_cpuacct(self, container_id, container_dimensions):"},{"line_number":94,"context_line":"        stat_file \u003d self._get_cgroup_file(\u0027cpuacct\u0027, container_id, \u0027cpuacct.stat\u0027)"},{"line_number":95,"context_line":"        stats \u003d self._parse_cgroup_pairs(stat_file)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.gauge(\u0027docker.cpu.user\u0027, stats[\u0027user\u0027], dimensions\u003dcontainer_dimensions)"},{"line_number":98,"context_line":"        self.gauge(\u0027docker.cpu.system\u0027, stats[\u0027system\u0027], dimensions\u003dcontainer_dimensions)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_6a90a796","line":95,"in_reply_to":"3a98d1f4_1db86174","updated":"2016-10-04 15:35:04.000000000","message":"stat_file will be different for both of these calls, this one needs to read from /sys/fs/cgroup/cpuacct while the call on #102 reads /sys/fs/cgroup/memory. The files are formatted similarly so we can use the same parsing function (_parse_cgroup_pairs) but we\u0027ll still need to run it twice.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c77636d51712be2e107d19aeea9d2548e9cd768b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        if memory_limit \u003e system_memory_limit:"},{"line_number":118,"context_line":"            memory_limit \u003d float(system_memory_limit)"},{"line_number":119,"context_line":"        used_perc \u003d (((cache_memory + rss_memory + swap_memory) / memory_limit) * 100)"},{"line_number":120,"context_line":"        self.gauge(\u0027docker.mem.used_perc\u0027, used_perc, dimensions\u003dcontainer_dimensions)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _report_cgroup_blkio(self, container_id, container_dimensions):"},{"line_number":123,"context_line":"        stat_file \u003d self._get_cgroup_file(\u0027blkio\u0027, container_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_bd65ad1e","line":120,"updated":"2016-10-04 04:34:48.000000000","message":"I am not sure about here. I mean I\u0027d expect and prefer to have cache_memory, rss_memory and swap_memory returned in mb separately though maybe it\u0027s pointless when it comes to checking container. \n\nI have in mind that process check returns rss_memory usage in mb but on the other hand I think that was only that stat that is returned.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"17114cb5a9ec2c5389ab4554a5b5a5a2ee433bc3","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        if memory_limit \u003e system_memory_limit:"},{"line_number":118,"context_line":"            memory_limit \u003d float(system_memory_limit)"},{"line_number":119,"context_line":"        used_perc \u003d (((cache_memory + rss_memory + swap_memory) / memory_limit) * 100)"},{"line_number":120,"context_line":"        self.gauge(\u0027docker.mem.used_perc\u0027, used_perc, dimensions\u003dcontainer_dimensions)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _report_cgroup_blkio(self, container_id, container_dimensions):"},{"line_number":123,"context_line":"        stat_file \u003d self._get_cgroup_file(\u0027blkio\u0027, container_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a95cdbc_1e3f6926","line":120,"in_reply_to":"3a98d1f4_bd65ad1e","updated":"2016-10-04 14:24:28.000000000","message":"i get what your saying maybe that is something we should address in our process check to report all three.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"91009c218da4fa808c108510e4b5c57e4d8b1415","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                continue"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"            try:"},{"line_number":344,"context_line":"                for line in content:"},{"line_number":345,"context_line":"                    if self._is_container_cgroup(line, selinux_policy):"},{"line_number":346,"context_line":"                        cpuacct \u003d line[2]"},{"line_number":347,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_e4fc27ba","line":344,"updated":"2016-10-03 11:15:18.000000000","message":"If code enters 2nd except, code will move on into the for loop here. I think that \u0027content\u0027 variable might not be initialized at all and you will hit another error which is not related to problematic parsing as the error msg in the L#360 says.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"05da91be0e0e7964fe8bfe2b60aa548d729c11f5","unresolved":false,"context_lines":[{"line_number":341,"context_line":"                continue"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"            try:"},{"line_number":344,"context_line":"                for line in content:"},{"line_number":345,"context_line":"                    if self._is_container_cgroup(line, selinux_policy):"},{"line_number":346,"context_line":"                        cpuacct \u003d line[2]"},{"line_number":347,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a98d1f4_70f526eb","line":344,"in_reply_to":"3a98d1f4_e4fc27ba","updated":"2016-10-03 14:40:33.000000000","message":"Great find. Will fix on next patch set.","commit_id":"05ab0a2745ca47c8a993f3d41b8e9da38a111c43"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\"Finds the mount point for a specified cgroup hierarchy. Works with"},{"line_number":265,"context_line":"        old style and new style mounts."},{"line_number":266,"context_line":"        \"\"\""},{"line_number":267,"context_line":"        with open(os.path.join(self.docker_root, \"/proc/mounts\"), \u0027r\u0027) as fp:"},{"line_number":268,"context_line":"            mounts \u003d map(lambda x: x.split(), fp.read().splitlines())"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        cgroup_mounts \u003d filter(lambda x: x[2] \u003d\u003d \"cgroup\", mounts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa6399be_fc8348ca","line":267,"range":{"start_line":267,"start_character":50,"end_line":267,"end_character":51},"updated":"2016-10-12 17:27:45.000000000","message":"extra \u0027/\u0027?","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"5ea2b418f6a7fe51867969fbdd9003fc2e8d28db","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\"Finds the mount point for a specified cgroup hierarchy. Works with"},{"line_number":265,"context_line":"        old style and new style mounts."},{"line_number":266,"context_line":"        \"\"\""},{"line_number":267,"context_line":"        with open(os.path.join(self.docker_root, \"/proc/mounts\"), \u0027r\u0027) as fp:"},{"line_number":268,"context_line":"            mounts \u003d map(lambda x: x.split(), fp.read().splitlines())"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        cgroup_mounts \u003d filter(lambda x: x[2] \u003d\u003d \"cgroup\", mounts)"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa6399be_d47cf4ed","line":267,"range":{"start_line":267,"start_character":50,"end_line":267,"end_character":51},"in_reply_to":"fa6399be_fc8348ca","updated":"2016-10-17 16:18:06.000000000","message":"it just makes sure that they have that in place in case the user specifies the docker root. Should have no negative impact.","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            raise Exception(\"Can\u0027t find mounted cgroups. If you run the Agent inside a container,\""},{"line_number":273,"context_line":"                            \" please refer to the documentation.\")"},{"line_number":274,"context_line":"        # Old cgroup style"},{"line_number":275,"context_line":"        if len(cgroup_mounts) \u003d\u003d 1:"},{"line_number":276,"context_line":"            return os.path.join(self.docker_root, cgroup_mounts[0][1])"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        candidate \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa6399be_1e1d510f","line":275,"range":{"start_line":275,"start_character":33,"end_line":275,"end_character":34},"updated":"2016-10-12 17:27:45.000000000","message":"will there always be more than 1 cgroup in the new style?","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"5ea2b418f6a7fe51867969fbdd9003fc2e8d28db","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            raise Exception(\"Can\u0027t find mounted cgroups. If you run the Agent inside a container,\""},{"line_number":273,"context_line":"                            \" please refer to the documentation.\")"},{"line_number":274,"context_line":"        # Old cgroup style"},{"line_number":275,"context_line":"        if len(cgroup_mounts) \u003d\u003d 1:"},{"line_number":276,"context_line":"            return os.path.join(self.docker_root, cgroup_mounts[0][1])"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        candidate \u003d None"}],"source_content_type":"text/x-python","patch_set":15,"id":"fa6399be_5450e45e","line":275,"range":{"start_line":275,"start_character":33,"end_line":275,"end_character":34},"in_reply_to":"fa6399be_1e1d510f","updated":"2016-10-17 16:18:06.000000000","message":"I think so","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"ae921314940efced9883c50d1633fa86a83d670d","unresolved":false,"context_lines":[{"line_number":5,"context_line":"import os"},{"line_number":6,"context_line":"import re"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"from docker import Client"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_f21657f0","line":8,"updated":"2016-10-18 00:54:23.000000000","message":"I\u0027ve been seeing some reviews come across lately related to python3. I don\u0027t think that this is the convention that should be used. Shouldn\u0027t it just be \"import docker\"","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"22b9b5f5d93f39c55800b08700a4c0b7676ed2f5","unresolved":false,"context_lines":[{"line_number":5,"context_line":"import os"},{"line_number":6,"context_line":"import re"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"from docker import Client"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_15bfdcfb","line":8,"in_reply_to":"fa6399be_4819c478","updated":"2016-10-19 18:47:26.000000000","message":"Just for clarity, the recent review that I was referring to is, https://review.openstack.org/#/c/375376/3/monasca_notification/common/repositories/mysql/mysql_repo.py.\n\nOpenstack stack says the following, http://docs.openstack.org/developer/hacking/#imports, \"Do not import objects, only modules (*)\". Client is an object, so I think docker should just be imported.","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"bf3d4eccda34ad5eaa799192144a7df59f42528a","unresolved":false,"context_lines":[{"line_number":5,"context_line":"import os"},{"line_number":6,"context_line":"import re"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"from docker import Client"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_4819c478","line":8,"in_reply_to":"fa6399be_d98c1682","updated":"2016-10-19 14:56:38.000000000","message":"Tomasz are you agreeing with Roland or disagreeing I am confused. I am happy to change this to just import docker.","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"810a8df5024016ecf5dcf0dbecc94c12d28f2352","unresolved":false,"context_lines":[{"line_number":5,"context_line":"import os"},{"line_number":6,"context_line":"import re"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"from docker import Client"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_d98c1682","line":8,"in_reply_to":"fa6399be_f21657f0","updated":"2016-10-18 04:55:54.000000000","message":"AFAIk this format is recommended by OpenStack","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"5e8950c88df4a66ea2eae568bec99cc23792f91c","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def __init__(self, name, init_config, agent_config, instances\u003dNone):"},{"line_number":27,"context_line":"        AgentCheck.__init__(self, name, init_config, agent_config, instances)"},{"line_number":28,"context_line":"        if instances is not None and len(instances) \u003e 1:"},{"line_number":29,"context_line":"            raise Exception(\u0027Docker check only supports one configured instance.\u0027)"},{"line_number":30,"context_line":"        instance \u003d self.instances[0]"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_2b59438f","line":28,"updated":"2016-10-18 00:53:07.000000000","message":"Would a new line be good here?","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8dc5fdf65f21de7b37d84bbedd5e91debb74fd15","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"GAUGE \u003d \"gauge\""},{"line_number":13,"context_line":"RATE \u003d \"rate\""},{"line_number":14,"context_line":"CONTAINER_ID_RE \u003d re.compile(\u0027[0-9a-f]{64}\u0027)"},{"line_number":15,"context_line":"DEFAULT_BASE_URL \u003d \"unix://var/run/docker.sock\""},{"line_number":16,"context_line":"DEFAULT_VERSION \u003d \"auto\""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_1368d186","line":13,"range":{"start_line":12,"start_character":0,"end_line":13,"end_character":13},"updated":"2016-10-19 21:42:04.000000000","message":"Not used","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"GAUGE \u003d \"gauge\""},{"line_number":13,"context_line":"RATE \u003d \"rate\""},{"line_number":14,"context_line":"CONTAINER_ID_RE \u003d re.compile(\u0027[0-9a-f]{64}\u0027)"},{"line_number":15,"context_line":"DEFAULT_BASE_URL \u003d \"unix://var/run/docker.sock\""},{"line_number":16,"context_line":"DEFAULT_VERSION \u003d \"auto\""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_59a3ad9e","line":13,"range":{"start_line":12,"start_character":0,"end_line":13,"end_character":13},"in_reply_to":"fa6399be_1368d186","updated":"2016-10-26 20:20:51.000000000","message":"done","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":30,"context_line":"            raise Exception(\u0027Docker check only supports one configured instance.\u0027)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"        instance \u003d self.instances[0]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        connection_timeout \u003d int(init_config.get(\u0027connection_timeout\u0027, DEFAULT_TIMEOUT))"},{"line_number":35,"context_line":"        docker_version \u003d init_config.get(\u0027version\u0027, DEFAULT_VERSION)"},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_fbfc1940","line":33,"updated":"2016-10-19 20:58:20.000000000","message":"Why the newline?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"        connection_timeout \u003d int(init_config.get(\u0027connection_timeout\u0027, DEFAULT_TIMEOUT))"},{"line_number":35,"context_line":"        docker_version \u003d init_config.get(\u0027version\u0027, DEFAULT_VERSION)"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.docker_client \u003d Client(base_url\u003ddocker_url, version\u003ddocker_version, timeout\u003dconnection_timeout)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_fbe5f9a7","line":36,"updated":"2016-10-19 20:58:20.000000000","message":"Why the newline here?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.docker_client \u003d Client(base_url\u003ddocker_url, version\u003ddocker_version, timeout\u003dconnection_timeout)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_9beb1d78","line":39,"updated":"2016-10-19 20:58:20.000000000","message":"So, this should be docker.Client using the new Python 3 convention","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.docker_client \u003d Client(base_url\u003ddocker_url, version\u003ddocker_version, timeout\u003dconnection_timeout)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_b9aa096f","line":39,"in_reply_to":"fa6399be_9beb1d78","updated":"2016-10-26 20:20:51.000000000","message":"done","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        self.docker_client \u003d Client(base_url\u003ddocker_url, version\u003ddocker_version, timeout\u003dconnection_timeout)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.set_kubernetes_tags \u003d instance.get(\u0027set_kubernetes_tags\u0027, DEFAULT_SET_KUBERNETES)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_bb89c1cc","line":40,"updated":"2016-10-19 20:58:20.000000000","message":"Why the newline? I think I\u0027m beginning to see a pattern?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"        self.set_kubernetes_tags \u003d instance.get(\u0027set_kubernetes_tags\u0027, DEFAULT_SET_KUBERNETES)"},{"line_number":44,"context_line":"        # Locate cgroups directories"},{"line_number":45,"context_line":"        self._mount_points \u003d {}"},{"line_number":46,"context_line":"        self._cgroup_filename_pattern \u003d None"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_3b4a1184","line":43,"updated":"2016-10-19 20:58:20.000000000","message":"\"set\" is a strange prefix for a variable. Usually set/get apply to getters/setters. \n\nWould this be better as \"kubernetes_tags\" and DEFAULT_KUBERNETS_TAGS?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.set_kubernetes_tags \u003d instance.get(\u0027set_kubernetes_tags\u0027, DEFAULT_SET_KUBERNETES)"},{"line_number":44,"context_line":"        # Locate cgroups directories"},{"line_number":45,"context_line":"        self._mount_points \u003d {}"},{"line_number":46,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":47,"context_line":"        for cgroup in CGROUPS:"},{"line_number":48,"context_line":"            self._mount_points[cgroup] \u003d self._find_cgroup(cgroup)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_3b31310c","line":46,"updated":"2016-10-19 20:58:20.000000000","message":"Did you mean to set _cgroup_filename_pattern to something other than None?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.set_kubernetes_tags \u003d instance.get(\u0027set_kubernetes_tags\u0027, DEFAULT_SET_KUBERNETES)"},{"line_number":44,"context_line":"        # Locate cgroups directories"},{"line_number":45,"context_line":"        self._mount_points \u003d {}"},{"line_number":46,"context_line":"        self._cgroup_filename_pattern \u003d None"},{"line_number":47,"context_line":"        for cgroup in CGROUPS:"},{"line_number":48,"context_line":"            self._mount_points[cgroup] \u003d self._find_cgroup(cgroup)"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_c4a0bba8","line":46,"in_reply_to":"fa6399be_3b31310c","updated":"2016-10-26 20:20:51.000000000","message":"no, read comment in the _get_cgroup_file() when setting this variable","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        container_dict \u003d self._get_and_count_containers(dimensions)"},{"line_number":61,"context_line":"        container_dict \u003d self._crawl_container_pids(container_dict)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        # Report container metrics from cgroups"},{"line_number":64,"context_line":"        self._report_container_metrics(container_dict, dimensions)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_a60c443c","line":61,"range":{"start_line":61,"start_character":30,"end_line":61,"end_character":51},"updated":"2016-10-19 20:58:20.000000000","message":"Is is just confusing to see a variable declared container_dict, and then on the next line set to something else, of a different type. Would two variable names be better than one in this case. Also, do you really want to use the \"dict\" qualifier on it.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        container_dict \u003d self._get_and_count_containers(dimensions)"},{"line_number":61,"context_line":"        container_dict \u003d self._crawl_container_pids(container_dict)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        # Report container metrics from cgroups"},{"line_number":64,"context_line":"        self._report_container_metrics(container_dict, dimensions)"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_a4c5875c","line":61,"range":{"start_line":61,"start_character":30,"end_line":61,"end_character":51},"in_reply_to":"fa6399be_a60c443c","updated":"2016-10-26 20:20:51.000000000","message":"will fix","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.rate(metric_name + \"_sec\", value, dimensions\u003ddimensions)"},{"line_number":68,"context_line":"        self.gauge(metric_name, value, dimensions\u003ddimensions)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _get_and_count_containers(self, dimensions):"},{"line_number":71,"context_line":"        running_containers \u003d self._get_containers()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.gauge(\"docker.containers.running_count\", len(running_containers), dimensions\u003ddimensions)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_464d2871","line":70,"updated":"2016-10-19 20:58:20.000000000","message":"Would it be better to return two variables from this function, the containers and the count_countainers?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        self.rate(metric_name + \"_sec\", value, dimensions\u003ddimensions)"},{"line_number":68,"context_line":"        self.gauge(metric_name, value, dimensions\u003ddimensions)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _get_and_count_containers(self, dimensions):"},{"line_number":71,"context_line":"        running_containers \u003d self._get_containers()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.gauge(\"docker.containers.running_count\", len(running_containers), dimensions\u003ddimensions)"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_c4043bc8","line":70,"in_reply_to":"fa6399be_464d2871","updated":"2016-10-26 20:20:51.000000000","message":"yes","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def _get_and_count_containers(self, dimensions):"},{"line_number":71,"context_line":"        running_containers \u003d self._get_containers()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.gauge(\"docker.containers.running_count\", len(running_containers), dimensions\u003ddimensions)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        running_containers_dict \u003d {}"},{"line_number":76,"context_line":"        for container in running_containers:"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_866e60c7","line":73,"updated":"2016-10-19 20:58:20.000000000","message":"So, this function has a side-effect when it invokes self.gauge, namely sending a metric, correct? If it does, then that violates the indempotency of what get normally does.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def _get_and_count_containers(self, dimensions):"},{"line_number":71,"context_line":"        running_containers \u003d self._get_containers()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.gauge(\"docker.containers.running_count\", len(running_containers), dimensions\u003ddimensions)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        running_containers_dict \u003d {}"},{"line_number":76,"context_line":"        for container in running_containers:"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_249ed756","line":73,"in_reply_to":"fa6399be_866e60c7","updated":"2016-10-26 20:20:51.000000000","message":"will fix with the change above","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        running_containers_dict \u003d {}"},{"line_number":76,"context_line":"        for container in running_containers:"},{"line_number":77,"context_line":"            running_containers_dict[container[\u0027Id\u0027]] \u003d container"},{"line_number":78,"context_line":"        return running_containers_dict"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _report_container_metrics(self, container_dict, dimensions):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_867ca073","line":77,"updated":"2016-10-19 20:58:20.000000000","message":"Could this have been a list comprehension?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        running_containers_dict \u003d {}"},{"line_number":76,"context_line":"        for container in running_containers:"},{"line_number":77,"context_line":"            running_containers_dict[container[\u0027Id\u0027]] \u003d container"},{"line_number":78,"context_line":"        return running_containers_dict"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _report_container_metrics(self, container_dict, dimensions):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_44a3cb9e","line":77,"in_reply_to":"fa6399be_867ca073","updated":"2016-10-26 20:20:51.000000000","message":"yes","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        for container in container_dict.itervalues():"},{"line_number":85,"context_line":"            try:"},{"line_number":86,"context_line":"                container_dimensions \u003d dimensions.copy()"},{"line_number":87,"context_line":"                container_id \u003d container[\u0027Id\u0027]"},{"line_number":88,"context_line":"                container_dimensions[\u0027id\u0027] \u003d container_id"},{"line_number":89,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":90,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_662f8c3e","line":87,"updated":"2016-10-19 20:58:20.000000000","message":"I\u0027m just wondering if you should add container_name. Container will change each time a new container is created.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        for container in container_dict.itervalues():"},{"line_number":85,"context_line":"            try:"},{"line_number":86,"context_line":"                container_dimensions \u003d dimensions.copy()"},{"line_number":87,"context_line":"                container_id \u003d container[\u0027Id\u0027]"},{"line_number":88,"context_line":"                container_dimensions[\u0027id\u0027] \u003d container_id"},{"line_number":89,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":90,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_646fef92","line":87,"in_reply_to":"fa6399be_662f8c3e","updated":"2016-10-26 20:20:51.000000000","message":"yes that was already my plan to change :)","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                container_dimensions \u003d dimensions.copy()"},{"line_number":87,"context_line":"                container_id \u003d container[\u0027Id\u0027]"},{"line_number":88,"context_line":"                container_dimensions[\u0027id\u0027] \u003d container_id"},{"line_number":89,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":90,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"},{"line_number":91,"context_line":"                if self.set_kubernetes_tags:"},{"line_number":92,"context_line":"                    container_pod \u003d container_labels.get(\u0027io.kubernetes.pod.name\u0027, \u0027no_pod\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_e61b9c1a","line":89,"range":{"start_line":89,"start_character":16,"end_line":89,"end_character":36},"updated":"2016-10-19 20:58:20.000000000","message":"Is image really useful for operational purposes? I was wondering if this dimension should be removed.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                container_dimensions \u003d dimensions.copy()"},{"line_number":87,"context_line":"                container_id \u003d container[\u0027Id\u0027]"},{"line_number":88,"context_line":"                container_dimensions[\u0027id\u0027] \u003d container_id"},{"line_number":89,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":90,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"},{"line_number":91,"context_line":"                if self.set_kubernetes_tags:"},{"line_number":92,"context_line":"                    container_pod \u003d container_labels.get(\u0027io.kubernetes.pod.name\u0027, \u0027no_pod\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_4472eb7d","line":89,"range":{"start_line":89,"start_character":16,"end_line":89,"end_character":36},"in_reply_to":"fa6399be_e61b9c1a","updated":"2016-10-26 20:20:51.000000000","message":"why do you think that? \nWouldnt it be useful to get certain statistics of a certain docker image that is running across multiple containers. like how is the mysql \"mysql:5.5\" image doing compared to the \"mysql:latest\"\n\nThoughts?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            except IOError as err:"},{"line_number":104,"context_line":"                # It is possible that the container got stopped between the"},{"line_number":105,"context_line":"                # API call and now"},{"line_number":106,"context_line":"                self.log.info(\"IO error while collecting cgroup metrics, \""},{"line_number":107,"context_line":"                              \"skipping container...\", exc_info\u003derr)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        self._prev_system_cpu \u003d self._curr_system_cpu"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_465e08ea","line":106,"range":{"start_line":106,"start_character":21,"end_line":106,"end_character":24},"updated":"2016-10-19 20:58:20.000000000","message":"Shouldn\u0027t this be a log.error?","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            except IOError as err:"},{"line_number":104,"context_line":"                # It is possible that the container got stopped between the"},{"line_number":105,"context_line":"                # API call and now"},{"line_number":106,"context_line":"                self.log.info(\"IO error while collecting cgroup metrics, \""},{"line_number":107,"context_line":"                              \"skipping container...\", exc_info\u003derr)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        self._prev_system_cpu \u003d self._curr_system_cpu"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_e43bff9a","line":106,"range":{"start_line":106,"start_character":21,"end_line":106,"end_character":24},"in_reply_to":"fa6399be_465e08ea","updated":"2016-10-26 20:20:51.000000000","message":"no, we expect that a lot of these containers are going to be transient so logging at error level would fill up our logs","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                Inter-|   Receive                                                |  Transmit"},{"line_number":172,"context_line":"                 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed"},{"line_number":173,"context_line":"                \"\"\""},{"line_number":174,"context_line":"                for l in lines[2:]:"},{"line_number":175,"context_line":"                    cols \u003d l.split(\u0027:\u0027, 1)"},{"line_number":176,"context_line":"                    interface_name \u003d str(cols[0]).strip()"},{"line_number":177,"context_line":"                    if interface_name !\u003d \u0027lo\u0027:"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_e6771c39","line":174,"range":{"start_line":174,"start_character":25,"end_line":174,"end_character":30},"updated":"2016-10-19 20:58:20.000000000","message":"would prefer for line in lines","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                Inter-|   Receive                                                |  Transmit"},{"line_number":172,"context_line":"                 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed"},{"line_number":173,"context_line":"                \"\"\""},{"line_number":174,"context_line":"                for l in lines[2:]:"},{"line_number":175,"context_line":"                    cols \u003d l.split(\u0027:\u0027, 1)"},{"line_number":176,"context_line":"                    interface_name \u003d str(cols[0]).strip()"},{"line_number":177,"context_line":"                    if interface_name !\u003d \u0027lo\u0027:"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_f9e1e1d1","line":174,"range":{"start_line":174,"start_character":25,"end_line":174,"end_character":30},"in_reply_to":"fa6399be_e6771c39","updated":"2016-10-26 20:20:51.000000000","message":"done","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed"},{"line_number":173,"context_line":"                \"\"\""},{"line_number":174,"context_line":"                for l in lines[2:]:"},{"line_number":175,"context_line":"                    cols \u003d l.split(\u0027:\u0027, 1)"},{"line_number":176,"context_line":"                    interface_name \u003d str(cols[0]).strip()"},{"line_number":177,"context_line":"                    if interface_name !\u003d \u0027lo\u0027:"},{"line_number":178,"context_line":"                        container_dimensions[\u0027interface\u0027] \u003d interface_name"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_a6b364e8","line":175,"range":{"start_line":175,"start_character":29,"end_line":175,"end_character":34},"updated":"2016-10-19 20:58:20.000000000","message":"i see cols all over the place, but i have to be honest, i would prefer tokens.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                                                       container_dimensions)"},{"line_number":184,"context_line":"                        break"},{"line_number":185,"context_line":"        except Exception as e:"},{"line_number":186,"context_line":"            self.log.warning(\"Failed to report IO metrics from file {0}. Exception: {1}\".format(proc_net_file, e))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    # Docker API"},{"line_number":189,"context_line":"    def _get_containers(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_86abc088","line":186,"updated":"2016-10-19 20:58:20.000000000","message":"I was wondering if this should be logged as an error rather than a warning.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                                                       container_dimensions)"},{"line_number":184,"context_line":"                        break"},{"line_number":185,"context_line":"        except Exception as e:"},{"line_number":186,"context_line":"            self.log.warning(\"Failed to report IO metrics from file {0}. Exception: {1}\".format(proc_net_file, e))"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    # Docker API"},{"line_number":189,"context_line":"    def _get_containers(self):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_24033775","line":186,"in_reply_to":"fa6399be_86abc088","updated":"2016-10-26 20:20:51.000000000","message":"yeah i could agree with that","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        \"\"\"Finds the mount point for a specified cgroup hierarchy. Works with"},{"line_number":267,"context_line":"        old style and new style mounts."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        with open(os.path.join(self.docker_root, \"/proc/mounts\"), \u0027r\u0027) as fp:"},{"line_number":270,"context_line":"            mounts \u003d map(lambda x: x.split(), fp.read().splitlines())"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        cgroup_mounts \u003d filter(lambda x: x[2] \u003d\u003d \"cgroup\", mounts)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_661b0c81","line":269,"updated":"2016-10-19 20:58:20.000000000","message":"as f is the convention you\u0027ve used everywhere else, not fp","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        \"\"\"Finds the mount point for a specified cgroup hierarchy. Works with"},{"line_number":267,"context_line":"        old style and new style mounts."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        with open(os.path.join(self.docker_root, \"/proc/mounts\"), \u0027r\u0027) as fp:"},{"line_number":270,"context_line":"            mounts \u003d map(lambda x: x.split(), fp.read().splitlines())"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        cgroup_mounts \u003d filter(lambda x: x[2] \u003d\u003d \"cgroup\", mounts)"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_84f24399","line":269,"in_reply_to":"fa6399be_661b0c81","updated":"2016-10-26 20:20:51.000000000","message":"ok","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def _parse_cgroup_pairs(self, stat_file, convert\u003dint):"},{"line_number":303,"context_line":"        \"\"\"Parse a cgroup file for key/values.\"\"\""},{"line_number":304,"context_line":"        self.log.debug(\"Opening cgroup stat file: %s\", stat_file)"},{"line_number":305,"context_line":"        with open(stat_file, \u0027r\u0027) as fp:"},{"line_number":306,"context_line":"            split_lines \u003d map(lambda x: x.split(\u0027 \u0027, 1), fp.readlines())"},{"line_number":307,"context_line":"            return {k: convert(v) for k, v in split_lines}"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_a10c2e3c","line":304,"updated":"2016-10-19 20:58:20.000000000","message":"Do you really want all the times that you are opening the file logged as debug? It just didn\u0027t seem to be very useful debug logs.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def _parse_cgroup_pairs(self, stat_file, convert\u003dint):"},{"line_number":303,"context_line":"        \"\"\"Parse a cgroup file for key/values.\"\"\""},{"line_number":304,"context_line":"        self.log.debug(\"Opening cgroup stat file: %s\", stat_file)"},{"line_number":305,"context_line":"        with open(stat_file, \u0027r\u0027) as fp:"},{"line_number":306,"context_line":"            split_lines \u003d map(lambda x: x.split(\u0027 \u0027, 1), fp.readlines())"},{"line_number":307,"context_line":"            return {k: convert(v) for k, v in split_lines}"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_39ec39c7","line":304,"in_reply_to":"fa6399be_a10c2e3c","updated":"2016-10-26 20:20:51.000000000","message":"no i dont taking it out good catch","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c8ff0da8d34d96de186926b5b92b0ee27e9d9793","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            return True"},{"line_number":355,"context_line":"        return False"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def _crawl_container_pids(self, container_dict, custom_cgroups\u003dFalse):"},{"line_number":358,"context_line":"        \"\"\"Find all proc paths for running containers.\"\"\""},{"line_number":359,"context_line":"        proc_path \u003d os.path.join(self.docker_root, \u0027proc\u0027)"},{"line_number":360,"context_line":"        pid_dirs \u003d [_dir for _dir in os.listdir(proc_path) if _dir.isdigit()]"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa6399be_a1234ea6","line":357,"updated":"2016-10-19 20:58:20.000000000","message":"How about get_container_pids, instead of crawl. Crawling is how it does it\u0027s thing, but it returns the container pids.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4c7b14856d6f92831405c9b11a87cd511d2b74b8","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            return True"},{"line_number":355,"context_line":"        return False"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def _crawl_container_pids(self, container_dict, custom_cgroups\u003dFalse):"},{"line_number":358,"context_line":"        \"\"\"Find all proc paths for running containers.\"\"\""},{"line_number":359,"context_line":"        proc_path \u003d os.path.join(self.docker_root, \u0027proc\u0027)"},{"line_number":360,"context_line":"        pid_dirs \u003d [_dir for _dir in os.listdir(proc_path) if _dir.isdigit()]"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba5da102_59d1edfa","line":357,"in_reply_to":"fa6399be_a1234ea6","updated":"2016-10-26 20:20:51.000000000","message":"i like set_container_pids and pass the dictionary in.","commit_id":"6cde2fb7b2c1c06f7a071f6339fd018cff0e0492"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"baddb4bf40257e2062e3571e76d6591aedefb214","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        if instances is not None and len(instances) \u003e 1:"},{"line_number":28,"context_line":"            raise Exception(\u0027Docker check only supports one configured instance.\u0027)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"        instance \u003d self.instances[0]"},{"line_number":31,"context_line":"        connection_timeout \u003d int(init_config.get(\u0027connection_timeout\u0027, DEFAULT_TIMEOUT))"},{"line_number":32,"context_line":"        docker_version \u003d init_config.get(\u0027version\u0027, DEFAULT_VERSION)"},{"line_number":33,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":34,"context_line":"        self.docker_client \u003d docker.Client(base_url\u003ddocker_url, version\u003ddocker_version, timeout\u003dconnection_timeout)"},{"line_number":35,"context_line":"        self.docker_root \u003d init_config.get(\u0027docker_root\u0027, \u0027/\u0027)"},{"line_number":36,"context_line":"        self.kubernetes_tags \u003d instance.get(\u0027kubernetes_tags\u0027, DEFAULT_KUBERNETES_TAGS)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_793d238e","line":33,"range":{"start_line":30,"start_character":0,"end_line":33,"end_character":58},"updated":"2016-11-02 20:48:24.000000000","message":"Same comments as the advisor plugin with regard to using instances[0]","commit_id":"155a847157cd1e5dd971476c34e35a2e22b888bf"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"baddb4bf40257e2062e3571e76d6591aedefb214","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                    metrics[\u0027io_write\u0027] +\u003d int(line.split()[2])"},{"line_number":304,"context_line":"            return metrics"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    def _parse_cgroup_file(self, stat_file):"},{"line_number":307,"context_line":"        try:"},{"line_number":308,"context_line":"            with open(stat_file, \u0027r\u0027) as f:"},{"line_number":309,"context_line":"                if \u0027blkio\u0027 in stat_file:"},{"line_number":310,"context_line":"                    return self._parse_cgroup_blkio_metrics(f.read().splitlines())"},{"line_number":311,"context_line":"                else:"},{"line_number":312,"context_line":"                    token_lists \u003d map(lambda x: x.split(\u0027 \u0027, 1), f.read().splitlines())"},{"line_number":313,"context_line":"                    ret \u003d {}"},{"line_number":314,"context_line":"                    for tokens in token_lists:"},{"line_number":315,"context_line":"                        if len(tokens) \u003d\u003d 2:"},{"line_number":316,"context_line":"                            ret[tokens[0]] \u003d tokens[1]"},{"line_number":317,"context_line":"                        else:"},{"line_number":318,"context_line":"                            # for single values, use None as key"},{"line_number":319,"context_line":"                            ret[None] \u003d tokens[0]"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"                    return dict(map(lambda x: x.split(\u0027 \u0027, 1), f.read().splitlines()))"},{"line_number":322,"context_line":"        except IOError:"},{"line_number":323,"context_line":"            # It is possible that the container got stopped between the API call and now"},{"line_number":324,"context_line":"            self.log.info(\"Can\u0027t open %s. Metrics for this container are skipped.\" % stat_file)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    # checking if cgroup is a container cgroup"},{"line_number":327,"context_line":"    def _is_container_cgroup(self, line, selinux_policy):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_59f13f6a","line":324,"range":{"start_line":306,"start_character":0,"end_line":324,"end_character":95},"updated":"2016-11-02 20:48:24.000000000","message":"I don\u0027t think this method is used","commit_id":"155a847157cd1e5dd971476c34e35a2e22b888bf"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"baddb4bf40257e2062e3571e76d6591aedefb214","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                    if self._is_container_cgroup(line, selinux_policy):"},{"line_number":366,"context_line":"                        cpuacct \u003d line[2]"},{"line_number":367,"context_line":"                        break"},{"line_number":368,"context_line":"                else:"},{"line_number":369,"context_line":"                    continue"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"                matches \u003d re.findall(CONTAINER_ID_RE, cpuacct)"},{"line_number":372,"context_line":"                if matches:"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_59077f81","line":369,"range":{"start_line":368,"start_character":0,"end_line":369,"end_character":28},"updated":"2016-11-02 20:48:24.000000000","message":"Delete","commit_id":"155a847157cd1e5dd971476c34e35a2e22b888bf"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"baddb4bf40257e2062e3571e76d6591aedefb214","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                else:"},{"line_number":369,"context_line":"                    continue"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"                matches \u003d re.findall(CONTAINER_ID_RE, cpuacct)"},{"line_number":372,"context_line":"                if matches:"},{"line_number":373,"context_line":"                    container_id \u003d matches[-1]"},{"line_number":374,"context_line":"                    if container_id not in containers:"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5da102_f9f6938d","line":371,"range":{"start_line":371,"start_character":54,"end_line":371,"end_character":61},"updated":"2016-11-02 20:48:24.000000000","message":"May not be initialized?","commit_id":"155a847157cd1e5dd971476c34e35a2e22b888bf"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":7,"context_line":""},{"line_number":8,"context_line":"import docker"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"CONTAINER_ID_RE \u003d re.compile(\u0027[0-9a-f]{64}\u0027)"},{"line_number":13,"context_line":"DEFAULT_BASE_URL \u003d \"unix://var/run/docker.sock\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_0ee654e8","line":10,"updated":"2016-11-04 12:59:31.000000000","message":"We shouldn\u0027t be importing objects anymore according to http://docs.openstack.org/developer/hacking/#imports","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":7,"context_line":""},{"line_number":8,"context_line":"import docker"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"CONTAINER_ID_RE \u003d re.compile(\u0027[0-9a-f]{64}\u0027)"},{"line_number":13,"context_line":"DEFAULT_BASE_URL \u003d \"unix://var/run/docker.sock\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_cdc0df2d","line":10,"in_reply_to":"ba5da102_0ee654e8","updated":"2016-11-04 14:34:32.000000000","message":"ill get a hang of it someday ;) although this is throughout all our agent do you want to go change all of them in one patch set or as we go?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"dd087c21034013ed13aa7a9d8235624c8f25effa","unresolved":false,"context_lines":[{"line_number":7,"context_line":""},{"line_number":8,"context_line":"import docker"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"from monasca_agent.collector.checks import AgentCheck"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"CONTAINER_ID_RE \u003d re.compile(\u0027[0-9a-f]{64}\u0027)"},{"line_number":13,"context_line":"DEFAULT_BASE_URL \u003d \"unix://var/run/docker.sock\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_aa21c6b6","line":10,"in_reply_to":"ba5da102_cdc0df2d","updated":"2016-11-04 18:19:21.000000000","message":"No, I\u0027m not proposing we change everything that is there already. There have been some recent commits around this recently by several developers. \n\nMaybe open a bug and leave it open as technical debit that someone might get to.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self._curr_system_cpu \u003d None"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def check(self, instance):"},{"line_number":45,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":46,"context_line":"        docker_client \u003d docker.Client(base_url\u003ddocker_url, version\u003dself.docker_version, timeout\u003dself.connection_timeout)"},{"line_number":47,"context_line":"        kubernetes_tags \u003d instance.get(\u0027kubernetes_tags\u0027, DEFAULT_KUBERNETES_TAGS)"},{"line_number":48,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_ce10dcae","line":45,"updated":"2016-11-04 12:59:31.000000000","message":"Should this be initialized in the constructor?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def check(self, instance):"},{"line_number":45,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":46,"context_line":"        docker_client \u003d docker.Client(base_url\u003ddocker_url, version\u003dself.docker_version, timeout\u003dself.connection_timeout)"},{"line_number":47,"context_line":"        kubernetes_tags \u003d instance.get(\u0027kubernetes_tags\u0027, DEFAULT_KUBERNETES_TAGS)"},{"line_number":48,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"},{"line_number":49,"context_line":"        running_containers \u003d {container[\u0027Id\u0027]: container for container in self._get_containers(docker_client)}"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_ae1c88c2","line":46,"updated":"2016-11-04 12:59:31.000000000","message":"Could this be initialized in the constructor too?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def check(self, instance):"},{"line_number":45,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":46,"context_line":"        docker_client \u003d docker.Client(base_url\u003ddocker_url, version\u003dself.docker_version, timeout\u003dself.connection_timeout)"},{"line_number":47,"context_line":"        kubernetes_tags \u003d instance.get(\u0027kubernetes_tags\u0027, DEFAULT_KUBERNETES_TAGS)"},{"line_number":48,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"},{"line_number":49,"context_line":"        running_containers \u003d {container[\u0027Id\u0027]: container for container in self._get_containers(docker_client)}"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_4d104fa9","line":46,"in_reply_to":"ba5da102_ae1c88c2","updated":"2016-11-04 14:34:32.000000000","message":"no it is based off of the instance. so you know the instance is actually defined if you get into this check method. Leaving it in the check method","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"368bc769fe7d9c1fb2400fd84c38b9fc0717c0ed","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def check(self, instance):"},{"line_number":45,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":46,"context_line":"        docker_client \u003d docker.Client(base_url\u003ddocker_url, version\u003dself.docker_version, timeout\u003dself.connection_timeout)"},{"line_number":47,"context_line":"        kubernetes_tags \u003d instance.get(\u0027kubernetes_tags\u0027, DEFAULT_KUBERNETES_TAGS)"},{"line_number":48,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"},{"line_number":49,"context_line":"        running_containers \u003d {container[\u0027Id\u0027]: container for container in self._get_containers(docker_client)}"},{"line_number":50,"context_line":"        self.gauge(\"container.running_count\", len(running_containers), dimensions\u003ddimensions)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_2a8792b5","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":23},"updated":"2016-11-04 04:52:16.000000000","message":"A better name for this might be add_kubernetes_tags","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def check(self, instance):"},{"line_number":45,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":46,"context_line":"        docker_client \u003d docker.Client(base_url\u003ddocker_url, version\u003dself.docker_version, timeout\u003dself.connection_timeout)"},{"line_number":47,"context_line":"        kubernetes_tags \u003d instance.get(\u0027kubernetes_tags\u0027, DEFAULT_KUBERNETES_TAGS)"},{"line_number":48,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"},{"line_number":49,"context_line":"        running_containers \u003d {container[\u0027Id\u0027]: container for container in self._get_containers(docker_client)}"},{"line_number":50,"context_line":"        self.gauge(\"container.running_count\", len(running_containers), dimensions\u003ddimensions)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_6ed7d0bf","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":23},"in_reply_to":"ba5da102_2a8792b5","updated":"2016-11-04 12:59:31.000000000","message":"I suggested changing the name to kubernetes_dimensions. Tags is a DataDog concept, right? Kubernetes has labels and annotations.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    def check(self, instance):"},{"line_number":45,"context_line":"        docker_url \u003d instance.get(\u0027url\u0027, DEFAULT_BASE_URL)"},{"line_number":46,"context_line":"        docker_client \u003d docker.Client(base_url\u003ddocker_url, version\u003dself.docker_version, timeout\u003dself.connection_timeout)"},{"line_number":47,"context_line":"        kubernetes_tags \u003d instance.get(\u0027kubernetes_tags\u0027, DEFAULT_KUBERNETES_TAGS)"},{"line_number":48,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027docker\u0027}, instance)"},{"line_number":49,"context_line":"        running_containers \u003d {container[\u0027Id\u0027]: container for container in self._get_containers(docker_client)}"},{"line_number":50,"context_line":"        self.gauge(\"container.running_count\", len(running_containers), dimensions\u003ddimensions)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_2de6bbe8","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":23},"in_reply_to":"ba5da102_6ed7d0bf","updated":"2016-11-04 14:34:32.000000000","message":"yes roland that is my bad","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                            container_name \u003d str(name).lstrip(\u0027/\u0027)"},{"line_number":70,"context_line":"                            break"},{"line_number":71,"context_line":"                container_id \u003d container[\u0027Id\u0027]"},{"line_number":72,"context_line":"                container_dimensions[\u0027name\u0027] \u003d container_name if container_name else container_id"},{"line_number":73,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":74,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"},{"line_number":75,"context_line":"                if kubernetes_tags:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_4eaf6c2b","line":72,"range":{"start_line":72,"start_character":85,"end_line":72,"end_character":97},"updated":"2016-11-04 12:59:31.000000000","message":"Could refactor and move this into a private method called _get_container_name.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"368bc769fe7d9c1fb2400fd84c38b9fc0717c0ed","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                            container_name \u003d str(name).lstrip(\u0027/\u0027)"},{"line_number":70,"context_line":"                            break"},{"line_number":71,"context_line":"                container_id \u003d container[\u0027Id\u0027]"},{"line_number":72,"context_line":"                container_dimensions[\u0027name\u0027] \u003d container_name if container_name else container_id"},{"line_number":73,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":74,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"},{"line_number":75,"context_line":"                if kubernetes_tags:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_ca9d360b","line":72,"range":{"start_line":72,"start_character":47,"end_line":72,"end_character":61},"updated":"2016-11-04 04:52:16.000000000","message":"Need to initialize container_name to None","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                            container_name \u003d str(name).lstrip(\u0027/\u0027)"},{"line_number":70,"context_line":"                            break"},{"line_number":71,"context_line":"                container_id \u003d container[\u0027Id\u0027]"},{"line_number":72,"context_line":"                container_dimensions[\u0027name\u0027] \u003d container_name if container_name else container_id"},{"line_number":73,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":74,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"},{"line_number":75,"context_line":"                if kubernetes_tags:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_ad764b04","line":72,"range":{"start_line":72,"start_character":85,"end_line":72,"end_character":97},"in_reply_to":"ba5da102_4eaf6c2b","updated":"2016-11-04 14:34:32.000000000","message":"like that idea","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                # It is possible that the container got stopped between the"},{"line_number":89,"context_line":"                # API call and now"},{"line_number":90,"context_line":"                self.log.info(\"IO error while collecting cgroup metrics, \""},{"line_number":91,"context_line":"                              \"skipping container...\", exc_info\u003derr)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self._prev_system_cpu \u003d self._curr_system_cpu"},{"line_number":94,"context_line":"        self._curr_system_cpu \u003d None"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_ee4da09a","line":91,"updated":"2016-11-04 12:59:31.000000000","message":"Are there any other exceptions that are possible and need to he logged/handled?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                # It is possible that the container got stopped between the"},{"line_number":89,"context_line":"                # API call and now"},{"line_number":90,"context_line":"                self.log.info(\"IO error while collecting cgroup metrics, \""},{"line_number":91,"context_line":"                              \"skipping container...\", exc_info\u003derr)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self._prev_system_cpu \u003d self._curr_system_cpu"},{"line_number":94,"context_line":"        self._curr_system_cpu \u003d None"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_8d50a760","line":91,"in_reply_to":"ba5da102_ee4da09a","updated":"2016-11-04 14:34:32.000000000","message":"might be good to add a catch all just in case.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"368bc769fe7d9c1fb2400fd84c38b9fc0717c0ed","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                              \"skipping container...\", exc_info\u003derr)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self._prev_system_cpu \u003d self._curr_system_cpu"},{"line_number":94,"context_line":"        self._curr_system_cpu \u003d None"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _report_cgroup_cpuacct(self, container_id, container_dimensions):"},{"line_number":97,"context_line":"        stat_file \u003d self._get_cgroup_file(\u0027cpuacct\u0027, container_id, \u0027cpuacct.stat\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_ca429667","line":94,"range":{"start_line":94,"start_character":8,"end_line":94,"end_character":36},"updated":"2016-11-04 04:52:16.000000000","message":"Is this needed?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":91,"context_line":"                              \"skipping container...\", exc_info\u003derr)"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        self._prev_system_cpu \u003d self._curr_system_cpu"},{"line_number":94,"context_line":"        self._curr_system_cpu \u003d None"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def _report_cgroup_cpuacct(self, container_id, container_dimensions):"},{"line_number":97,"context_line":"        stat_file \u003d self._get_cgroup_file(\u0027cpuacct\u0027, container_id, \u0027cpuacct.stat\u0027)"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_2dd07bc9","line":94,"range":{"start_line":94,"start_character":8,"end_line":94,"end_character":36},"in_reply_to":"ba5da102_ca429667","updated":"2016-11-04 14:34:32.000000000","message":"i will need to look","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        container_cpu_delta \u003d float(curr_cpu - prev_cpu)"},{"line_number":144,"context_line":"        if system_cpu_delta \u003e 0 and container_cpu_delta \u003e 0:"},{"line_number":145,"context_line":"            cpu_pct \u003d (container_cpu_delta / system_cpu_delta) * self._cpu_count * 100"},{"line_number":146,"context_line":"            self.gauge(\u0027container.cpu.utilization_perc\u0027, cpu_pct, dimensions\u003dcontainer_dimensions)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def _report_net_metrics(self, container, container_dimensions):"},{"line_number":149,"context_line":"        \"\"\"Find container network metrics by looking at /proc/$PID/net/dev of the container process.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_0e11f45d","line":146,"updated":"2016-11-04 12:59:31.000000000","message":"These few lines above should probably be put into a method. \n\nAlso, I believe this same code has been repeated several times, such as in the libvirt and OVS plugin. Is this something we want to move into a utilities class?","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        container_cpu_delta \u003d float(curr_cpu - prev_cpu)"},{"line_number":144,"context_line":"        if system_cpu_delta \u003e 0 and container_cpu_delta \u003e 0:"},{"line_number":145,"context_line":"            cpu_pct \u003d (container_cpu_delta / system_cpu_delta) * self._cpu_count * 100"},{"line_number":146,"context_line":"            self.gauge(\u0027container.cpu.utilization_perc\u0027, cpu_pct, dimensions\u003dcontainer_dimensions)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    def _report_net_metrics(self, container, container_dimensions):"},{"line_number":149,"context_line":"        \"\"\"Find container network metrics by looking at /proc/$PID/net/dev of the container process.\"\"\""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_ed93e3fe","line":146,"in_reply_to":"ba5da102_0e11f45d","updated":"2016-11-04 14:34:32.000000000","message":"potentially I will have to look","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"c4b0a8f9dbebff27efce22bd4ef71223ac236664","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    # Docker API"},{"line_number":173,"context_line":"    def _get_containers(self, docker_client):"},{"line_number":174,"context_line":"        \"\"\"Gets the list of running containers in Docker.\"\"\""},{"line_number":175,"context_line":"        return docker_client.containers()"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _find_cgroup_filename_pattern(self, container_id):"},{"line_number":178,"context_line":"        # We try with different cgroups so that it works even if only one is properly working"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_290dd237","line":175,"updated":"2016-11-04 12:59:31.000000000","message":"It it is possible to initialize docker_client in the constructor then it would be possible to remove docker_client from the parameter list.","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"4502a6cb2694257dba7f534939724f47d6c5a24c","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    # Docker API"},{"line_number":173,"context_line":"    def _get_containers(self, docker_client):"},{"line_number":174,"context_line":"        \"\"\"Gets the list of running containers in Docker.\"\"\""},{"line_number":175,"context_line":"        return docker_client.containers()"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _find_cgroup_filename_pattern(self, container_id):"},{"line_number":178,"context_line":"        # We try with different cgroups so that it works even if only one is properly working"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5da102_4da3ef4f","line":175,"in_reply_to":"ba5da102_290dd237","updated":"2016-11-04 14:34:32.000000000","message":"no see comment above","commit_id":"96335bd1083352f782432ac49fa61396aaf7dddd"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                container_dimensions[\u0027image\u0027] \u003d container[\u0027Image\u0027]"},{"line_number":67,"context_line":"                container_labels \u003d container[\u0027Labels\u0027]"},{"line_number":68,"context_line":"                if kubernetes_dimensions:"},{"line_number":69,"context_line":"                    container_pod \u003d container_labels.get(\u0027io.kubernetes.pod.name\u0027, \u0027no_pod\u0027)"},{"line_number":70,"context_line":"                    container_namespace \u003d container_labels.get(\u0027io.kubernetes.pod.namespace\u0027, \u0027no_namespace\u0027)"},{"line_number":71,"context_line":"                    container_dimensions[\u0027kubernetes_pod_name\u0027] \u003d container_pod"},{"line_number":72,"context_line":"                    container_dimensions[\u0027kubernetes_namespace\u0027] \u003d container_namespace"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_b15e66e7","line":69,"range":{"start_line":69,"start_character":84,"end_line":69,"end_character":90},"updated":"2016-11-08 17:18:04.000000000","message":"How often will this happen? Should it be documented they can have this value? Or should the dimension not be set?","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        container_name \u003d None"},{"line_number":91,"context_line":"        if container_names:"},{"line_number":92,"context_line":"            for name in container_names:"},{"line_number":93,"context_line":"                # if there is more then one / the name is actually an alias"},{"line_number":94,"context_line":"                if name.count(\u0027/\u0027) \u003c\u003d 1:"},{"line_number":95,"context_line":"                    container_name \u003d str(name).lstrip(\u0027/\u0027)"},{"line_number":96,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_7245b115","line":93,"range":{"start_line":93,"start_character":35,"end_line":93,"end_character":39},"updated":"2016-11-08 17:18:04.000000000","message":"than","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        memory_limit \u003d self._parse_cgroup_value(memory_limit_file, convert\u003dfloat)"},{"line_number":122,"context_line":"        if memory_limit \u003e system_memory_limit:"},{"line_number":123,"context_line":"            memory_limit \u003d float(system_memory_limit)"},{"line_number":124,"context_line":"        used_perc \u003d (((cache_memory + rss_memory + swap_memory) / memory_limit) * 100)"},{"line_number":125,"context_line":"        self.gauge(\u0027container.mem.used_perc\u0027, used_perc, dimensions\u003dcontainer_dimensions)"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    def _report_cgroup_blkio(self, container_id, container_dimensions):"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_31a416a5","line":124,"range":{"start_line":124,"start_character":8,"end_line":124,"end_character":17},"updated":"2016-11-08 17:18:04.000000000","message":"Should you round this to 2 figures after the decimal point?","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                    cols \u003d line.split(\u0027:\u0027, 1)"},{"line_number":163,"context_line":"                    interface_name \u003d str(cols[0]).strip()"},{"line_number":164,"context_line":"                    if interface_name !\u003d \u0027lo\u0027:"},{"line_number":165,"context_line":"                        container_dimensions[\u0027interface\u0027] \u003d interface_name"},{"line_number":166,"context_line":"                        network_values \u003d cols[1].split()"},{"line_number":167,"context_line":"                        self._report_rate_gauge_metric(\"container.net.in_bytes\", long(network_values[0]),"},{"line_number":168,"context_line":"                                                       container_dimensions)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_f1fe1e6a","line":165,"range":{"start_line":165,"start_character":24,"end_line":165,"end_character":44},"updated":"2016-11-08 17:18:04.000000000","message":"I think you need to copy container_dimensions first so it doesn\u0027t get left with a \u0027interface\u0027 entry","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    # Docker API"},{"line_number":176,"context_line":"    def _get_containers(self, docker_client):"},{"line_number":177,"context_line":"        \"\"\"Gets the list of running containers in Docker.\"\"\""},{"line_number":178,"context_line":"        return docker_client.containers()"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def _find_cgroup_filename_pattern(self, container_id):"},{"line_number":181,"context_line":"        # We try with different cgroups so that it works even if only one is properly working"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_92d245ff","line":178,"range":{"start_line":178,"start_character":29,"end_line":178,"end_character":39},"updated":"2016-11-08 17:18:04.000000000","message":"What is exception is thrown if docker is not currently running? Is there one? If so, you should catch it so you can give a decent error message","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        with open(stat_file, \u0027r\u0027) as f:"},{"line_number":280,"context_line":"            return convert(f.read().strip())"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def _parse_cgroup_value_list(self, stat_file, convert\u003dint):"},{"line_number":283,"context_line":"        \"\"\"Parse a cgroup info file containing a list of plain values.\"\"\""},{"line_number":284,"context_line":"        with open(stat_file, \u0027r\u0027) as f:"},{"line_number":285,"context_line":"            return map(convert, f.readlines())"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_f1d1bece","line":282,"range":{"start_line":282,"start_character":8,"end_line":282,"end_character":32},"updated":"2016-11-08 17:18:04.000000000","message":"Not used","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":317,"context_line":"            return True"},{"line_number":318,"context_line":"        return False"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"    def _set_container_pids(self, containers, custom_cgroups\u003dFalse):"},{"line_number":321,"context_line":"        \"\"\"Find all proc paths for running containers.\"\"\""},{"line_number":322,"context_line":"        proc_path \u003d os.path.join(self.docker_root, \u0027proc\u0027)"},{"line_number":323,"context_line":"        pid_dirs \u003d [_dir for _dir in os.listdir(proc_path) if _dir.isdigit()]"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_cdba6023","line":320,"range":{"start_line":320,"start_character":46,"end_line":320,"end_character":60},"updated":"2016-11-08 17:18:04.000000000","message":"Not used","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4fcf91a8fdc8e888cf12243254465c87230f0b7c","unresolved":false,"context_lines":[{"line_number":359,"context_line":"            except Exception as e:"},{"line_number":360,"context_line":"                self.log.warning(\"Cannot parse %s content: %s\" % (path, str(e)))"},{"line_number":361,"context_line":"                continue"},{"line_number":362,"context_line":"        return containers"}],"source_content_type":"text/x-python","patch_set":23,"id":"9a629dbe_f1f37e08","line":362,"range":{"start_line":362,"start_character":8,"end_line":362,"end_character":25},"updated":"2016-11-08 17:18:04.000000000","message":"No need to return containers","commit_id":"32ec1899a095a212d5be42e2251ada9e2dbaa053"}],"requirements.txt":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"8889417090113cec0eeece867e1e23940806f932","unresolved":false,"context_lines":[{"line_number":18,"context_line":"redis\u003e\u003d2.10.0,\u003c\u003d2.10.5"},{"line_number":19,"context_line":"supervisor\u003e\u003d3.1.3,\u003c3.2"},{"line_number":20,"context_line":"tornado\u003e\u003d4.3"},{"line_number":21,"context_line":"docker-py\u003e\u003d1.6.0  # Apache-2.0"}],"source_content_type":"text/plain","patch_set":15,"id":"fa6399be_a708d492","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":9},"updated":"2016-10-12 17:27:45.000000000","message":"This is optional, right? We don\u0027t require libvirt.","commit_id":"0b762a8dfaa4f4ee4bbb67cfd243f965ba604d3b"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"5e8950c88df4a66ea2eae568bec99cc23792f91c","unresolved":false,"context_lines":[{"line_number":18,"context_line":"redis\u003e\u003d2.10.0,\u003c\u003d2.10.5"},{"line_number":19,"context_line":"supervisor\u003e\u003d3.1.3,\u003c3.2"},{"line_number":20,"context_line":"tornado\u003e\u003d4.3"},{"line_number":21,"context_line":"docker-py\u003e\u003d1.6.0  # Apache-2.0"}],"source_content_type":"text/plain","patch_set":17,"id":"fa6399be_b2f5bfcc","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":6},"updated":"2016-10-18 00:53:07.000000000","message":"openstack/requirements has this dependency as docker-py\u003e\u003d1.6.0,\u003c1.8.0. Do we want co copy exactly?","commit_id":"cee64334bc393e8aaa854ffbf8189e1c0d13b52e"}]}
