Monitor Docker Application CAdvisor
MonitorDockerApplicationCAdvisor
CAdvisor(ContainerAdvisor)
SetUpasimpleSingleCadvisor
HereismyMakefile
PORT=6080
IMAGE=google/cadvisor
TAG=latest
NAME=cadvisor-service-$(PORT)
run:
dockerrun\
--volume=/:/rootfs:ro\
--volume=/var/run:/var/run:rw\
--volume=/sys:/sys:ro\
--volume=/var/lib/docker/:/var/lib/docker:ro\
--privileged=true\
-p$(PORT):8080\
--detach=true\
--name$(NAME)$(IMAGE):$(TAG)
clean:
dockerstop${NAME}
dockerrm${NAME}
HereismyREADME.md
###HowtoStarttheService
>makerunPORT=6080
Monitorallthedockerapplications
http://localhost:6080/containers/docker
MonitorthehostMachine
http://localhost:6080/containers/
RESTAPI
https://github.com/google/cadvisor/blob/master/docs/api.md
GOClient
https://github.com/google/cadvisor/tree/master/client
References:
https://github.com/google/cadvisor
https://blog.csdn.net/felix_yujing/article/details/71680290
https://blog.einverne.info/post/2018/03/cadvisor.html