Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
724 views
in Technique[技术] by (71.8m points)

yaml - Filebeat 6.8 vs 7.x fieldname turn back to default value %{[beat][hostname]}/ %{[filename]}/

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...