Regex in S3 input plugin

I neeed to get prefix in S3 input by using Regex.. But there is no support for Regex in the doc..
please find the solution ........

Folders list like this:

logs/20180304/app1/app1.log
logs/23180304/app2/app2.log
logs/20180305/app1/app1.log
logs/23180305/app2/app2.log
logs/20180306/app1/app1.log
logs/23180306/app2/app2.log

my input plugin in Logstash

   s3
       {
         access_key_id => "ABDCWERJKPOKJVB"
         secret_access_key => "4356ytghnfvgbh09oiujsedfvgh0piod"
         region => "as-sfg-2"
         bucket => "new-logs"
         prefix => "log/*/app1/app1.log
       }
 s3
       {
         access_key_id => "ABDCWERJKPOKJVB"
         secret_access_key => "4356ytghnfvgbh09oiujsedfvgh0piod"
         region => "as-sfg-2"
         bucket => "new-logs"
         prefix => "log/*/app1/app2.log
       }

I tried the above prefix But logstash not getting the logs from those prefixe

Can anyone help me on this? Or is there any way to get complete s3 path of a log file in filter?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.