码迷,mamicode.com
首页 > 数据库 > 详细

grafana+cadvisor+influxdb 使用docker-compose实现监控

时间:2019-09-19 17:52:35      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:内容   otf   数据库   文件   连接数   ice   sys   srv   自己   

//以下内容直接复制到 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实现监控

标签:内容   otf   数据库   文件   连接数   ice   sys   srv   自己   

原文地址:https://blog.51cto.com/13746824/2439356

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!