Fluentd tail plugin: tail all files in a directory

与世无争的帅哥 提交于 2019-12-25 04:03:12

问题


Fluentd accepts CSV filenames to log. But that too implies a prior knowledge of file-names.

<source>
  type tail
  path /var/log/nginx/*.log
  tag logging
  format /^(?<time>.+) \[(?<level>[^\]]+)\] *(?<message>.*)$/
  time_format %Y/%m/%d %H:%M:%S
</source>

Is there an option or a hack to do something logically equivalent to- path /var/log/*.log


回答1:


Check out the tail_ex plugin. It allows you to use file globbing in the path.



来源:https://stackoverflow.com/questions/21703413/fluentd-tail-plugin-tail-all-files-in-a-directory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!