Docker容器监控cAdvisor
使用docker-compose部署(下述environment内容为结果存储的influxdb的信息):version: '2'services:cadvisor:image: google/cadvisor:latestcontainer_name: cadvisorrestart: unless-stoppedenvironment:storage_driver_host: 192.168.
·
使用docker-compose部署(下述environment内容为结果存储的influxdb的信息):
version: '2'
services:
cadvisor:
image: google/cadvisor:latest
container_name: cadvisor
restart: unless-stopped
environment:
storage_driver_host: 192.168.8.197:8086
storage_driver_db: cadvisor
storage_driver_user: root
storage_driver_password: 123456
command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=192.168.8.197:8086
ports:
- 12345:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
1、启动:docker-compose up -d cadvisor
2、可视化:访问http://主机ip:8080/,显示相关信息
3、验证:docker stats,此命令可查看容器信息
更多推荐
已为社区贡献2条内容
所有评论(0)