journal article·2025-02-08Open access

CFTL: System Log Parsing Method Driven from Clustering According to First Token and Length for Anomaly Detection

Jie Hu, Lingchun Long, He Sui, Zhaojun Gu, Guangming Zheng

Applied Sciences· Volume 15· Issue 4

Abstract

Logs are extensively used to analyze the running states of systems in many fields, such as cyber security, performance monitoring, and fault diagnosis, by recording events representing real-time system states. Conventional system log parsing methods are time-consuming and are prone to overfitting or underfitting. Thus, automatic parsing methods, known as log parsers, have been proposed. However, most log parsers do not exhibit both high accuracy and low running time. In addition, they typically overfit during log template generation; thus, log parsers cannot effectively be deployed in large-scale distributed systems. To solve these problems, this study proposes an efficient heuristic log parsing method. The proposed method first clusters log messages by the first token and their length, then uses specific separation rules to divide them into refined groups, and finally matches the corresponding log templates. The performance of the proposed method was evaluated using reliable datasets and tools. The experimental results demonstrate that the proposed method not only exhibits high accuracy but also a low running time. The number of log events parsed by log parsers of log templates generated by the proposed method is close to the real count, and the proposed method also exhibits good accuracy for subsequent anomaly detection tasks. In addition, the proposed method is lightweight because it employs the most valuable parsing rules. Thus, the proposed method is suitable for deployment in large-scale distributed systems.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Software System Performance and Reliability · Software Reliability and Analysis Research · Network Security and Intrusion Detection

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

The 28th Research Institute, China Electronics Technology Group Corporation, Nanjing 210007, China

State Key Laboratory of Air Traffic Management System, Nanjing 210007, China

College of Aeronautical Engineering, Civil Aviation University of China, Tianjin 300300, China

Information Security Evaluation Centre, Civil Aviation University of China, Tianjin 300300, China

School of Finance, Nankai University, Tianjin 300000, China

Funding

States Key Laboratory of Air Traffic Management System · Fundamental Research Funds for the Central one Universities of Civil Aviation University of China

References (33)

