如何为我的流利事件添加标签

How to add tags to my fluentd events

我写

<source>
  @type tail
  format nginx
  path /home/work/opt/nginx/var/log/access.log
  tag nginx.access
</source>

在我的 fluent.conf 文件中并匹配标准输出,但是当我对我的网站进行 post 调用时,nginx 将访问记录到它的日志中,但是 fluentd_ui 建议

 [warn]: no patterns matched tag="nginx.access"

如何为我的 http 请求添加标签?

<source>
   @type tail
   path /var/log/nginx/access.log
   pos_file /var/log/access.log.pos
   tag apache.access
   format nginx
</source>

<match apache.access>
   @type stdout
</match>

试试 运行 这个 conf 文件代码。我想你一定能解决你的问题!!