ELK 5.2 has arrived and there are some nice additions. Please find below a complete docker-compose file that let’s you quickly play with the latest versions of elastic search, kibana and a few additional tools used to monitor the system.

Services:

  • Cerebro on port 9000 to check the status of elastic search nodes
  • Portainer on port 9001 to check the container status
  • Elastic Search on port 9200
  • Kibana on port 5601
  • MonitorDocker container to keep the history of the states of your containers
  • ElasticSupervisor container to keep the history of the growth of your cluster data
version: '2'
services:

##############################
  portainer:
    image: portainer/portainer:1.11.4
    container_name: portainer
    ports:
      - 9001:9000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

##############################
  monitordocker:
    image: snuids/monitordocker:v0.3
    container_name: monitordocker
    links:
      - esnode1
    environment:
      - ELASTIC_ADDRESS=esnode1:9200
      - PYTHONUNBUFFERED=0
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always

##############################
  elasticsupervisor:
    image: snuids/elasticsupervisor:v0.2e
    container_name: elasticsupervisor
    links:
      - esnode1
    environment:
      - ELASTIC_ADDRESS=esnode1:9200
      - PYTHONUNBUFFERED=0
    restart: always

##############################
  cerebro:
    image: snuids/cerebro:v0.5.1
    container_name: cerebro
    ports:
      - 9000:9000
    links:
      - esnode1

##############################
  esnode1:
    image: elasticsearch:5.2.2
    ports:
      - "9200:9200"
      - "9300:9300"
    container_name: esnode1
    privileged: true


##############################
  kibana:
    image: snuids/kibana5withextravisus:v5.2.2a
    ports:
      - "5601:5601"
    environment:
      - ELASTICSEARCH_URL=http://esnode1:9200
    container_name: kibana
    links:
      - esnode1