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
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