Docker + ELK堆栈占用了更多的空间

所以我有一个docker撰写文件,看起来像这样

elasticsearch: image: elasticsearch:latest command: elasticsearch volumes: - ./elasticsearch/data:/usr/share/elasticsearch/data - ./elasticsearch/config:/usr/share/elasticsearch/config - ./elasticsearch/logs:/usr/share/elasticsearch/logs ports: - "9200:9200" - "9300:9300" restart: always environment: - ES_HEAP_SIZE=1g logstash: build: logstash/ command: logstash -f /config/logstash.conf volumes: - ./logstash/config:/config ports: - "5044:5044" links: - elasticsearch environment: - LS_HEAP_SIZE=512m kibana: build: kibana/ volumes: - ./kibana/config/:/opt/kibana/config/ ports: - "5601:5601" links: - elasticsearch 

当检查索引大小/磁盘使用情况时,似乎有一些偏差。

  [root@~]# curl 'localhost:9200/_cat/indices?v' health status index pri rep docs.count docs.deleted store.size pri.store.size yellow open filebeat-2016.11.17 5 1 3042279 0 1.7gb 1.7gb yellow open filebeat-2016.11.14 5 1 3350057 0 2.1gb 2.1gb yellow open .kibana 1 1 3 0 16.1kb 16.1kb yellow open filebeat-2016.11.16 5 1 1716748 0 972.7mb 972.7mb yellow open filebeat-2016.11.15 5 1 2126918 0 1.5gb 1.5gb 

奇怪的是,这应该占据大约6.3GB的空间+ ELK的图像,我们将以1GB高球。 同时磁盘空间有点接近12 – 13GB。

每天我都运行一个自定义的python脚本,通过CURL调用ElasticSearch来删除最老的索引。

我也注意到,在做一个du -h的时候,索引的ES大小与du -h的报告有一个小小的偏差:例子 –

 2.2GB /usr/share/docker/elasticsearch/data/elasticsearch/nodes/0/indices/filebeat-2016.11.14 

我正在使用默认的logstash模板,它似乎不匹配我的filebeatconfiguration,这可能是有助于高于平均日志大小。 有人可以帮助解释还有什么可能会泄漏到文件系统和吃掉空间?

谢谢