# Unable exclude files

**URL:** <https://discuss.elastic.co/t/unable-exclude-files/174704>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 1, 2019, 4:27am UTC](https://discuss.elastic.co/t/unable-exclude-files/174704 "2019-04-01T04:27:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yagami23](https://avatars.discourse-cdn.com/v4/letter/y/e19adc/32.png) [@yagami23](https://discuss.elastic.co/u/yagami23)\
**Post date:** [April 1, 2019, 4:27am UTC](https://discuss.elastic.co/t/unable-exclude-files/174704/1 "2019-04-01T04:27:22Z")

</div>

Hi, i using Filebeat 6.5.4, below is my filebeat content, the problem is those path stated in the "exclude files" are not being ignore, the filebeat still pick up the files under those path, any advise ?

/opt/apps/logs/cron/ _/_.log. \*  
/opt/apps/logs/tcollector/tcollector.log  
/opt/apps/logs/wlstats/wlstats- \* . \*  
/opt/apps/logs/\*/weblogic/ \*.log

=============================================================

filebeat.inputs:  
-type: log  
enabled: true  
paths:  
-/opt/apps/logs/_/ \* / \* .log  
-/opt/apps/logs/_/ \* / \* . log. \*  
-/opt/apps/logs/_/ \* / \* / \* . log  
-/opt/apps/logs/_/ \* / \* / \* . log.\*  
-/opt/apps/logs/_/ \* / \* / \* / \* .log  
-/opt/apps/logs/_/ \* / \* / \* / \* .log.\*

exclude\_files: ['.gz$', '.zip$', '.tar$' , '.tgz$' , '.lck$', '.bz2$', '/opt/apps/logs/cron/\* /_.log._ '/opt/apps/logs/\*/weblogic/ \*.log']  
fields:  
env: prod  
tail\_files: true  
tags: ["websys","weblogic"]

setup.kibana:

output.logstash:  
hosts: ["abc1:5044","def2:5044","ghi3:5044"]  
loadbalance: true

logging.level: info  
logging.to\_files: true  
logging.files:  
path: /opt/apps/filebeat/logs  
name: filebeat-logs  
keepfiles: 7

processors:

- add\_host\_metadata: ~
- add\_cloud\_metadata: ~

---

<div class="post-metadata">

**Author:** ![yagami23](https://avatars.discourse-cdn.com/v4/letter/y/e19adc/32.png) [@yagami23](https://discuss.elastic.co/u/yagami23)\
**Post date:** [April 2, 2019, 12:40am UTC](https://discuss.elastic.co/t/unable-exclude-files/174704/2 "2019-04-02T00:40:30Z")

</div>

much appreciate if any help/advise

---

<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:** [April 2, 2019, 3:34am UTC](https://discuss.elastic.co/t/unable-exclude-files/174704/3 "2019-04-02T03:34:33Z")

</div>

Please don't post pictures of text, they are difficult to read and some people may not be even able to see them 🙂

Please also format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

---

<div class="post-metadata">

**Author:** ![yagami23](https://avatars.discourse-cdn.com/v4/letter/y/e19adc/32.png) [@yagami23](https://discuss.elastic.co/u/yagami23)\
**Post date:** [April 2, 2019, 6:13am UTC](https://discuss.elastic.co/t/unable-exclude-files/174704/4 "2019-04-02T06:13:02Z")

</div>

noted, thanks

---

<div class="post-metadata">

**Author:** ![yagami23](https://avatars.discourse-cdn.com/v4/letter/y/e19adc/32.png) [@yagami23](https://discuss.elastic.co/u/yagami23)\
**Post date:** [April 4, 2019, 8:08am UTC](https://discuss.elastic.co/t/unable-exclude-files/174704/5 "2019-04-04T08:08:36Z")

</div>

the "exclude files" option will accept path with wildcard ?

eg. '/opt/apps/logs/\*/weblogic/ \*.log'

---

<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:** [May 2, 2019, 8:09am UTC](https://discuss.elastic.co/t/unable-exclude-files/174704/6 "2019-05-02T08:09:17Z")

</div>

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