Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 dynamic folder naming in yyyy/mm/dd #194

Open
jaeniale-fd opened this issue Jan 15, 2020 · 3 comments
Open

S3 dynamic folder naming in yyyy/mm/dd #194

jaeniale-fd opened this issue Jan 15, 2020 · 3 comments

Comments

@jaeniale-fd
Copy link

I am using Logstash with the s3 input plugin to copy and rename incoming files.
I want to use the time when logstash picks up the file as a prefix of the new filename.

  • Version: 7.5.1
  • Operating System: Mac / Linux Docker
  • Config File:
input {
  s3 {
    access_key_id => "some_key"
    secret_access_key => "some_access_key"
    region => "some_region"
    bucket => "mybucket"
    interval => "10"
    sincedb_path => "/tmp/sincedb_something"
    backup_add_prefix =>'%{+yyyy.MM.dd.HH}'
    backup_to_bucket => "mybucket"
    additional_settings => {
      force_path_style => true
      follow_redirects => false
                }
  }
}

the current result is:

test.txt is coming in, logstash picks it up and puts it in the same folder as %{+yyyy.MM.dd.HH}test.txt

Is there a way to make backup_add_prefix use the current date?

@TarunChillara
Copy link

I am facing a similar issue. Can someone respond to this?

@karenzone
Copy link
Contributor

@robbavey @colinsurprenant Will you take a look, please? Could this be a docs issue?

@robbavey
Copy link
Contributor

@karenzone Not a docs issue - the backup_add_prefix setting currently does not support dynamic substitution.

I've added the enhancement label, this looks like a useful feature for this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants