【问题标题】:How to add tags to my fluentd events如何为我的流利事件添加标签
【发布时间】:2016-10-06 14:33:51
【问题描述】:

我写

<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请求添加标签?

【问题讨论】:

    标签: fluentd


    【解决方案1】:
    <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 文件代码。我认为您将能够解决您的问题!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-10
      • 2022-01-02
      • 1970-01-01
      • 1970-01-01
      • 2018-10-24
      相关资源
      最近更新 更多