[Paper Review] A Directed Acyclic Graph Approach to Online Log Parsing
This paper proposes Drain, an online log parsing method based on a directed acyclic graph (DAG) that automatically initializes and dynamically updates parsing rules without manual parameter tuning. It achieves state-of-the-art accuracy and up to 97.14% faster parsing than existing online parsers across 11 real-world log datasets.
Logs are widely used in modern software system management because they are often the only data accessible that record system events at runtime. In recent years, because of the ever-increasing log size, data mining techniques are often utilized to help developers and operators conduct system reliability management. A typical log-based system reliability management procedure is to first parse log messages because of their unstructured format; and apply data mining techniques on the parsed logs to obtain critical system behavior information. Most of existing research studies focus on offline log parsing, which need to parse logs in batch mode. However, software systems, especially distributed systems, require online monitoring and maintenance. Thus, a log parser that can parse log messages in a streaming manner is highly in demand. To address this problem, we propose an online log parsing method, namely Drain, based on directed acyclic graph, which encodes specially designed rules for parsing. Drain can automatically generate a directed acyclic graph for a new system and update the graph according to the incoming log messages. Besides, Drain frees developers from the burden of parameter tuning by allowing them use Drain with no pre-defined parameters. To evaluate the performance of Drain, we collect 11 log datasets generated by real-world systems, ranging from distributed systems, Web applications, supercomputers, operating systems, to standalone software. The experimental results show that Drain has the highest accuracy on all 11 datasets. Moreover, Drain obtains 37.15\%$\sim$ 97.14\% improvement in the running time over the state-of-the-art online parsers. We also conduct a case study on a log-based anomaly detection task using Drain in the parsing step, which determines its effectiveness in system reliability management.
Motivation & Objective
- To address the limitations of offline log parsing in real-time system monitoring, especially for large-scale distributed systems.
- To eliminate the need for manual parameter tuning in log parsing by enabling automatic initialization and dynamic rule updates.
- To develop an online log parser that maintains high accuracy while significantly improving parsing efficiency.
- To evaluate the parser's performance across diverse real-world systems, including distributed systems, Web applications, and supercomputers.
- To demonstrate the effectiveness of the parser in end-to-end system reliability tasks, such as anomaly detection.
Proposed method
- Drain constructs a directed acyclic graph (DAG) to encode heuristic rules for log message parsing, enabling efficient pattern matching in streaming logs.
- The parser automatically initializes its DAG structure based on the statistical characteristics of incoming log messages, eliminating the need for pre-defined parameters.
- It dynamically updates the DAG as new log messages arrive, allowing adaptation to evolving log patterns without retraining from scratch.
- The DAG structure accelerates log group search by organizing log templates in a hierarchical, rule-based manner that reduces comparison overhead.
- Drain uses a similarity-based matching strategy to group log messages into templates, with a focus on preserving parsing accuracy under high-volume streaming conditions.
- The method is designed to be memory-efficient and scalable, suitable for deployment in large-scale, real-time monitoring pipelines.
Experimental results
Research questions
- RQ1Can a log parser achieve high accuracy in online log parsing without requiring manual parameter tuning?
- RQ2How does the performance of an online log parser based on a DAG compare to existing state-of-the-art online and offline log parsers in terms of accuracy and speed?
- RQ3Can the proposed parser effectively support downstream system reliability tasks, such as anomaly detection, when used as a preprocessing step?
- RQ4How well does the parser generalize across diverse real-world systems with varying log formats and volumes?
- RQ5What is the impact of automatic rule initialization and dynamic update mechanisms on parsing efficiency and accuracy?
Key findings
- Drain achieved the highest parsing accuracy on all 11 real-world log datasets collected from distributed systems, Web applications, supercomputers, operating systems, and standalone software.
- Drain improved parsing speed by 37.15% to 97.14% compared to the state-of-the-art online log parsers, demonstrating significant efficiency gains.
- The parser required no manual parameter tuning, as it automatically initialized and updated its rules based on incoming log streams.
- In a case study, Drain successfully enabled effective log-based anomaly detection, confirming its utility in real system reliability management.
- The DAG-based structure enabled efficient log group search and scalable parsing, outperforming tree-based and clustering-based approaches in both speed and accuracy.
- The source code and all 11 datasets have been publicly released to support reproducibility and future research.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.