# Any way to compress output before sending to elasticsearch?

**URL:** <https://discuss.elastic.co/t/any-way-to-compress-output-before-sending-to-elasticsearch/48056>\
**Category:** Logstash\
**Created:** [April 21, 2016, 2:14pm UTC](https://discuss.elastic.co/t/any-way-to-compress-output-before-sending-to-elasticsearch/48056 "2016-04-21T14:14:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahin88](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahin88/32/8925_2.png) [@rahin88](https://discuss.elastic.co/u/rahin88)\
**Post date:** [April 21, 2016, 2:14pm UTC](https://discuss.elastic.co/t/any-way-to-compress-output-before-sending-to-elasticsearch/48056/1 "2016-04-21T14:14:47Z")

</div>

Hi All,

Still new to ELK. I have logstash running on my machine generating 1mbps of plain text data(with lot of redundancy of text in logs). Is there a way to encode/compress this output so it consumes less bandwidth and at the same time I need/want to decode this on cloud and feed it my elasticsearch.

Logstash(on my machine low resources)(compressed data) --\> (decode it some how) elasticsearch(on my server)

Logstash(on my machine low resources)(compress data output plugin) --\> (decode data input plugin)(logstash)(on centralized server)(elastic search output plugin)---\> elasticsearch(on my server)

Are there any ways or plugins to address my problem. theme is to save network bandwidth.

Thanks  
Aditya

---

<div class="post-metadata">

**Author:** ![Alberto\_Yoldi](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Alberto\_Yoldi](https://discuss.elastic.co/u/Alberto_Yoldi)\
**Post date:** [April 28, 2016, 11:11am UTC](https://discuss.elastic.co/t/any-way-to-compress-output-before-sending-to-elasticsearch/48056/2 "2016-04-28T11:11:50Z")

</div>

Im also interested! Anyone that could help? Thanks!

---

<div class="post-metadata">

**Author:** ![mnhan](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@mnhan](https://discuss.elastic.co/u/mnhan)\
**Post date:** [April 28, 2016, 4:27pm UTC](https://discuss.elastic.co/t/any-way-to-compress-output-before-sending-to-elasticsearch/48056/3 "2016-04-28T16:27:14Z")

</div>

logstash forwarder (filebeat) has compression capability. Can you use filebeat for compressing the logs to ship to LS sitting on ES box or directly to ES?

---

<div class="post-metadata">

**Author:** ![Alberto\_Yoldi](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Alberto\_Yoldi](https://discuss.elastic.co/u/Alberto_Yoldi)\
**Post date:** [April 29, 2016, 7:01am UTC](https://discuss.elastic.co/t/any-way-to-compress-output-before-sending-to-elasticsearch/48056/4 "2016-04-29T07:01:02Z")

</div>

HI Michael,

Thanks a lot for your answer. I dont have the possibility to install LS on the ES box, but I will explore the filebeat documentation to see if it can send the logfiles already compressed and directly to ES.

Regards,

---

<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:** [July 6, 2017, 5:00am UTC](https://discuss.elastic.co/t/any-way-to-compress-output-before-sending-to-elasticsearch/48056/5 "2017-07-06T05:00:01Z")

</div>


