I am using Docker Compose on my Mac machine to run the Elasticsearch and Kibana.
After bringing docker compose up, I am able to access both elasticsearch and kibana using their URLs, but Kibana doesn't has default ".kibana" index.
when I run command in Dev tools to see list of indexes, I am seeing only below listed indexes. It doesn't have .kibana.
GET _cat/indices
Output for above command:
green open .monitoring-es-6-2018.03.15 Jd4rZnZIQz-_adEvaQpQcg 1 1 480 14 1.1mb 664kb
green open .monitoring-es-6-2018.03.16 rBGtnqCQQl-rMG6gPnY6KQ 1 1 1613 30 3.5mb 1.7mb
green open .monitoring-kibana-6-2018.03.16 WOcerQJaT16gd6IG1rtv3A 1 1 142 0 324.7kb 183.3kb
NOTE:
When I pulled and ran Elaticsearch & Kibana individually using Docker (docker pull and docker run commands), that time everything works fine. ".kibana" index was also got created and I was able to create index pattern etc.
I am facing issue when I am trying to configure my environment using "docker compose".
I tried using different URL for elasticserch in kibana like "http://localhost:9200" but that too behave same as code posted below.
Working Environment : I am using Mac machine
Updated:
I noticed below warnings in logs:
ibana | {"type":"log","@timestamp":"2018-03-16T03:35:23Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
kibana | {"type":"log","@timestamp":"2018-03-16T03:35:25Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
kibana | {"type":"log","@timestamp":"2018-03-16T03:35:25Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"No living connections"}
kibana | {"type":"log","@timestamp":"2018-03-16T03:35:28Z","tags":["warning","elasticsearch","admin"],"pid":1,"message":"Unable to revive connection: http://elasticsearch:9200/"}
========= docker-compose.yml ===================
Below is my code to run in docker compose.
=====
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.2
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
networks:
- esnet
elasticsearch2:
image: docker.elastic.co/elasticsearch/elasticsearch:6.2.2
container_name: elasticsearch2
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "discovery.zen.ping.unicast.hosts=elasticsearch"
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata2:/usr/share/elasticsearch/data
networks:
- esnet
kibana:
image: docker.elastic.co/kibana/kibana:6.2.2
container_name: kibana
environment:
- "ELASTICSEARCH_URL=http://elasticsearch:9200"
ports:
- 5601:5601
networks:
- esnet
volumes:
esdata1:
driver: local
esdata2:
driver: local
networks:
esnet: