Amazon web services fluentd不';不要给事件贴上正确的标签
我有一个简单的fluentd配置:Amazon web services fluentd不';不要给事件贴上正确的标签,amazon-web-services,nginx,elasticsearch,fluent,fluentd,Amazon Web Services,Nginx,elasticsearch,Fluent,Fluentd,我有一个简单的fluentd配置: <source> type forward </source> <source> type tail path /var/log/nginx/access.log pos_file /var/log/td-agent/nignx-access.log tag nginx.access format nginx </source> <source> type tail
<source>
type forward
</source>
<source>
type tail
path /var/log/nginx/access.log
pos_file /var/log/td-agent/nignx-access.log
tag nginx.access
format nginx
</source>
<source>
type tail
path /var/log/nginx/error.log
pos_file /var/log/td-agent/nginx-error.log
tag nginx.error
format nginx
</source>
打字前进
型尾
path/var/log/nginx/access.log
pos_文件/var/log/td-agent/nignx-access.log
标记nginx.access
格式nginx
型尾
路径/var/log/nginx/error.log
pos_文件/var/log/td-agent/nginx-error.log
标记nginx.error
格式nginx
然后,在源代码后面有相应的
标记。这些日志将发送到AWS上的ElasticSearch实例。问题是,它们出现了,但没有标签。因此,nginx访问日志正确显示,但没有“nginx.access”标记。这会导致问题,因为现在无法对日志进行分类。请将fluentd的空闲时间重复归功于@:
将其包含在匹配标记中:
<match my.logs>
@type elasticsearch
include_tag_key true
tag_key _key
</match>
@类型弹性搜索
包含标记键为真
标记键
在fluentd的懈怠中反复向@致敬:
将其包含在匹配标记中:
<match my.logs>
@type elasticsearch
include_tag_key true
tag_key _key
</match>
@类型弹性搜索
包含标记键为真
标记键