I have a situation where I am getting logs from forwarder in the below format:
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
Is there a way in Logstash to do this.?
Update: Each log line has associated parent service name in the source field as below:
@Source: ProcessAPI{AddEmployee}
@Message : timestamp send: UserAPI{ValidateUser} :hostname