I have a list of subdirectories that are consistent in each directory. Is it possible to limit logstash to only look for those subdirectories and pull data from those? Would something like this work?
filter {
if [type] == "log" {
grok { match => { "path" => "/%{GREEDYDATA}/%{GREEDYDATA}/%{GREEDYDATA}/%{GREEDYDATA:folder}**/subDirectory1"} }
grok { match => { "path" => "/%{GREEDYDATA}/%{GREEDYDATA}/%{GREEDYDATA}/%{GREEDYDATA:folder}**/subDirectory2"} }
grok { match => { "path" => "/%{GREEDYDATA}/%{GREEDYDATA}/%{GREEDYDATA}/%{GREEDYDATA:folder}**/subDirectory3"} }
grok { match => { "path" => "%{GREEDYDATA}/{GREEDYDATA:filename}\log.json"} }
}
}