我发现fluentd-elasticsearch-pluging具有rollover_index
参数,因此我想向我的EFK堆栈中添加过渡功能。
但是,在配置fluentd的输出配置文件并开始fluentd之后,我在fluentd日志中找到了此消息:
parameter 'application_name' in <match **>
1021 @id elasticsearch
1022 @type elasticsearch
1023 @log_level "info"
1024 type_name "flatten"
1025 include_tag_key true
1026 host "elasticsearch-logging"
1027 port 9200
1028 template_file "/etc/fluent/config.d/template.json"
1029 template_name "hc-template"
1030 customize_template {"--appid--":"hc-logs","--index_prefix--":"hc-logs"}
1031 rollover_index true
1032 deflector_alias hot-cold-alias
1033 index_prefix "hc"
1034 application_name hc-es
1035 flatten_hashes true
1036 flatten_hashes_separator "_"
1037 <buffer>
1038 @type "file"
1039 path "/var/log/fluentd-buffers/kubernetes.rollover.buffer"
1040 flush_mode interval
1041 timekey 1h
1042 retry_type exponential_backoff
1043 flush_thread_count 4
1044 flush_interval 5s
1045 retry_timeout 1h
1046 retry_max_interval 30
1047 chunk_limit_size 2M
1048 queue_limit_length 100
1049 overflow_action block
1050 </buffer>
1051 <secondary>
1052 @type "secondary_file"
1053 directory "/tmp/fluentd"
1054 basename "bad-chunk-${chunk_id}"
1055 </secondary>
1056 </match> is not used.
然后创建了转换格式索引hc-hc-template-2019.09.04-000001
,它具有两个别名“ hc-rollover-search”(在template.json中声明)和“ hc-template-current”。
而且fluentd不会将日志发送到该索引。
有没有人可以给我做过渡演示,谢谢。