lball
1/20/2017 - 5:58 PM

Docker compose file for monitoring/logging services

Docker compose file for monitoring/logging services

version: '2'

services:
 elasticsearch:
  image: elasticsearch
  container_name: elasticsearch
  ports:
    - "9200:9200"
    - "9300:9300"
  restart: always

 kibana:
   image: kibana
   container_name: kibana
   ports:
     - "5601:5601"
   links:
     - elasticsearch:elasticsearch
#   volumes:
#     - ./kibana/config/:/opt/kibana/config/
   restart: always

 influxdbData:
  image: tianon/true
  container_name: influxdbData
  volumes:
    - ./data/influxdb:/var/lib/influxdb

 influxdb:
   image: influxdb
  container_name: influxdb
  restart: always
  environment:
    - INFLUXDB_NAME=cadvisor
    - PRE_CREATE_DB="cadvisor"
    - INFLUXDB_CONTINUOUS_QUERIES_LOG_ENABLED=false
  ports:
    - "8083:8083"
    - "8086:8086"
  expose:
    - "8090"
    - "8099"
  volumes_from:
    - "influxdbData"

 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