Meaning of ** in filter input context


(Nerdstrike) #1

While attempting to sort out my recalcitrant ELK setup, I am finding scattered examples of logstash filter patterns like:

file { path => "/var/log/**/*" }

Does this have any specific meaning?

The problem at hand is getting logstash to recognise logs in nested folders, e.g.

/var/log/service/$year/$month/*


(Shaunak Kashyap) #2

Yes, it means search for files recursively under /var/log/. Alternatively you could use /var/log/service/*/*/* if you want to be a bit more specific in your path.


(Nerdstrike) #3

Thank you Shaunak. I recommend this feature gets a mention in at least one or two places. It's hard to find!


(Shaunak Kashyap) #4

Thanks for your suggestion. I have submitted a pull request to add this to the doc: https://github.com/logstash-plugins/logstash-input-file/pull/84


(system) #5