Filter 如何在fluentd中添加过滤器

Filter 如何在fluentd中添加过滤器,filter,docker,fluentd,openshift-origin,Filter,Docker,Fluentd,Openshift Origin,我们的fluentd配置如下所示: ## sources @include configs.d/input/docker/*.conf @include configs.d/input/syslog/*.conf ## <label @INGRESS> ## filters @include configs.d/filter/k8s_meta.conf @include configs.d/filter/kibana_transform.conf @include co

我们的fluentd配置如下所示:

## sources
@include configs.d/input/docker/*.conf
@include configs.d/input/syslog/*.conf
##

<label @INGRESS>
## filters
  @include configs.d/filter/k8s_meta.conf
  @include configs.d/filter/kibana_transform.conf
  @include configs.d/filter/k8s_flatten_hash.conf
  @include configs.d/filter/k8s_record_transform.conf
  @include configs.d/filter/syslog_record_transform.conf
##

## matches
  @include configs.d/output/operations.conf
  @include configs.d/output/applications.conf
##
</label>
输入:

一个
fluentd/configs.d
文件夹,其中包含

  • 输入
  • 滤器
  • 输出
在输入中,我们有两个.conf文件,它们定义了我们的源: 这是一个会议

<source>
  @type tail
  @label @INGRESS
  path /var/log/containers/*.log
  pos_file /var/log/es-containers.log.pos
  time_format %Y-%m-%dT%H:%M:%S
  tag kubernetes.*
  format json
  keep_time_key true
  read_from_head true
</source>
因此,这一切都在
@ingres
标签内,并且工作正常。 但现在我们需要在相同的2个源上使用另一个过滤器。这个过滤器还将有一个outputfile(告诉如何处理过滤后的日志)。但是我们只需要这个过滤器,而不是
@ingres
部分(在fluent.conf中)中的其他过滤器

在源文件中添加2个标签,并在
fluent.conf
文件中添加标签是不可能的

那么,我们的解决方案是什么,在与源相同的源上添加独立的过滤器和输出文件,以便每次使用
@ingres
标签

谢谢

是github repo,其中包含我们用于fluentd的源代码