Download - Should we write such like plugin or not?
![Page 1: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/1.jpg)
Should we write such that plugin or not?
Fluentd meetup in Fukuoka #fluentd2013/03/05@tagomoris (TAGOMORI Satoshi)
13年3月7日木曜日
![Page 2: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/2.jpg)
TAGOMORI SATOSHI (@TAGOMORIS)NHN JAPAN CORP.
ONE OF FLUENTD COMMITTERSONE OF FLUENTD PLUGIN AUTHORS
AND OTHER TOOLS (FLUENT-AGENT-LITE, ETC)13年3月7日木曜日
![Page 3: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/3.jpg)
13年3月7日木曜日
![Page 4: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/4.jpg)
Fluentd pluginsbuffer plugin
input plugin
output plugin (normal output plugin)
filter output plugin
meta plugin (input / output)
fluent mixin gem
13年3月7日木曜日
![Page 5: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/5.jpg)
Input pluginsデータをfluentdに取り込む
dstat, munin, ping-message, tail-ex
parseが必要
他ノードとのデータ転送
scribe, flume, zmq, secure-forward
13年3月7日木曜日
![Page 6: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/6.jpg)
Output pluginsFluentd内部のデータをデータストアに書き出す
mongo, td, couch, s3, pghstore, file-alternative, webhdfs
フォーマットが必要
Fluentd内部のデータを外部ツールにポストする
growthforecast, growl, splunk, say
13年3月7日木曜日
![Page 7: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/7.jpg)
Filter plugins継承関係はOutput pluginだが Engine.emit() する
経路制御・フィルタリング
rewrite, rewrite-tag-filter, sampling-filterデータ加工
parser, map, flatten, amplifier-filter集計処理
flowcounter, datacounter, datacalculator, numeric-monitor, notifier, numeric-counter
13年3月7日木曜日
![Page 8: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/8.jpg)
Meta plugins
input/output どちらもある
設定を変数展開したり動的展開したり
forest, config-expander, config_pit
out_copy
13年3月7日木曜日
![Page 9: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/9.jpg)
Fluentd mixin gems
他のプラグインに共通の機能を提供する
fluent-mixin-config-placeholders
fluent-mixin-plaintextformatter
13年3月7日木曜日
![Page 10: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/10.jpg)
How to write pluginsGoogle "fluentd plugin 作り方"
bundle gem plugin_nameedit it (and write tests!)edit plugin_name.gem and README.mdrake release
version0.0.x: alpha/developer release (使ってない)
0.y.z: beta or standard release (使ってる)
13年3月7日木曜日
![Page 11: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/11.jpg)
WRITE,or DON'T WRITEとりあえず作る?
既存のものがあるならそちらを使いたい
安定性、機能の充実、などなど
機能追加や変更:既存プラグインの継承は?
mixinがあれば使いたい
共通の設定方法、実装負荷軽減、バグの共有
13年3月7日木曜日
![Page 12: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/12.jpg)
Write what you use自分が使うものを作ろう
それが結局いちばん品質に貢献する
既存プラグインあるけど微妙だなー、とか
使われてないようなら奪ってしまえ
pullreq送りまくってればたぶんcommit権くれる
そのうちrelease権ももらってみんな幸せ
13年3月7日木曜日
![Page 13: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/13.jpg)
Write buffer plugins
おススメできない
あんまり必要もないはず……
眺めるのは面白いかも
lib/fluent/buffer.rb , lib/fluent/plugin/buf_file.rb
13年3月7日木曜日
![Page 14: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/14.jpg)
Write input pluginsWrite output plugins
Don't think, write.
13年3月7日木曜日
![Page 15: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/15.jpg)
Write filter output plugins新規に作る?
既存プラグインの組合せでできない?
exec_filterでできない?
性能や流量は大丈夫?
データ加工系はCPUをけっこう使うかも
過度な量の再emitは控えましょう
13年3月7日木曜日
![Page 16: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/16.jpg)
Write meta plugins新規に作る? けっこう難しい
Fluentdのコードをちゃんと読む必要がある
モノによっては非常に強力
代用できる方法ない?
設定ファイルテンプレート + include http://...
デプロイツール類(chef, etc)
13年3月7日木曜日
![Page 17: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/17.jpg)
Write mixin gems
とにかくmixinに切り出しとけ
format, parse, convert, ...
定型処理
再実装/コピペするほど愚かなことはない
バグレポート先、デバッグ、設定書式の共有
13年3月7日木曜日
![Page 18: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/18.jpg)
Maintenance: best practice
書きあげたら忘れたい: テスト超重要 (面倒…)
README書こう: release前、がんばって英語で
典型的な設定例みたいなの、超重要
広報しよう: どんな場合に便利なの? (機能だけじゃなく)
アップデートしよう: 互換性の破壊は極力避ける
pullreqに対応しよう: いいこといろいろあるよ
13年3月7日木曜日
![Page 19: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/19.jpg)
fluentd.org/plugin/
ダウンロード数ランキング
射幸心を煽られる
目指せkanicounterライン突破
13年3月7日木曜日
![Page 20: Should we write such like plugin or not?](https://reader030.vdocuments.site/reader030/viewer/2022020306/54b755084a7959737d8b4575/html5/thumbnails/20.jpg)
NO PLUGINSNO FLUENTD
Thanks!
13年3月7日木曜日