Skip to content
FURUHASHI Sadayuki edited this page Nov 2, 2013 · 32 revisions

Filter/Copy syntax and nested match

We have several ideas to go. We need feedback!

Ideas

Idea 1: <filter> syntax

<source>
  type forward
</source>

<filter **>
  type copy

  # real-time aggregation
  <filter>
    type groupcounter
  </filter>
 
  <match>
    type forward
  </match>
</filter>

# archive
<match **>
  type s3
</match>

Idea 2: <copy> syntax instead of <filter>

<source>
  type forward
</source>

# real-time aggregation
<copy **>
  type groupcounter
  <match>
    type forward
  </match>
</copy>

# archive
<match **>
  type s3
</match>

Other examples

Idea 1: <filter> syntax

<source>
  type forward
  # only forward has copy to groupcounter + forward

  <filter>
    type copy

    <filter>
      type groupcounter
    </filter>
 
    <match>
      type forward
    </match>
  </filter>
</source>

<source>
  type http
  # http goes to s3 directly
</source>

# archive
<match **>
  type s3
</match>

Idea 2: <copy> syntax instead of <filter>

<label forward1>
  <source>
    type forward
    # source can't have nested <match>
  </source>

  <copy **>
    type groupcounter
    <match>
      type forward
    </match>
  </copy>

  <match>
    type redirect
    label archive
  </match>
</label>

<label>
  <source>
    type http
  </source>

  <match>
    type redirect
    label archive
  </match>
</label>

<label archive>
  # archive
  <match **>
    type s3
  </match>
</label>
Clone this wiki locally