S3 dynamic date prefix in folder name by using current date as backup_add_prefix

So what i want to do is use Logstash to rename incoming files in a s3 bucket.

I run it via docker and use the following logstash.conf

input {
s3 {
access_key_id => "some_key"
secret_access_key => "some_secret"
region => "some_region"
bucket => "mybucket"
interval => "10"
sincedb_path => "/tmp/sincedb_something"
backup_add_prefix =>'%{+YYYY.MM.dd}/'
backup_to_bucket => "mybucket"
additional_settings => {
force_path_style => true
follow_redirects => false
}
}
}

Basically i want backup_add_prefix =>'%{+YYYY.MM.dd}/' to be the current date, so that logstash builds a structure where incoming files a put into date folders.
The syntax does not work though. Is there a way to make backup_add_prefix a changing date?

No, the code uses string interpolation to prefix the name. It does not sprintf it.

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