我正在使用Filebeat->;logstash->;电子搜索->;基巴纳

我正在使用Filebeat->;logstash->;电子搜索->;基巴纳,logstash,Logstash,我们使用Kibana dashboard实现了filebeat、logstash和elastic,以查看操作日志内容。我有这样一种情况,我从不同的服务中获取日志,例如:对于单个服务,我们收集的操作日志格式如下 timestamp <uniquerID> entry: ProcessAPI{AddEmployee} :hostname timestamp <uniquerID> send: UserAPI{ValidateUser} :hostname timestamp

我们使用Kibana dashboard实现了filebeat、logstash和elastic,以查看操作日志内容。我有这样一种情况,我从不同的服务中获取日志,例如:对于单个服务,我们收集的操作日志格式如下

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.
时间戳条目:ProcessAPI{AddEmployee}:主机名
时间戳发送:UserAPI{ValidateUser}:主机名
接收时间戳:UserAPI{ValidateUser}:主机名
时间戳发送:AccountAPI{ValidateAccount}:主机名
接收时间戳:AccountAPI{ValidateAccount}:主机名
时间戳出口:ProcessAPI{AddEmployee}:主机名
我想将这些日志行合并为一行,格式如下:
时间戳退出:ProcessAPI{AddEmployee}:主机名|用户API{ValidateUser}:主机名| AccountAPI{ValidateAccount}:主机名
每个日志行在源字段中都有相关的父服务名称。我们是否可以采用任何解决方案来实现这一点。

您必须告诉logstash您有一个多行日志格式,使用多行编解码器作为输入的一部分。它可能很复杂,并且取决于日志文件条目的特定格式,以获得编解码器的正确设置