installation Link to heading

can be found online.

config file Link to heading

list of directives Link to heading

  • source: determine input source

    • must include @type parameter
  • match: determine output destinations

  • filter: determine pipelines

    • a typical pipeline is like this: Input -> Filter1 -> Filter2 ... -> Output, in config file is like
        <source>
        </source>
    
        <filter>
        </filter>
    
        <match>
        </match>
    
  • system: directives set system wide configuration

  • label: directives group the output and filter for internal routing

  • @include: include other files

wildcards and expansions for match and filter Link to heading

  • * matches a single tag part
  • ** matches zero or more tag parts
  • {X, Y, Z} matches X, Y or Z pattern
  • #{...} evaluates the string inside brackets as Ruby expression
  • when multiple patterns provided delimited by whitespaces, it matches any of the patterns.
    • <match a b> matches a and b
    • <match a.** b.*>

one word on match though, that is put wildcard match later because fluentd matches in order, if one puts wildcard in the front, the second or later could never be matched.

common parameters Link to heading

@type, @id, @log_level

  • @label: this parameter is to route input events to <label> sections. inside <label> could be filter and match.

parse section Link to heading

<parse> could be inside <source>, <match> or <filter>

parse @type can be a lot. default parsers could be apache2, csv, json ......

buffer section Link to heading

buffer is handled by fluentd core. this section can be used to determine what to do with buffer chunk.

buffer section must be in <match> section.

format section Link to heading

format section can be in <match> or <filter>.

default @type parameters include out_file, json, csv ......

extract section Link to heading

extract section can be in <source>, <match> or <filter>.