流利的尾巴插件:尾巴目录中的所有文件 [英] Fluentd tail plugin: tail all files in a directory

查看:868
本文介绍了流利的尾巴插件:尾巴目录中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Fluentd接受CSV文件名进行记录.但这也暗示了文件名的先验知识.

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>

在逻辑上是否等效于-path /var/log/*.log

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

推荐答案

查看tail_ex插件.它允许您在路径中使用文件遍历.

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

这篇关于流利的尾巴插件:尾巴目录中的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