//以下内容直接复制到 docker-compose.yml 文件中。执行命令docker-compose up -d
之后访问 http://ip:3000 剩下的之后的测试连接数据库和监控自己百度
创新互联建站专注于网站建设|成都网站维护|优化|托管以及网络推广,积累了大量的网站设计与制作经验,为许多企业提供了网站定制设计服务,案例作品覆盖成都混凝土搅拌机等行业。能根据企业所处的行业与销售的产品,结合品牌形象的塑造,量身设计品质网站。
version: '3'
services:
influxdb:
image: tutum/influxdb:0.9
container_name: influxdb
restart: always
environment:
- PRE_CREATE_DB=cadvisor
ports: - "8083:8083"
- "8086:8086"
expose: - "8090"
- "8099"
volumes: - influxdbData:/data
cadvisor:
image: google/cadvisor
container_name: 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
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
grafana:
image: grafana/grafana
container_name: grafana
restart: always
links: - influxdb:influxsrv
ports: - "3000:3000"
environment: - HTTP_USER=admin
- HTTP_PASS=admin
- INFLUXDB_HOST=influxsrv
- INFLUXDB_PORT=8086
- INFLUXDB_NAME=cadvisor
- INFLUXDB_USER=root
- INFLUXDB_PASS=root
volumes:
influxdbData:
网站栏目:grafana+cadvisor+influxdb使用docker-compose实现监控
文章链接:
http://njwzjz.com/article/jjhhge.html