I am using filebeat version 6.8 is fine with prefix path in logstash file config:
s3 {
bucket => "${X_S3_BUCKET}"
#prefix => "${X_S3_FOLDER}/%{tags}/%{+YYYY}-%{+MM}-%{+dd}-%{+HH}/"
prefix => "${X_S3_FOLDER}/%{[fields][apisource]}/%{+YYYY}-%{+MM}-%{+dd}-%{+HH}/%{[beat][hostname]}/%{[filename]}/"
}
the prefix name will show like this: /api/service-A/2021-01-08-07//service-A.log/file_sample.txt
But in filebeat 7x version: the prefix is not correct such as the value as version 6.8:
New prefix path: /api/service-A/2021-01-08-07/%{[beat][hostname]}/%{[filename]}/file_sample.txt
Please help me to define fields /%{[beat][hostname]}/%{[filename]} back to value in old version. Thank you!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…