# Query to find index size per source server?

**URL:** <https://discuss.elastic.co/t/query-to-find-index-size-per-source-server/65915>\
**Category:** Elasticsearch\
**Created:** [November 13, 2016, 5:45pm UTC](https://discuss.elastic.co/t/query-to-find-index-size-per-source-server/65915 "2016-11-13T17:45:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![agonzalez](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@agonzalez](https://discuss.elastic.co/u/agonzalez)\
**Post date:** [November 13, 2016, 5:45pm UTC](https://discuss.elastic.co/t/query-to-find-index-size-per-source-server/65915/1 "2016-11-13T17:45:16Z")

</div>

I have a filebeat index that duplicated size from one day to another to 40GB.

filebeat-2016.11.11 y\_7BZT0kRma7qWDdqBhYXQ 5 1 100973607 0 39.4gb 39.4gb

How can I find for that index the document number/size per source server using beat.hostname or my fields.server property?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 13, 2016, 6:39pm UTC](https://discuss.elastic.co/t/query-to-find-index-size-per-source-server/65915/2 "2016-11-13T18:39:32Z")

</div>

I think you need to add the mapper size plugin for that.

See [https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-size.html](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-size.html)

---

<div class="post-metadata">

**Author:** ![agonzalez](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@agonzalez](https://discuss.elastic.co/u/agonzalez)\
**Post date:** [November 14, 2016, 12:37pm UTC](https://discuss.elastic.co/t/query-to-find-index-size-per-source-server/65915/3 "2016-11-14T12:37:26Z")

</div>

Do i need to reindex all docs after enabling that plugin?

Is there any other solution like If i just want to find and compare the number of documents ( not size ) indexed by source server what would be the query?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 14, 2016, 1:56pm UTC](https://discuss.elastic.co/t/query-to-find-index-size-per-source-server/65915/4 "2016-11-14T13:56:10Z")

</div>

Yes. You need to reindex after this.

But if you need to just count and group by server, just run a terms agg on the server field.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 12, 2016, 1:56pm UTC](https://discuss.elastic.co/t/query-to-find-index-size-per-source-server/65915/5 "2016-12-12T13:56:44Z")

</div>

Closed on December 12, 2016, 1:56pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
