一句话:通过工业实证揭示日志解析的分隔符多样与嵌套长度不一挑战,并提出Drain+改进解析器。
日志解析将半结构化日志消息转为结构化数据,是日志挖掘与系统诊断的重要预处理。已有研究多提出新解析器,却缺乏对工业实践有效性的系统考察。本文在蚂蚁集团10个微服务应用上实证评估六种先进解析器,发现两大挑战:分隔符种类繁多且因模板或应用而异;嵌套对象导致同一事件模板的日志长度不一,10个应用中6个存在该问题,六种解析器中4种无法处理。为此,作者基于Drain提出Drain+,引入基于统计的分隔符自动生成与候选事件模板合并两个组件。在蚂蚁10个微服务应用和16个公开数据集上,Drain+均优于六种先进解析器,并总结了未来研究方向。
Logs are widely used for system behavior diagnosis by automatic log mining. Log parsing is an important data preprocessing step that converts semi-structured log messages into structured data as the feature input for log mining. Currently, many studies are devoted to proposing new log parsers. However, to the best of our knowledge, no previous study comprehensively investigates the effectiveness of log parsers in industrial practice. To investigate the effectiveness of the log parsers in industrial practice, in this paper, we conduct an empirical study on the effectiveness of six state-of-the-art log parsers on 10 microservice applications of Ant Group. Our empirical results highlight two challenges for log parsing in practice: 1) various separators. There are various separators in a log message, and the separators in different event templates or different applications are also various. Current log parsers cannot perform well because they do not consider various separators. 2) Various lengths due to nested objects. The log messages belonging to the same event template may also have various lengths due to nested objects. The log messages of 6 out of 10 microservice applications at Ant Group with various lengths due to nested objects. 4 out of 6 state-of-the-art log parsers cannot deal with various lengths due to nested objects. In this paper, we propose an improved log parser named Drain+ based on a state-of-the-art log parser Drain. Drain+ includes two innovative components to address the above two challenges: a statistical-based separators generation component, which generates separators automatically for log message splitting, and a candidate event template merging component, which merges the candidate event templates by a template similarity method. We evaluate the effectiveness of Drain+ on 10 microservice applications of Ant Group and 16 public datasets. The results show that Drain+ outperforms the six state-of-the-art log parsers on industrial applications and public datasets. Finally, we conclude the observations in the road ahead for log parsing to inspire other researchers and practitioners.
DOI 原文 ·
@inproceedings{paperbot6986,
title = {Investigating and improving log parsing in practice},
author = {Ying Fu and Meng Yan and Jian Xu and Jianguo Li and Zhongxin Liu and Xiaohong Zhang and Dan Yang},
booktitle = {FSE},
year = {2022},
doi = {10.1145/3540250.3558947}
}