# File output gzip configuration

**URL:** <https://discuss.elastic.co/t/file-output-gzip-configuration/912>\
**Category:** Logstash\
**Created:** [May 19, 2015, 3:40pm UTC](https://discuss.elastic.co/t/file-output-gzip-configuration/912 "2015-05-19T15:40:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kebbkh](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@kebbkh](https://discuss.elastic.co/u/kebbkh)\
**Post date:** [May 19, 2015, 3:40pm UTC](https://discuss.elastic.co/t/file-output-gzip-configuration/912/1 "2015-05-19T15:40:49Z")

</div>

Hello,

I am trying to use the gzip option with the file output, however, I wanted to know how would I go about looking into the contents of the generated gzip file?

```
file {
            path => "/throttled/output.txt"
            gzip => true
        }

```

When I run it with this configuration setting, I get an output.txt file in the path specified, however when I open the file, I see jumbled up contents. Is there anything that needs to be fixed in my config?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 19, 2015, 5:38pm UTC](https://discuss.elastic.co/t/file-output-gzip-configuration/912/2 "2015-05-19T17:38:37Z")

</div>

Not sure exactly what you mean here. Enabling the gzip option _will_ compress the data and it _will_ look like garbage if opened in e.g. a regular text editor. You have to uncompress the file with gunzip to view it, or use a program like zless which uncompresses and shows the file on the fly so you don't have to store the uncompressed file on disk.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 20, 2015, 8:28am UTC](https://discuss.elastic.co/t/file-output-gzip-configuration/912/3 "2015-05-20T08:28:24Z")

</div>

gzcat too if you are feeling adventurous 😉

---

<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:39am UTC](https://discuss.elastic.co/t/file-output-gzip-configuration/912/4 "2017-07-06T05:39:36Z")

</div>


