我有一个简单流畅的配置:
<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>
然后,在源之后有适当的<match>
标记。这些日志将被传送到AWS上的ElasticSearch实例。问题是,他们出现了,但没有标签。因此,nginx访问日志显示正常,但不带有'nginx.access‘标记。这会导致问题,因为现在无法对日志进行分类。
发布于 2016-10-18 17:54:52
重复地记在流畅的松懈上:
在match标记中包含此内容:
<match my.logs>
@type elasticsearch
include_tag_key true
tag_key _key
</match>
https://stackoverflow.com/questions/40111896
复制相似问题