1

I have 4-5 micro services which are all accessible through gateway service. I want to centralize the logging using elastic search, log stash and kibana. I have gone through few materials online and they write the logs to same file from every micro services (which I think is good for learning but bad idea for production code). What is the good approach here. Please suggest.

I have found this useful link. But not able to figure out how log stash is reading from a single port to push the logs to elastic search. I have commented my queries there as well.

Any suggestions or study materials would be appreciated. I am a newbie to ELK.

TheNightsWatch
  • 371
  • 10
  • 26
  • 1
    Does this answer your question? [Send spring boot logs directly to logstash with no file](https://stackoverflow.com/questions/57399354/send-spring-boot-logs-directly-to-logstash-with-no-file) – dbaltor Jul 14 '20 at 14:37

2 Answers2

0

One of ways -it using Sleuth - https://spring.io/projects/spring-cloud-sleuth By adding his dependency to all services will concentrate all logs together

0

Take a look on https://github.com/logstash/logstash-logback-encoder .

You can send the logs directly over TCP from the microservice to logstash. I'm testing this at the moment too.

rafcio
  • 11
  • 7