Hi,
I'm struggling with logstash conf to read from S3 bucket which has the latest date, example structure in S3 bucket as follows:
- apachelogs/web/2021-08-22/
- apachelogs/web/2021-08-23/
- apachelogs/web/2021-08-24/
Hence, my logstash input as follow
input {
s3 {
bucket => "apachelogs"
prefix => "web/%{+YYYY-MM-dd}/"
region => "ap-southeast-1"
access_key_id => "xxxx"
secret_access_key => "xxxx"
sincedb_path => "/tmp/s3.sincedb"
backup_to_dir => "/tmp/logstashed/"
type => "apache"
}
}
However, I kept getting
[INFO ] 2021-08-24 18:04:06.804 [[main]<s3] s3 - No files found in bucket {:prefix=>"apachelogs/web/%{+YYYY-MM-dd}/"}
and interestingly with hardcoded date, it worked -> prefix=>"apachelogs/web/2021-08-24/"}
Appreciate some help here. Thanks.