# How to calculate the filesize in logstash

**URL:** <https://discuss.elastic.co/t/how-to-calculate-the-filesize-in-logstash/95379>\
**Category:** Logstash\
**Created:** [August 1, 2017, 4:34pm UTC](https://discuss.elastic.co/t/how-to-calculate-the-filesize-in-logstash/95379 "2017-08-01T16:34:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mhgeay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mhgeay/32/21365_2.png) [@mhgeay](https://discuss.elastic.co/u/mhgeay)\
**Post date:** [August 22, 2017, 1:23pm UTC](https://discuss.elastic.co/t/how-to-calculate-the-filesize-in-logstash/95379/2 "2017-08-22T13:23:59Z")

</div>

Hello sudi,

For me you have 2 options :  
You have the logstash solution (do the multiplication by logstash) : you should use the Ruby plugin as recommended by @magnusbaeck on this [topic](https://discuss.elastic.co/t/field-value-calculation-conversions-in-logstash-filter-plugin/42147).

Or (it's better for me), try to use Kibana visualisation to do the operation, it's more flexible to get raw data and manipulate it trough Kibana (you may use in the future).

Hope it's help you !

---

_[View the full topic](https://discuss.elastic.co/t/how-to-calculate-the-filesize-in-logstash/95379)._
