Bui Quang Huy
Bui Quang Huy

Reputation: 1794

Elasticsearch have duplicate record

I'm using ELK stack on Bitnami service and using Serilog to send log to Logstash but when I send one log, In kibana I will see two record with different _id a the same message. enter image description here

This is my logstash file. One more question, my log model have Id field, this is unique. How can I set it to document_id.

enter image description here

Upvotes: 0

Views: 478

Answers (1)

Badger
Badger

Reputation: 4072

If you have a unique id in a field you can use the document_id option on the elasticsearch output with a sprintf reference to the field

document_id => "%{Id}"

Upvotes: 1

Related Questions