# LSF excluding binaries or specific file types

**URL:** <https://discuss.elastic.co/t/lsf-excluding-binaries-or-specific-file-types/32404>\
**Category:** Logstash\
**Created:** [October 16, 2015, 6:22pm UTC](https://discuss.elastic.co/t/lsf-excluding-binaries-or-specific-file-types/32404 "2015-10-16T18:22:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ktella](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@ktella](https://discuss.elastic.co/u/ktella)\
**Post date:** [October 16, 2015, 6:22pm UTC](https://discuss.elastic.co/t/lsf-excluding-binaries-or-specific-file-types/32404/1 "2015-10-16T18:22:28Z")

</div>

Friends,

I have a log file in my App server as below and LSF is shipping well.  
/opt/jboss-eap/server/xxxxxxxxxx/log/localhost\_access\_log.2015-10-16.log

We have a log archiving script which archives the old files with gz extension to /localhost\_access\_log.2015-10-14.log.gz

How do i make LSF not to read those binary files.  
I couldn't get it working as per below blog.

[https://blog.vladionescu.com/excluding-from-a-path-glob/](https://blog.vladionescu.com/excluding-from-a-path-glob/)

"files": [  
# An array of hashes. Each hash tells what paths to watch and  
# what fields to annotate on events from those paths.  
{  
"paths": ["/opt/jboss-eap/server/XXXXXX\*/log/localhost\_access\_log\*.log"],  
"fields": { "type": "accesslogs" }  
}  
]

---

<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:** [October 19, 2015, 6:16am UTC](https://discuss.elastic.co/t/lsf-excluding-binaries-or-specific-file-types/32404/2 "2015-10-19T06:16:28Z")

</div>

If all your log files end with .log and are compressed to .log.gz then just specifying \*.log as the filename pattern will exclude the compressed files. If you get other results please post (relevant snippets of) the LSF log file.

---

<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:26am UTC](https://discuss.elastic.co/t/lsf-excluding-binaries-or-specific-file-types/32404/3 "2017-07-06T05:26:13Z")

</div>

Closed on July 6, 2017, 5:26am UTC


