Would like support for subdirectories in config folder and patterns folder

Description

I tried to structure logstash in this way:

logstash/

  • patterns/

    • subdir1/

      • pattern1

      • subdir2/

        • pattern

  • conf/

    • confDir1/

      • conf1.conf

      • confDir2/

        • conf2.conf

This does not seem to be supported. If I run logstash with a -f conf then it will only look at the immediate files in conf and not recurse into the subdirectories.

For patterns I can do this and then make my patterns_dir path point to the directory I want, except the patterns directory can only contain files. If I try to point patterns_dir to a directory that contains another directory I get the error:
Permission denied - patterns/subdir1/subdir2

A flat structure is definitely doable but we plan on using a centralized logstash server for many different types of servers and would like to organize the filters and patterns in a directory structure reflecting those different server types.

Activity

Show:
Jordan Sissel
October 11, 2013, 10:58 PM

The -f flag can take a glob, so you can recursively gather all .conf files with: -f conf/*/.conf

Kevin Pearson
October 11, 2013, 11:34 PM
Edited

Thanks, I got an error with what you put but it got me in the right directory. I was able to solve it with

The patterns thing is still an issue though. If you point patterns_dir to a directory that has another directory then it gives a Permission denied. I don't think it is actually a permission problem, I am the owner and chmod 777 for that directory.

Kevin Pearson
October 11, 2013, 11:35 PM

Oh, the comment removes asterixes. You probably had the right one at first too.
Should be:
-f "conf/**/*.conf"

Philippe Weber
February 5, 2014, 10:48 AM

Support done by Jordan

Assignee

Jordan Sissel

Reporter

Kevin Pearson

Labels

Affects versions

Configure