# Filebeat to stream .gz logs to ES/LS

**URL:** <https://discuss.elastic.co/t/filebeat-to-stream-gz-logs-to-es-ls/121081>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 22, 2018, 4:06pm UTC](https://discuss.elastic.co/t/filebeat-to-stream-gz-logs-to-es-ls/121081 "2018-02-22T16:06:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ELK\_GB](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@ELK\_GB](https://discuss.elastic.co/u/ELK_GB)\
**Post date:** [February 22, 2018, 4:06pm UTC](https://discuss.elastic.co/t/filebeat-to-stream-gz-logs-to-es-ls/121081/1 "2018-02-22T16:06:15Z")

</div>

Hi,

So from doing some research on this topic I realized that the answer is always no, not yet.

However, when looking at the elastic website and checking the filebeat configs why would the example be about "excluding" .gz files when using the [exclude\_files](https://www.elastic.co/guide/en/beats/filebeat/current/configuration-filebeat-options.html#exclude-files) setting when it doesn't even read them anyways ?

The only reason im asking is because based on that and as a reader i'm under the impression that Filebeat can read .gz files, when using a wild card in my log path like /var/log/my\_app\_logs/\* or /var/log/my\_app\_logs/\*.gz otherwise why would I exclude them ?

\*\*Filebeat version used is 5.5 and 5.4

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [February 23, 2018, 4:13pm UTC](https://discuss.elastic.co/t/filebeat-to-stream-gz-logs-to-es-ls/121081/2 "2018-02-23T16:13:39Z")

</div>

Theoretically Filebeat can ship can any file. They're just bytes on disk. And Filebeat will read any file, but it will treat the file as if it were plain ascii text (unless a different encoding is specified). And the output will be a bunch of UTF-8 encoded garbage.

For this reason it is necessary to exclude files that are not textual.

---

<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:** [March 23, 2018, 4:13pm UTC](https://discuss.elastic.co/t/filebeat-to-stream-gz-logs-to-es-ls/121081/3 "2018-03-23T16:13:51Z")

</div>

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