是否可以在fluentd S3路径中以某种方式设置%{host}(不是%{hostmane}:它指向本地fluentd服务器):
s3://logs/2018/07/10/web01/misc-20180710-07_1.gz
主机是消息字段"host":"ip-10-78-46-14"
<match ** >
@type s3
s3_bucket logs
s3_region us-west-2
path %Y/%m/%d
time_slice_format %Y%m%d-%H
s3_object_key_format %{path}/%{host}/misc-%{time_slice}_%{index}.%{file_extension}
include_timestamp true
<buffer host,tag,time>
@type file
path /buffers/s3/infra/misc/
timekey 1h # 1 hour partition
timekey_wait 10m
timekey_use_utc true # use utc
chunk_limit_size 256m
</buffer>
<format>
@type json
</format>
</match>
此配置不起作用...
谢谢你, AP