実現したいこと
td-agent 自作プラグイン作成し、処理をしたいです。
[/etc/td-agent/plugin/extract_path_filter.rb]に作成したプラグインが読み込まれません。
td-agentに疎いです。ご教示お願いします。
【/etc/td-agent/conf.d/webhook】
@type http bind port @type json<filter **>
@type extract_path
</filter>
<match **>
<store>
@type stdout
</store>
</match>
発生している問題・分からないこと
サービス再起動でエラーが発生しました。
エラーメッセージ
error
1[error]: config error file="/etc/td-agent/td-agent.conf" error_class=Fluent::ConfigError error="Unknown filter plugin 'extract_path'. Run 'gem search -rd fluent-plugin' to find plugins"
該当のソースコード
require 'fluent/plugin/filter' module Fluent::Plugin class ExtractPathFilter < Filter Fluent::Plugin.register_filter('extract_path', self) def filter(tag, time, record) # 仮にrecordにパス情報が"url_path"というキーで含まれていると仮定 if record["url_path"] *** # ここは秘匿とさせてください。 end record end end end
試したこと・調べたこと
上記の詳細・結果
何もわからず。困ってます。
補足
特になし

0 コメント