Reputation: 355
I have this configuration, I'd like the data to be persistent among reboots but right no it is not happening, everything works fine but when I bring the ELK down and up it starts empty and all the dashboards are also lost.
What's wrong?
version: '3.3'
services:
logstash:
container_name: logstash
image: docker.elastic.co/logstash/logstash:6.7.0
command: bash -c 'bin/logstash -e "input { http { port => 5044 } } filter { split {} csv { separator => \",\" columns => [\"Job\", \"BuildId\", \"Start\", \"Start_date\", \"Start_time\", \"Stop_time\", \"Stop_date\", \"Stop_time\", \"Execution_time\", \"Queue_time\", \"Executor\", \"Result\", \"Parent\", \"ChangeId\", \"Repo\", \"User\"] convert => { \"Start_time\" => \"date\" \"Stop_time\" => \"date\" } } mutate { convert => { \"Execution_time\" => \"float\" \"Queue_time\" => \"float\"}} date { match => [ \"Start time\", \"yyyy-MM-dd HH:mm:ss\" ] } } output { elasticsearch { hosts => [\"elasticsearch:9200\"] index => \"job-executions\" } }"'
networks:
- elastic-net
ports:
- 5044:5044
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:6.7.0
environment:
- cluster.name=docker-cluster
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata01:/root/elasticKibana/data
networks:
- elastic-net
ports:
- "9200:9200"
kibana:
container_name: kibana
image: docker.elastic.co/kibana/kibana:6.7.0
networks:
- elastic-net
driver: bridge
volumes:
esdata01:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/root/elasticKibana/data'
Thanks in advance
Upvotes: 1
Views: 1896
Reputation: 1648
For Elastic search i think the container PATH you need to mount is "/usr/share/elasticsearch/data" rather "/root/elasticKibana/data". At least that's the case in my helm chart and docker-compose should not be different as I am using same Image.
Upvotes: 2