# Calculating log size

**URL:** <https://discuss.elastic.co/t/calculating-log-size/371739>\
**Category:** Elastic Agent\
**Created:** [December 10, 2024, 9:26am UTC](https://discuss.elastic.co/t/calculating-log-size/371739 "2024-12-10T09:26:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snow/32/139864_2.png) [@Snow](https://discuss.elastic.co/u/Snow)\
**Post date:** [December 10, 2024, 9:26am UTC](https://discuss.elastic.co/t/calculating-log-size/371739/1 "2024-12-10T09:26:19Z")

</div>

Hi,

1. How to calculate size of logs generated by elastic defend integration in kibana portal?
2. also need to calculate, sum of data collected by agents per log type.
3. which field (es field name) will have size of event ? if not is there any work around to fetch the size of an event/log entry(using kibana)

---

<div class="post-metadata">

**Author:** ![Snow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snow/32/139864_2.png) [@Snow](https://discuss.elastic.co/u/Snow)\
**Post date:** [December 10, 2024, 11:51am UTC](https://discuss.elastic.co/t/calculating-log-size/371739/2 "2024-12-10T11:51:48Z")

</div>

can anyone help? @stephenb @Christian_Dahlqvist

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 10, 2024, 12:04pm UTC](https://discuss.elastic.co/t/calculating-log-size/371739/3 "2024-12-10T12:04:27Z")

</div>

This is a community forum manned by volunteers, so it is considered quite rude to ping people who are not already involved in the thread. If you have not received any response in 2-3 business days, excluding weekends, it is generally OK to bump the thread.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 10, 2024, 4:16pm UTC](https://discuss.elastic.co/t/calculating-log-size/371739/4 "2024-12-10T16:16:57Z")

</div>

The size of the event is by default not indexed or stored so you need to install the [mapper size plugin](https://www.elastic.co/guide/en/elasticsearch/plugins/current/mapper-size.html). This adds a `_size` metadata field to new data that you can query or run aggregations over in Kibana.

---

<div class="post-metadata">

**Author:** ![Snow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snow/32/139864_2.png) [@Snow](https://discuss.elastic.co/u/Snow)\
**Post date:** [December 12, 2024, 12:55pm UTC](https://discuss.elastic.co/t/calculating-log-size/371739/5 "2024-12-12T12:55:39Z")

</div>

Sorry for tagging

---

<div class="post-metadata">

**Author:** ![Snow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/snow/32/139864_2.png) [@Snow](https://discuss.elastic.co/u/Snow)\
**Post date:** [December 12, 2024, 12:56pm UTC](https://discuss.elastic.co/t/calculating-log-size/371739/6 "2024-12-12T12:56:39Z")

</div>

Thank you for the solution
