google / cadvisor

Analyzes resource usage and performance characteristics of running containers.
Other
16.92k stars 2.31k forks source link

container_name cadvisor+influxdb #1648

Open dungvtdev opened 7 years ago

dungvtdev commented 7 years ago

I have a virtual machine with 2 docker containers with cadvisor and influxdb as backend. Now I want to find cpu usage percentage of this virtual machine, by get time series data from influxdb instead of cadvisor. But I don't understand cadvisor tags 'container_name' user for. I just use query: SELECT DERIVATIVE(value, 1s) / 1000000000 FROM cpu_usage_total WHERE time > now() - 10m GROUP BY container_name Then I got a list like: { "results": [ { "series": [ { "name": "cpu_usage_total", "tags": { "container_name": "/" }, ......... }, { "name": "cpu_usage_total", "tags": { "container_name": "/docker" }, ....... }, { "name": "cpu_usage_total", "tags": { "container_name": "cadvisor" }, ....... }, { "name": "cpu_usage_total", "tags": { "container_name": "influxdbsrv" }, ....... } ..... ] } Is total cpu usage of the virtual machine the values in block with tags container_name='/' or I must sum all of container '/', '/docker', 'cadvisor'... Please help me

dashpole commented 7 years ago

The total usage is under '/'