Hi
I'm new to logstash...
I'm using logstash to stream logfiles from AWS MSK Kafka to AWS S3 bucket.
I FAIL setting the output filename inside the bucket.
I was able to set the folder that will hold the output file.
here's my logstash.cohfig file
input {
kafka {
bootstrap_servers => "${FILEBEAT_KAFKA_HOSTS}"
topics => ["${TOPIC_PROVIDED_BY_ECS}"]
tags => "${TOPIC_PROVIDED_BY_ECS}"
}
}
output {
s3 {
bucket => "${DESTINATION_NAME}"
size_file => "${FILE_SIZE_IN_BYTES}"
region => "${DESTINATION_CHARACTERISTIC_NAME}"
prefix => "${TOPIC_PROVIDED_BY_ECS}/"
}
}
I read in logstash docs that the output file name will consist (among other) from the "tags" value:
section "S3 output file"
in S3 output plugin | Logstash Reference [7.11] | Elastic
I tried using:
tags => "{TOPIC_PROVIDED_BY_ECS}"
tags => ["{TOPIC_PROVIDED_BY_ECS}"]
tags => ["justAname"]
But It did not help.
My goal is that the file name will be part of the output file name
E.G when TOPIC_PROVIDED_BY_ECS=PINKFLOYD
Then the file name will be something like:
ls.s3.0de8cfe6290-8fab-4691-910c-c4befed0da5c.2021-02-11T12.30.PINKFLOYD.part81.txt
Prefaerable with more readable date:
ls.s3.0d8cfe6290-8fab-4691-910c-c4befed0da5c.2021-02-11_12-31-16-323.PINKFLOYD.part81.txt
Any Ideas ?