Config '_id' generation

Hi all,

How I can set what fields to use in '_id' generation?

I use logstash to fetch log files from different places. Sometimes those files are identical. So I want to prevent elasticsearch from adding dublicated log entries. As I understand, if system discover the same id, entry will not be added (or replaced - it does not matter). The simplest way to do this - exclude from '_id' generation path field. So how I can set what fields to use to generate '_id'?

Thanks,
Evgeniy

Do that in LS, set the document_id value - https://www.elastic.co/guide/en/logstash/current/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-document_id

1 Like

Thank you very much! It's work! You are greate! :slight_smile::+1: