Class: SphinxEventFilterFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/filters/sphinx.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ SphinxEventFilterFactory

Returns a new instance of SphinxEventFilterFactory.



365
366
367
368
369
370
371
372
# File 'lib/logstash/filters/sphinx.rb', line 365

def initialize(config)
  @config = config
  @event_filter_base = SphinxEventFilter.new(config)
  @event_filter_windows = SphinxWindowsEventFilter.new(config)
  @event_filter_windows_sysmon = SphinxWindowsSysmonEventFilter.new(config)
  @event_filter_linux = SphinxLinuxEventFilter.new(config) #TODO

  @event_filter_mac = SphinxMacEventFilter.new(config) #TODO

end

Instance Method Details

#get_filter(event) ⇒ Object



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
# File 'lib/logstash/filters/sphinx.rb', line 375

def get_filter(event)

  platform = event["SphinxPlatform"]

  case platform
    when 'windows'
      return get_windows_filter(event)
    when 'linux'
      return @event_filter_linux
    when 'mac'
      return @event_filter_mac
  end

  nil
end