Show source-provided references
1. Bertero, C., Roy, M., Sauvanaud, C., and Tredan, G. (2017, January 23–26). Experience report: Log mining using natural language processing and application to anomaly detection. Proceedings of the IEEE 28th International Symposium on Software Reliability Engineering (ISSRE), Toulouse, France.10.1109/ISSRE.2017.43 ↗
2. Goldstein, M., Raz, D., and Segall, I. (2017, January 23–26). Experience report: Log-based behavioral differencing. Proceedings of the IEEE 28th International Symposium on Software Reliability Engineering (ISSRE), Toulouse, France.10.1109/ISSRE.2017.14 ↗
3. Kc, K., and Gu, X. (2011, January 4–7). Elt: Efficient log-based troubleshooting system for cloud computing infrastructures. Proceedings of the IEEE 30th International Symposium on Reliable Distributed Systems, Madrid, Spain.10.1109/SRDS.2011.11 ↗
4. Fu, X., Ren, R., Zhan, J., Zhou, W., Jia, Z., and Lu, G. (2012, January 8–11). Logmaster: Mining event correlations in logs of large-scale cluster systems. Proceedings of the IEEE 31st Sympo-sium on Reliable Distributed Systems, Irvine, CA, USA.10.1109/SRDS.2012.40 ↗
5. Xu, W., Huang, L., Fox, A., Patterson, D., and Jordan, M.I. (2009, January 11–14). Detecting largescale system problems by mining console logs. Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles—SOSP, Big Sky, MT, USA.10.1145/1629575.1629587 ↗
6. Uilog: Improving log-based fault diagnosis by log analysis10.1007/s11390-016-1678-7 ↗
7. Effective software fault localization using a rbf neural network10.1109/TR.2011.2172031 ↗
8. Reidemeister, T., Jiang, M., and Ward, P.A. (2011, January 23–27). Mining unstructured log files for recurrent fault diagnosis. Proceedings of the 12th IFIP/IEEE International Symposium on Integrated Network Management (IM 2011) and Workshops, Dublin, Ireland.10.1109/INM.2011.5990536 ↗
9. Karthik, N., Charles, K., and Jennifer, N. (2012, January 25–27). Structured comparative analysis of systems logs to diagnose performance problems. Proceedings of the 9th USENIX Symposium on Networked Systems Design and Implementation (NSDI 12), San Jose, CA, USA.
10. Fu, Q., Lou, J.G., Wang, Y., and Li, J. (2009, January 6–9). Execution anomaly detection in distributed systems through unstructured log analysis. Proceedings of the 9th IEEE International Conference on Data Mining, Miami, FL, USA.10.1109/ICDM.2009.60 ↗
11. JLou, G., Fu, Q., Yang, S.Q., Xu, Y., and Li, J. (2010, January 23–25). Mining invariants from console logs for system problem detection. Proceedings of the 2010 USENIX Annual Technical Conference (USENIX ATC 10), Boston, MA, USA.
12. Shima, K. (2016). Length matters: Clustering system log messages using length of words. arXiv.
13. Messaoudi, S., Panichella, A., Bianculli, D., Briand, L., and Sasnauskas, R. (2018, January 28–29). A search-based approach for accurate identification of log message formats. Proceedings of the 26th Conference on Program Comprehension, Gothenburg, Sweden.10.1145/3196321.3196340 ↗
14. AMakanju, A., Zincir-Keywood, A.N., and Milios, E.E. (July, January 28). Clustering event logs using interative portioning. Proceedings of the 15th ACM SIGKDD International Conference on Knowledge and Data Mining, Paris, France.
15. A lightweight algorithm for message type extraction in system application logs10.1109/TKDE.2011.138 ↗
16. He, P.J., Zhu, J.M., Zheng, Z.B., and Lyu, M.R. (2017, January 25–30). Drain: An online log parsing approach with fixed depth tree. Proceedings of the 2017 IEEE International Conference on Web Services (ICWS), Honolulu, HI, USA.10.1109/ICWS.2017.13 ↗
17. Du, M., and Li, F.F. (2016, January 12–15). SPELL: Streaming parsing of system event logs. Proceedings of the 2016 IEEE 16th International Conference on Data Mining (ICDM), Barcelona, Spain.10.1109/ICDM.2016.0103 ↗
18. Vaarandi, R. (2003, January 1–3). A data clustering algorithm for mining patterns from event logs. Proceedings of the 3rd IEEE Workshop on IP Operations and Management, Kansas City, MO, USA.
19. Nagappan, M., and Vouk, M.A. (2010, January 2–3). Abstracting log lines to log event types for mining software system logs. Proceedings of the 7th IEEE Conference on Mining Software Repositories (MSR 2010), Cape Town, South Africa.10.1109/MSR.2010.5463281 ↗
20. Vaarandi, R., and Pihelgas, M. (2015, January 9–13). LogCluster—A data clustering and pattern mining algorithm for event logs. Proceedings of the 11th International Conference on Network and Service Management (CNSW), Barcelona, Spain.10.1109/CNSM.2015.7367331 ↗
21. Logram: Efficient log parsing using n-Gram dictionaries
22. Tang, L., Li, T., and Perng, C.S. (2011, January 24–28). LogSig: Generating system events from raw textual logs. Proceedings of the 20th ACM International Conference on Information and Knowledge Management, Glasgow, UK.10.1145/2063576.2063690 ↗
23. Hamooni, H., Debnath, B., Xu, J.W., Zhang, H., Jiang, G., and Mueen, A. (2016, January 24–28). LogMine: Fast pattern recognition for log analytics. Proceedings of the 25th ACM International Conference on Information and Knowledge Management, Indianapolis, IN, USA.10.1145/2983323.2983358 ↗
24. Mizutani, M. (July, January 28). Incremental mining of system log format. Proceedings of the 2013 IEEE International Conference on Services Computing, Santa Clara, CA, USA.10.1109/SCC.2013.73 ↗
25. Liu, Y.D., Zhang, X., He, S.L., Zhang, H., Li, L., Kang, Y., Xu, Y., Ma, M., Lin, Q., and Dang, Y. (2022, January 25–29). Uniparser: A unified log parser for heterogeneous log data. Proceedings of the ACM Web Conference 2022, Lyon, France.10.1145/3485447.3511993 ↗
26. Wang, X.H., Zhang, X., Li, L.Q., He, S., Zhang, H., Liu, Y., Zheng, L., Kang, Y., Lin, Q., and Dang, Y. (2022, January 14–16). SPINE: A scalable log parser with feedback guidance. Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on Foundations of Software Engineering (ESEC/FSE), New York, NY, USA.10.1145/3540250.3549176 ↗
27. Meng, W.B., Liu, Y., Federico, Z., Zhang, S., Chen, Y., Zhang, Y., Zhu, Y., Wang, E., Zhang, R., and Tao, S. (2020, January 3–6). Logparse: Making log parsing adaptive through word classification. Proceedings of the 29th International Conference on Computer Communications and Networks (ICCCN), Honolulu, HI, USA.10.1109/ICCCN49398.2020.9209681 ↗
28. Logstamp: Automatic online log parsing based on sequence labelling10.1145/3543146.3543168 ↗
29. Manning, C.D., Raghavan, P., and Schutze, H. (2008). Introduction to Information Retrieval, Cambridge University Press.10.1017/CBO9780511809071 ↗
30. Term-weighting approaches in automatic text retrieval10.1016/0306-4573(88)90021-0 ↗
31. Tang, L., and Li, T. (2010, January 13–17). Logtree: A framework for generating system events from raw textual logs. Proceedings of the IEEE International Conference on Data Mining, Sydney, Australia.10.1109/ICDM.2010.76 ↗
32. Zhu, J., He, S., Liu, J., He, P., Xie, Q., Zheng, Z., and Lyu, M.R. (August, January 29). Tools and benchmarks for automated log parsing. Proceedings of the International Conference on Software Engineering: Software Engineering in Practice, Las Vegas, NV, USA.
33. Long short-term memory10.1162/neco.1997.9.8.1735 ↗