Upgrade to Pro — share decks privately, control downloads, hide ads and more …

fluentd 101

threetreeslight
August 22, 2018
30

fluentd 101

fluentd 101 on Shinjuku.rb #64

threetreeslight

August 22, 2018
Tweet

Transcript

  1. Filters いらないデータすてたり、データのマスキング( アプリケーションでや ったほうが良い) とか容易 A Filter aims to behave

    like a rule to pass or reject an event. The Filter basically will accept or reject the Event based on its type and rule defined 9 / 27
  2. 01 <filter test.cycle> 02 @type grep 03 <exclude> 04 key

    action 05 pattern ^logout$ 06 </exclude> 07 </filter> 10 / 27
  3. 01 <label @STAGING> 02 <filter test.cycle> 03 @type grep 04

    <exclude> 05 key action 06 pattern ^logout$ 07 </exclude> 08 </filter> 09 10 <match test.cycle> 11 @type stdout 12 </match> 13 </label> 12 / 27
  4. Buffers buffering したりretry してくれるのでアウトプット先への負荷コントロ ールなども容易 Output plugin in buffered mode

    stores received events into buffers first and write out buffers to a destination by meeting flush conditions. 13 / 27
  5. 1. Input Plugin 2. Output Plugin 3. Filter Plugin 4.

    Parser Plugin 5. Formatter Plugin 6. Buffer Plugin 7. Storage Plugin 15 / 27
  6. Input Plugin データソース⽤、ファイルを呼んだりlogger からforwarding されてきた りできる An input plugin typically

    creates a thread socket and a listen socket. It can also be written to periodically pull data from data sources. 16 / 27
  7. Parser Plugin インプットソースのデータ処理するやつ。filter との使い分けが重要。 cannot parse the user’s custom data

    format (for example, a context- dependent grammar that can’t be parsed with a regular expression). 17 / 27
  8. Formatter Plugin Sometimes, the output format for an output plugin

    does not meet one’s needs. 出⼒フォーマットを決定するやつ 20 / 27
  9. ref Fluentd Blog - Unified Logging Layer: Turning Data into

    Action fluentd - Buffer Plugin Overview あらびき⽇記 - fluentd の基礎知識 sonots:blog - fluentd でログが⽋損する可能性を考える 27 / 27