今天主要说一下关于fluentd.config的配置,就是在k8s里的configmap文件。
<source> type tail format json path /home/apps/logs/*.log #日志文件 pos_file /home/apps/logs/*.log.pos #偏移 tag lind #标签,对于 match.logstash_prefix,最后在kinaba的索引配置里体现</source><match lind> @id elasticsearch @type elasticsearch @log_level INFO type_name _doc #只接受_doc host elasticsearch.elk port 9200 include_tag_key true tag_key @log_name logstash_format true logstash_prefix fluentd-${tag} flush_interval 10s</match>
