Fluentdで既存の(Gemでインストールした)プラグインを改修して利用する方法を紹介します。 前提としてFluentdは「CentOS6にFluentdをインストール」の手順にてインストールされているとします。 ポイントは以下のようになります。 継承したクラス(ファイル)は/etc/td-agent/pluginに配置 ファイル名はプラグインのファイル名のルール通り 継承するプラグイン(クラス)のファイルをrequireする tagomoris / fluent-plugin-datacounter : fluent-plugin-datacounter 上記プラグインを切りの良い間隔(1分間隔の出力ならhh::mm::00でログ出力)で ログ出力(watchメソッドをオーバーライド)するようにしてみました。 # cat /etc/td-agent/plugin/out_datacou