class LogStash::Filters::Uuid
The uuid filter allows you to add a UUID field to messages. This is useful to be able to control the _id messages are indexed into Elasticsearch with, so that you can insert duplicate messages (i.e. the same message multiple times without creating duplicates) - for log pipeline reliability
Public Instance Methods
filter(event)
click to toggle source
# File lib/logstash/filters/uuid.rb, line 45 def filter(event) return unless filter?(event) if overwrite event[target] = SecureRandom.uuid else event[target] ||= SecureRandom.uuid end filter_matched(event) end
register()
click to toggle source
# File lib/logstash/filters/uuid.rb, line 41 def register end