config import "filter"

Description

I suggest to support include/import config files into an other config file.

for example:
import {
file => ["file1.conf", "file2.conf", "/etc/logstash/conf.d/*" ]
}

It can make the configs more readable, etc.
Now my logparser config has 4 section and more than 250 lines. I'd like to structure it to separate files (in a conf.d directory or something similar)

Activity

Show:
PeteF
January 26, 2012, 6:52 PM

FWIW, the agent supports "-f /etc/logstash.d/" and will read every config in the dir specified.

I think a basic "include" directive could probably be worked in to the config parser, too.

Jordan Sissel
January 26, 2012, 6:56 PM

Yeah, you can use conf.d-style by passing a directory to the -f flag as Pete mentioned. It also supports wildcards:

-f "/etc/logstash.d/*.conf

Do these support your needs?

Ferenc Csurgai
January 26, 2012, 7:29 PM

Yes, it's enough. (Because it's also works without wildcards, and I can use a directory as parameter)
Sorry for the "spam"

Jordan Sissel
January 26, 2012, 7:31 PM

hah, no worries! All suggestions and ideas are welcome, it's just bonus that it's already solved

Jon Topper
November 30, 2012, 1:21 PM

One caveat here is that because the config parser treats multiple files as a single concatenated file, error messages are incorrect when they contain line numbers.

Assignee

Jordan Sissel

Reporter

Ferenc Csurgai

Labels

Affects versions

Configure