0

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

8
  • You need to share your input and filter configs to help understand what is happening in your pipeline. Commented Jul 17, 2019 at 14:25
  • I don't have any filter config. Commented Jul 18, 2019 at 0:04
  • And your inputs? How are you receiving the logs? How is the data? You need to provide more information about what are you doing and what you'd expect the result to be. Commented Jul 18, 2019 at 0:52
  • I'm using serilog and config it to send log to logstash. The log model is just a simple model with Id field is a Guid. Commented Jul 18, 2019 at 1:53
  • I'm following this tutorial: blog.romanpavlov.me/logging-serilog-elk Commented Jul 18, 2019 at 1:54

1 Answer 1

1

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}"
Sign up to request clarification or add additional context in comments.

1 Comment

I tried but may be %{Id} not get my Id Field to the document_id

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.