Combining Multiple Config Files

One approach is to put all the config files in a single directory and then you call logstash like this:

logstash -f path_to_directory

BUT, in order for this to work, in each config file you need to use types as shown below. Each config file must have a different type or else the config files will step on each other.

input {
 -your normal input settings-
 type => "my_type_1"
}

filter {
 if [type] == "my_type_1"{
  -your normal filter settings-
 }
}

output {
 if [type] == "my_type_1" {
  -your normal output settings-
 }
}

1 Like