v11は互換性が無かったためガリガリと実装出来たが,v1ではそれは出来ないため,必要な機能だけうまくマージする必要がある.
プラグイン群の実行単位としてAgentを導入して,Engineはそのrootを指すようにした.ラベルもAgentの一部で,いくつかの処理はrootに委譲する. RootAgentはsourceを持てるが,Labelなどは実装的に持てなくなっている.
名前はcontextとかの方がいいかもしれない?
| require 'socket' | |
| require 'ostruct' | |
| module Fluent | |
| class RecordReformerFilter < Filter | |
| Fluent::Plugin.register_filter('record_reformer', self) | |
| def initialize | |
| super | |
| end |
| module Fluent | |
| class AddMetadataFilter < Filter | |
| Plugin.register_filter('add_metadata', self) | |
| config_param :include_time_key, :bool, :default => false | |
| config_param :time_key, :string, :default => 'time' | |
| config_param :time_format, :string, :default => nil | |
| config_param :include_tag_key, :bool, :default => false | |
| config_param :tag_key, :string, :default => 'tag' | |
| config_param :localtime, :bool, :default => true |
| class Fluent::GrepFilter < Fluent::Filter | |
| Fluent::Plugin.register_filter('grep', self) | |
| REGEXP_MAX_NUM = 20 | |
| config_param :input_key, :string, :default => nil # obsolete | |
| config_param :regexp, :string, :default => nil # obsolete | |
| config_param :exclude, :string, :default => nil # obsolete | |
| config_param :replace_invalid_sequence, :bool, :default => false | |
| (1..REGEXP_MAX_NUM).each {|i| config_param :"regexp#{i}", :string, :default => nil } |
| #!/bin/bash | |
| # | |
| # /etc/rc.d/init.d/td-agent | |
| # | |
| # chkconfig: - 80 20 | |
| # description: td-agent | |
| # processname: td-agent | |
| # pidfile: /var/run/td-agent/td-agent.pid | |
| # | |
| ### BEGIN INIT INFO |
rpmで問題が起きたのでまとめておく.あと英語で書くと日本の人が読んでくれないのでまず日本語で…
現在のtd-agentは1.1.19だが,2.0.0と1.2.0があった場合,yum updateでは2.0.0が入ってしまう.これでは,Rubyのバージョンが変わった場合などはgemの再インストールが必要で,単なるアップデートでは起動出来なくなるという問題がある(chefとか使っていれば多分防ぐことは出来るが強制することは出来ない).
| import std.array; | |
| import std.stdio; | |
| import std.datetime; | |
| import core.sync.mutex; | |
| final class Queue | |
| { | |
| private: | |
| Mutex _mutex; | |
| int[] _arr; |
| Run options: exclude {:env=>:win} | |
| DNS | |
| connects to valid domains (FAILED - 1) | |
| fires on_resolve_failed for invalid domains | |
| Coolio::StatWatcher | |
| fire on_change when the file it is watching is modified | |
| should pass previous and current file stat info given a stat watcher | |
| should raise when the handler does not take 2 parameters |