Hello, sorry if this has been asked before but i am new to ELK stack and did not find an answer for my question. If i have an application that is running multiple instances for example instance1, instance2, instance3 and i want to do log management for this application using ELK stack. I am using Logstash which takes the logs from a logging.file of the application and displays it on Kibana. My issue is how can i differentiate between the logs of all 3 instances so i know which one sends logs in case one of them is not functioning properly. I tried using spring cloud sleuth but the issue is that i have different traceIDs and i dont want to search in all instances to find the traceID that belongs to the instance. Is there a way to include the IP address and port in the logstash configuration file?
This is a sample of the log requests
2020-01-13 23:19:50.078 INFO [microservice1,81bda65d4c16a2d0,81bda65d4c16a2d0,false] 8278 --- [nio-8001-exec-1] c.s.m.c.Microservice1Controller : This is an INFO log
2020-01-13 23:19:50.078 ERROR [microservice1,81bda65d4c16a2d0,81bda65d4c16a2d0,false] 8278 --- [nio-8001-exec-1] c.s.m.c.Microservice1Controller : This is an ERROR log
This is the log output information present in kibana
|@timestamp| : Jan 13, 2020 @ 06:38:15.986|
|@version : 1|
|_id : SARXn28B-hgxozi_UC3u|
|_index : logstash-2020.01.03-000001|
|_score : - |
|_type : _doc|
|host : ubuntu|
|message : 2020-01-13 06:36:39.863 INFO [microservice1,064d4100c385c9f5,064d4100c385c9f5,false] 5791 --- [http-nio-8001-exec-2] c.s.m.c.Microservice1Controller : This is an INFO log|
|path : /home/user/microservice1logging/microservice1.log|
|type : java|
Picture of my Kibana UI with the available fields