elasticsearch不保留数据,docker编写

btqmn9zl  于 2021-06-15  发布在  ElasticSearch
关注(0)|答案(1)|浏览(438)

我有这样的配置,我希望数据是持久的重新启动,但权利不它没有发生,一切都很好,但当我把麋鹿下来,它开始空和所有的 Jmeter 盘也丢失了。
怎么了?

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'

提前谢谢

sf6xfgos

sf6xfgos1#

对于ElasticSearch,我认为需要挂载的容器路径是“/usr/share/elasticsearch/data”,而不是“/root/elastickibana/data”。至少在我的舵图中是这样的,docker compose应该不会因为我使用的是同一个图像而有所不同。

相关问题