elasticsearch plugin - Getting logstash "fingerprint" filter to source every field -
i'm using fingerprint
filter in logstash create fingerprint field set document_id
in elasticsearch
output.
configuration follows:
filter { fingerprint { method => "sha1" key => "key" } } output { elasticsearch { host => localhost document_id => "%{fingerprint}" } }
this defaults source
being message, how make sha1 entire record , not message? note, fields record has depends on message.
i think there no built-in possibility achieve fingerprint plugin. concatenate_sources option doesn't recognize fields , fields change cannot set them manually source.
however, might consider using ruby plugin calculate sha1 hash regarding of fields. following might want.
filter { ruby { init => "require 'digest/sha1'; require 'json'" code => "event['fingerprint'] = digest::sha1.hexdigest event.to_json" } }
i've tested , suitable sha1 hashes regarding fields.
Comments
Post a Comment