1

I have 10 microservices running and stored separate log files for each microservice. but when i am configuring the logstash or fluentd config file for tracing i have to give one specific log file name but i want logstash or fluentd has to take all the log files from all of my microservices.

how is that possible?

can i give the path of my log folder, where all my logs are storing?

will it consider the all log files? or i have to give only one log file path?

when i checked some docs, they are using one single log file and giving the entire path where that log file is present. but i want it to take all the log files which are present in the logs folder.

also please guide me how i can achieve this in Kubernetes?

1 node contains 10 pods and each pod running 1 microservice in kubernetes.

Rakshith M
  • 79
  • 1
  • 1
  • 7
  • not what do you mean by "will it consider the all log files? or i have to give only one log file path?" – Harsh Manvar Mar 24 '21 at 06:44
  • as much as i know you have to push the logs to fluentd or logstash which will store the logs into Elasticsearch and you can access the details in dashboard. for pushing you can use the UDP client instead of TCP. – Harsh Manvar Mar 24 '21 at 06:45
  • from the service side, you have to add the library or write code that will push the generated logs to logstash server over UDP. – Harsh Manvar Mar 24 '21 at 06:47
  • I have 10 microservices in my project and i have 10 different log files as well , how can i push all 10 log files to logstash/fluentd? i need configuration of fluentd/logstash, please help me on this – Rakshith M Mar 25 '21 at 13:01
  • @HarshManvar or if you have any example for this, please share with me – Rakshith M Mar 25 '21 at 13:02
  • @HarshManvar i am trying to execute it in my local first(by creating 10 microservice using springboot in eclipse), later i have to run the same in kubernetes cluster too. i am not sure what extra configuration required while running it in kubernetes cluster – Rakshith M Mar 25 '21 at 13:05
  • https://github.com/patoi/springboot-fluentd-logging-example – Harsh Manvar Mar 25 '21 at 13:09
  • https://github.com/albertllousas/centralized-logs-with-EFK-and-docker here are few example i have not checked into much depth please try before implementing in production. – Harsh Manvar Mar 25 '21 at 13:10
  • i would also suggest you to try the UDP protocol for steaming the logs instead of TCP or any other which will also increase the application performance. – Harsh Manvar Mar 25 '21 at 13:11

0 Answers0