class LogStash::Filters::Oui

This example filter will replace the contents of the default message field with whatever you specify in the configuration.

It is only intended to be used as an example.

Public Instance Methods

filter(event) click to toggle source
# File lib/logstash/filters/oui.rb, line 36
def filter(event)

  oui = OUI.find event[@source]
  if ! oui.nil?
    event[@target] = Hash.new
    oui.each do |key, value|
      event[@target][key.to_s] = value
    end

    # filter_matched should go in the last line of our successful code
    filter_matched(event)
  end
end
register() click to toggle source
# File lib/logstash/filters/oui.rb, line 30
def register
  # Add instance variables
  require 'oui'
end