Home
Cloud
Big Data
CI
Install
Samples
Java
Ubuntu
Maven
Archive
Docker
|
cAdvisor (Container Advisor)
Notes
Start cAdvisor
Verify cAdvisor
Use cAdvisor
Notes
Please see this page for more information:
https://github.com/google/cadvisor
cAdvisor (Container Advisor) provides information about containers (resource usage and performance characteristics).
Start cAdvisor
$ docker run \ --volume=/:/rootfs:ro \ --volume=/var/run:/var/run:ro \ --volume=/sys:/sys:ro \ --volume=/var/lib/docker/:/var/lib/docker:ro \ --volume=/dev/disk/:/dev/disk:ro \ --publish=8080:8080 \ --detach=true \ --name=cadvisor \ gcr.io/google-containers/cadvisor:latest
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6d6660a89ea4 gcr.io/google-containers/cadvisor:latest "/usr/bin/cadvisor -…" 47 seconds ago Up 45 seconds (healthy) 0.0.0.0:8080->8080/tcp cadvisor
Verify cAdvisor
Get supported API versions:
$ curl http://192.168.2.22:8080/api/
Supported API versions: v1.0,v1.1,v1.2,v1.3,v2.0,v2.1
Get supported request types:
$ curl http://192.168.2.22:8080/api/v2.1
Supported request types: "appmetrics,attributes,events,machine,machinestats,ps,spec,stats,storage,summary,version"
Get "
summary
" endpoint info:
$ curl http://192.168.2.22:8080/api/v2.1/summary | jq '.'
{ "/": { "timestamp": "2020-07-24T13:28:14.133731192Z", "latest_usage": { "cpu": 180, "memory": 14069719040 }, "minute_usage": { "percent_complete": 100, "cpu": { "present": true, "mean": 244, "max": 416, "fifty": 215, "ninety": 344, "ninetyfive": 414 }, "memory": { "present": true, "mean": 14075589427, "max": 14090096640, "fifty": 14076516352, "ninety": 14088928870, "ninetyfive": 14089149030 } } } }
Use cAdvisor
Open a browser and navigate to:
http://192.168.2.22:8080/
© 2010-2022
mti
tek