CIG介绍
- CAdvisor 是一个容器资源监控工具
- InfluxDB 是一个存储数据工具
- Grafana 是图表展示数据工具
1.创建 cig 文件夹和 docker-compose.yml 文件
mkdir cig && cd cig
vi docker-compose.yml
2.复制以下内容到 docker-compose.yml 文件中
注意不要动任何内容,yml文件格式要求非常严格
version: '3.1'
volumes:
grafana_data: {}
services:
influxdb:
image: tutum/influxdb:0.9
restart: always
environment:
- PRE_CREATE_DB=cadvisor
volumes:
- ./data/influxdb:/data
ports:
- "8083:8083"
- "8086:8086"
cadvisor:
image: "google/cadvisor"
links:
- influxdb:influxsrv
command: -storage_driver=influxdb -storage_driver_db=cadvisor -storage_driver_host=influxsrv:8086
restart: always
ports:
- "8080:8080"
volumes:
- /:/rootfs:ro