Skip to content

Instantly share code, notes, and snippets.

@kiyoto
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiyoto/9790702 to your computer and use it in GitHub Desktop.
Save kiyoto/9790702 to your computer and use it in GitHub Desktop.
Fluentdのparser/format拡張について

#FluentdのFormat追加の名前について

##名前に関する規則

個人的にはext_format_<format name>という感じがいいと思っています。<format name>に関しては、全部一か所に突っ込んでしまうと、場合によってはいらないパーサーもロードされるので、ある程度グルーピングするとよいかなと。例えばMTA系ののフォーマットに関するものはext_format_mailとか、MongoDBに関するフォーマットはext_format_mongoとか。でもって必要なext_format_<format name>をPluginディレクトリに置く・gem installするという感じ。

このアプローチの最大の問題は、ext_format_*系が量産される可能性があること。これに関しては、ある程度使われるとわかったものは、随時Coreにマージしてもよいかもしれない。

##フォルダ構成

普通にplugin/の下にext_format_xxx.rbを入れてしまえばいいのではないかと思う。exec_util.rbもそんな感じで入っているし。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment