# Logstash wildcards in input file path not processing files

**URL:** <https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921>\
**Category:** Logstash\
**Created:** [August 12, 2019, 8:58pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921 "2019-08-12T20:58:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [August 12, 2019, 8:58pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/1 "2019-08-12T20:58:57Z")

</div>

Hi, i have a logstash configuration like this:

```
file {
         path => "/opt/audit_logs_modsec/xx/*/*/*"
    # path => "/opt/audit_logs_modsec/xx/20171231/20171231-2358/*"
         sincedb_path => "/dev/null"
        start_position => "beginning"
        type => mod_security

        codec => multiline {
          charset => "US-ASCII"
          pattern => "^--[a-fA-F0-9]{8}-Z--$"
          negate => true
          what => previous
        }
      }
    }

```

logstash starts but never reads any file  
if i uncomment the line:

`# path => "/opt/audit_logs_modsec/xx/20171231/20171231-2358/*"`

and comment the:

`path => "/opt/audit_logs_modsec/xx/*/*/*"`

it loads data.

What am i missing?

regards

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 12, 2019, 9:05pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/2 "2019-08-12T21:05:04Z")

</div>

Please edit your post. Select the text of the configuration and click on \</\> in the toolbar above the edit pane. In the preview pane you should see the text change

```
    to be
like this

```

Instead of # and \_ and maybe \* getting consumed as markup.

---

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [August 13, 2019, 12:15pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/3 "2019-08-13T12:15:47Z")

</div>

Thanks, let me see if its ok now  
regards

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 13, 2019, 1:13pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/4 "2019-08-13T13:13:25Z")

</div>

Can you try

```
path => "/opt/audit_logs_modsec/xx/**/*"

```

which should do a recursive search under xx. Some folks have reported an [issue](https://github.com/logstash-plugins/logstash-input-file/issues/241) with deep globs.

---

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [August 13, 2019, 3:24pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/5 "2019-08-13T15:24:41Z")

</div>

Thanks Badger, i tryed it on your suggestion but i does not work.

if instead of  
`path => "/opt/audit_logs_modsec/xx/20171231/20171231-2358/*"`

if i put:  
`path => "/opt/audit_logs_modsec/xx/20171231/*/*"`

it works and loads files. It seems to be having trouble when there are too many files.

regards

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 13, 2019, 3:27pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/6 "2019-08-13T15:27:12Z")

</div>

Well, in tail mode, the default limit is that it will only tail 4095 files. Does read mode fit your use case?

---

<div class="post-metadata">

**Author:** ![mtudisco](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mtudisco](https://discuss.elastic.co/u/mtudisco)\
**Post date:** [August 13, 2019, 3:32pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/7 "2019-08-13T15:32:44Z")

</div>

Thanks Badger, it has to be with that limit you mention

```
[root@elksrv conf.d]# find /opt/audit_logs_modsec/xx/20171231/*/* | wc -l
3756
[root@elksrv conf.d]# find /opt/audit_logs_modsec/xx/*/*/* | wc -l
-bash: /usr/bin/find: Argument list too long
0

```

This is just a lab, in real configuration i'll be reading with filebeats so i wont have that problem.

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:** [September 10, 2019, 3:33pm UTC](https://discuss.elastic.co/t/logstash-wildcards-in-input-file-path-not-processing-files/194921/8 "2019-09-10T15:33:00Z")

</div>

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