# Calculate the size of logs in a specific time period

**URL:** <https://discuss.elastic.co/t/calculate-the-size-of-logs-in-a-specific-time-period/342845>\
**Category:** Kibana\
**Created:** [September 12, 2023, 1:52pm UTC](https://discuss.elastic.co/t/calculate-the-size-of-logs-in-a-specific-time-period/342845 "2023-09-12T13:52:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickmannouch](https://avatars.discourse-cdn.com/v4/letter/n/9de053/32.png) [@nickmannouch](https://discuss.elastic.co/u/nickmannouch)\
**Post date:** [September 12, 2023, 1:52pm UTC](https://discuss.elastic.co/t/calculate-the-size-of-logs-in-a-specific-time-period/342845/1 "2023-09-12T13:52:28Z")

</div>

Hi,

We can see that in a specific 12 hour period, we have 1.3 million log entries. We want to see how much disk space was consumed by this. We thought we could just add 'bytes' as a metric to the graph. However, bytes appears to be greyed out.

How could we obtain this information in another fashion? Could we write something in the dev console?

Many thanks in advance.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 12, 2023, 2:47pm UTC](https://discuss.elastic.co/t/calculate-the-size-of-logs-in-a-specific-time-period/342845/2 "2023-09-12T14:47:05Z")

</div>

Hi @nickmannouch Welcome to the community...

What version are you on?

Unfortunately this is harder than it should be...

You can use the Disk Usage API [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-disk-usage.html)

That will show the entire index so you will need to multiply the ratio of your 12 hours of Docs vs Total Docs

You can also simply run

`GET _cat/indices?v&s=store.size:desc`

That will also show the size of the Index on Disk ...  
It will show you the number of Documents  
You can run Discover and get the Number of Documents in 12 hours then do the division.  
Remember if you have are replica make sure to use `store.size` not `pri.store.size`

---

<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:** [October 10, 2023, 2:48pm UTC](https://discuss.elastic.co/t/calculate-the-size-of-logs-in-a-specific-time-period/342845/3 "2023-10-10T14:48:04Z")

</div>

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