2016-03-03 60 views
0

我們使用Kibana儀表板實現了filebeat,logstash,elastic以查看操作日誌內容。我有一種情況,我從這樣的不同服務獲取日誌:例如,對於單個服務,我們收集了像這種格式的操作日誌。我正在使用Filebeat-> logstash-> eleasticsearch-> kibana

timestamp <uniquerID> entry: ProcessAPI{AddEmployee} :hostname 
timestamp <uniquerID> send: UserAPI{ValidateUser} :hostname 
timestamp <uniquerID> receive: UserAPI{ValidateUser} :hostname 
timestamp <uniquerID> send: AccountAPI{ValidateAccount} :hostname 
timestamp <uniquerID> receive: AccountAPI{ValidateAccount} :hostname 
timestamp <uniquerID> exit: ProcessAPI{AddEmployee} :hostname 

I want to combine these log line to a single line like below format: 

timestamp <uniquerID> Exit:ProcessAPI{AddEmployee} :hostname| UserAPI{ValidateUser} :hostname | AccountAPI{ValidateAccount} :hostname 

Each log line has associated parent service name in the source field.Is there any solution we can adopt to achive this. 

回答