fluent/fluentd-docs-gitbook

filter/grep multiple <and> in one filter

vogtph opened this issue · 1 comments

Fluentd complains about the filter below about using key verb pattern /get/ 2 times. It works if 2 filters are used.

  <filter tail.file.**>
    @type grep
    <and>
      <exclude>
         key verb
         pattern /get/
      </exclude>

      <exclude>
         key $.objectRef.resource
         pattern /namespaces/
      </exclude>
    </and>

    <and>
      <exclude>
         key verb
         pattern /get/
      </exclude>

      <exclude>
         key $.objectRef.resource
         pattern /clusterrolebindings/
      </exclude>
     </and>
  </filter>

Fluentd complains about the filter below about using key verb pattern /get/ 2 times. It works if 2 filters are used.

It seems natural because key verb and key $.objectRef.resource is duplicated apparently.