Class: LogStash::Filters::Metaevent
- Defined in:
- lib/logstash/filters/metaevent.rb
Constant Summary
Constants inherited from Base
Constants included from Config::Mixin
Instance Attribute Summary
Attributes included from Config::Mixin
Attributes inherited from Plugin
Instance Method Summary collapse
Methods inherited from Base
#execute, #initialize, #threadsafe?
Methods included from Config::Mixin
Methods inherited from Plugin
#eql?, #finished, #finished?, #hash, #initialize, #inspect, lookup, #reload, #running?, #shutdown, #teardown, #terminating?, #to_s
Constructor Details
This class inherits a constructor from LogStash::Filters::Base
Instance Method Details
#filter(event) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/logstash/filters/metaevent.rb', line 20 def filter(event) if filter?(event) start_period(event) elsif within_period(event) if (event) trigger(event) else @logger.debug(["metaevent", @add_tag, "ignoring (tags don't match)", event]) end else @logger.debug(["metaevent", @add_tag, "ignoring (not in period)", event]) end end |
#flush ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/logstash/filters/metaevent.rb', line 34 def flush return if @metaevents.empty? new_events = @metaevents @metaevents = [] new_events end |
#register ⇒ Object
15 16 17 18 |
# File 'lib/logstash/filters/metaevent.rb', line 15 def register @logger.debug("registering") @metaevents = [] end |