I have log input coming from multiple sources that I am writing into S3 buckets but now I am wanting to add the source name (machine name) to the S3 filename as a tag so my requirement is a dynamic tag name based on the different machine names that will then be added as a tag.
My current configuration is-
filter {
mutate {
add_field => {
"filepath" => '%{[log][file][path]}'
}
}
grok {
match => ["filepath", "%{WORD:filepath}.log"]
overwrite => ["filepath"]
}
}
output {
s3 {
....
tags => ["%{filepath}"]
}
}
The filenames in S3 is
ls.s3.3791f296-2b0e-4750-a868-a668a5b98e61.2020-03-20T12.32.tag_%{filepath}.part8
So what am I missing and can what I want to do be done with the S3 tag property.
TIA,
Bill