LogCopilot: 通过大型语言模型自动化日志聚合分析
LogCopilot: Automating Log Aggregation Analysis through Large Language Models
AI总结:
提出LogCopilot框架,利用大型语言模型,通过自然语言指令、知识检索和工具调用自动生成LogQL查询,实现日志聚合分析,平均准确率76.8%。
摘要:
日志记录了软件的运行时行为,广泛应用于调试、测试和故障诊断等任务。随着系统规模和复杂性的增加,日志分析逐渐成为一项具有挑战性的任务。当前的工业系统通常使用日志聚合系统(如Grafana Loki和ELK)来简化日志收集和分析过程。工程师使用这些系统提供的DSL查询语言编写查询,可以完成各种日志分析任务。然而,编写这些查询通常耗时且费力,因为工程师需要深入了解DSL语法以及日志中包含的详细信息。为了解决这些挑战,本文提出了LogCopilot,一种基于大型语言模型(LLMs)的自动化日志聚合分析框架。LogCopilot接受自然语言的日志分析指令,并通过知识检索和工具调用实现自动化日志分析。LogCopilot构建了一个层次化的知识库来表示和提供日志中的关键知识。它通过生成和执行LogQL查询来实现自动化的日志聚合分析。基于四个日志数据集的评估证实了LogCopilot的有效性,其平均准确率达到76.8%,优于基线方法。此外,实验结果表明LogCopilot在LogQL查询生成方面是有效的。
英文摘要:
Logs record the runtime behavior of software and are widely used in various tasks such as debugging, testing, and fault diagnosis. With the increase in system size and complexity, log analysis has gradually become a challenging task. Current industrial systems typically use log aggregation systems such as Grafana Loki and ELK to simplify the log collection and analysis process. Engineers write queries using the DSL query language provided by these systems can complete a variety of log analysis tasks. However, writing these queries is often time-consuming and labor-intensive, as it requires engineers to have a thorough understanding of the DSL syntax and the detailed information contained in the logs. To address these challenges, this paper proposes LogCopilot, an automated log aggregation analysis framework based on large language models (LLMs). LogCopilot accepts natural language log analysis instructions and accomplishes automated log analysis through knowledge retrieval and tool calling. LogCopilot constructs a hierarchical knowledge base to represent and provide key knowledge in logs. And it achieves automated log aggregation analysis by generating and executing LogQL queries. The evaluation based on four log datasets confirm the effectiveness of LogCopilot, which achieves an average accuracy of 76.8% and outperforms baseline approaches. Moreover, experiment results shows that LogCopilot is effective in LogQL query generation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。