Log management system

By designing a log management system, including log collection, processing, storage and visual display modules, the problem of scattered logs, inconvenient viewing and complex search is solved, efficient log query and monitoring is achieved, and system stability and risk control are ensured.

CN118626451APending Publication Date: 2024-09-10E-BUY INFORMATION TECH (SHANGHAI) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410738000.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, logs are scattered and inconvenient to view, log search operations are complex and inefficient, business abnormalities cannot be discovered in time, and there is a lack of a unified log management system within the company, resulting in high maintenance costs, system instability, log loss, and insufficient usability. .

Method used

A log management system is designed, including a log collection module, a log processing module, a log storage module and a log visual display module. Filebeat is used to collect log data, and a distributed MQ system is used to process logs. It is based on Lucene's self-developed indexing and search system. Storage and query, and real-time monitoring and alarming through alarm and risk control units, supporting containerized applications and diverse log formats.

Benefits of technology

It enables quick access to various systems, reduces development costs, supports containerized environments, improves log query efficiency, ensures the security and reliability of logs, detects business anomalies in a timely manner, and reduces the possibility of risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626451A
    Figure CN118626451A
Patent Text Reader

Abstract

The invention provides a log management system, which belongs to the technical field of log file management and comprises a log acquisition module, a log processing module, a log storage module and a log visual display module. The log management system provided by the invention can be quickly accessed to various systems of a company, the system is not perceived, the acquisition has no influence on a normal business system, and developers do not need to carry out secondary development and other work. Smooth access of the service log is realized, and the service log can be accessed only through simple configuration; and the log platform only needs to carry out some basic configurations and does not need to relate to business information such as log contents. Log sources are diversified, log query is convenient, and log monitoring and statistical analysis can be carried out quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of log file management, and in particular to a log management system. Background Art

[0002] As the company scales up and its business develops and grows, a large amount of log information will be generated. These logs need to be stored for query and analysis, but there is no unified log platform within the company. The implementation methods are mainly based on ELK (a combination of three open source software, i.e., laticsearch, Logstash, and Kibana) or using tail and grep on the server (on the server, "tail" and "grep" are two commonly used command line tools for processing and analyzing file contents) and other relatively primitive methods, with uneven levels of quality. Since each system implements its own log solution, the non-standard log format has no unified standards, and there are generally high maintenance costs, system instability, log loss, and lack of ease of use.

[0003] There is no unified standard for business logs. Business log formats vary, and logs cannot be segmented according to unified rules, which increases the cost of log analysis and retrieval.

[0004] The company's PAAS system application is containerized, but there is no good logging solution to support the collection of application logs in the container.

[0005] Therefore, there is an urgent need for a unified log management system in this field.

[0006] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0007] The purpose of the present invention is to provide a log management system that can solve the problems of scattered logs that are inconvenient to view, complex and inefficient log search operations, and inability to discover business anomalies in a timely manner.

[0008] To achieve the above object, the present invention provides the following solutions:

[0009] A log management system, comprising:

[0010] Log collection module, which is used to collect log data from various sources and send the data to the target location;

[0011] Log processing module, used to process collected log data;

[0012] Log storage module, used to store and search log data;

[0013] The log visualization display module is used to display the log query entry in real time.

[0014] Optionally, the log collection module uses a Filebeat log data collection tool.

[0015] Optionally, the various sources include: log files, system logs, Docker container logs, and Windows event logs.

[0016] Optionally, the log processing module adopts a distributed MQ system for web / nginx logs, search logs, monitoring logs and access logs.

[0017] Optionally, the log storage module includes:

[0018] File unit, used for compressing and storing original log files;

[0019] Search unit, including indexes that meet the requirements of each business and are established according to different environments, business systems, business procedures, and business identifiers;

[0020] The alarm unit includes settings according to monitoring scripts, alarm rules, alarm thresholds, and alarm contacts, which are used to centrally notify and display alarm results and form alarm history records;

[0021] The statistical unit is used to print logs in a certain format according to the real-time data throughput and the business department's own statistical needs. The system consumes the business statistical data within the statistical time window in real time.

[0022] The risk control unit is used to warn, prevent and respond to corporate risks based on the company's internal risk control monitoring and adopt a variety of technical means and management measures, so as to discover and identify risks within the company, reduce the possibility of risks, and ensure the safe and stable operation of the company's internal systems.

[0023] Optionally, the index creation process includes: obtaining original documents, constructing document objects, analyzing documents, and creating indexes.

[0024] Optionally, the log visualization display module is used to track the execution of all business scenarios of any content with one click, and restore the execution site through a visualized link.

[0025] Optionally, the log visualization display module is also used to query business logs and exception logs according to relevant parameters based on business department requirements.

[0026] Optionally, the log visualization display module is also used to display logs in real time and query, sort and filter logs according to different business parameters.

[0027] Optionally, the log visualization display module is also used for full-link query of each system log and link relationship.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] The log management system provided by the present invention can quickly access various company systems, has no perception of the system, and the collection has no impact on the normal business system, and developers do not need to perform secondary development and the like.

[0030] Business logs can be smoothly accessed with only simple configuration; the log platform also only needs some basic configuration without involving business information such as log content.

[0031] Environment support: physical machines (cloud machines), containers;

[0032] Various sources: system logs, business logs, and middleware logs;

[0033] Various formats: single line / multiple lines.

[0034] Log query: quick query, log monitoring, and statistical analysis.

[0035] Log alarm: abnormal log alarm notification. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 A schematic diagram of the log management system structure provided by an embodiment of the present invention.

[0038] Figure 2 This is the architecture diagram of the existing log management platform.

[0039] Figure 3 A schematic diagram of the workflow of the log collection module provided in an embodiment of the invention.

[0040] Figure 4 A log processing module framework diagram provided for an embodiment of the present invention.

[0041] Figure 5 A schematic diagram of a flow chart of log retrieval implemented by a log storage module provided in an embodiment of the present invention.

[0042] Figure 6A schematic diagram of the log storage module structure provided in an embodiment of the present invention.

[0043] Figure 7 A schematic diagram of the index library creation process provided by an embodiment of the present invention.

[0044] Figure 8 A schematic diagram of the overall alarm process provided by an embodiment of the present invention.

[0045] Fig. 9 A schematic diagram of a statistical data flow provided by an embodiment of the present invention.

[0046] Fig.10 A schematic diagram of the tracking effect provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] The purpose of the present invention is to provide a log management system that can solve the problems of scattered logs that are inconvenient to view, complex and inefficient log search operations, and inability to discover business anomalies in a timely manner.

[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0050] Embodiment 1:

[0051] This embodiment provides a log management system, such as Figure 1 As shown, including:

[0052] Log collection module, which is used to collect log data from various sources and send the data to the target location;

[0053] Log processing module, used to process collected log data;

[0054] Log storage module, used to store and search log data;

[0055] The log visualization display module is used to display the log query entry in real time.

[0056] The existing log platform architecture is as follows Figure 2 As shown, it is relatively simple, the problem is obvious, and there are several obvious shortcomings:

[0057] 1. Each time you check the log file, you need to log in to a different machine, which is very inconvenient. The system provided by the present invention is simple to query and does not have the problem of various jumps and verification troubles.

[0058] 2. Viewing logs through commands such as tail, cat, and grep. If operations such as retrieval and aggregation are performed on log files, it will also cause great pressure on the server's IO and even cause failures. The system provided by the present invention only requires input of keyword queries.

[0059] 3. Too large a log file not only causes the query to become extremely slow, but also often leads to serious consequences such as disk alarms and even insufficient disk space. The system provided by the present invention can solve the problems of slow disk query, large disk space occupation and high resource usage.

[0060] 4. The log format is not standardized, and the log is written to the file at random, and the readability and analyzability are almost zero. The system provided by the present invention can unify the log formatting, standardize the business log output, and query problems quickly and accurately.

[0061] 5. The performance of NFS mounting with multiple nodes is poor, which easily results in log loss, thus affecting problem location and troubleshooting. The system provided by the present invention uses high-performance disks without network requests, does not lose logs, and the system has no network IO.

[0062] The log collection module in the log management system provided by the present invention adopts the Filebeat log data collection tool. Filebeat is a lightweight log data collection tool and is part of the Elastic Stack (ELK Stack) ecosystem of Elastic. It mainly collects log data from various sources and sends the data to Elasticsearch, Logstash or Kafka and other targets. The main features of Filebeat are:

[0063] Lightweight: It is a lightweight tool with very low consumption of system resources. It is designed for high performance and low latency and can run in a variety of environments, including servers, containers, and virtual machines.

[0064] Multi-source collection: Collect data from various sources, including log files, system logs, Docker container logs, Windows event logs, etc. Data collection for different data sources can be easily configured.

[0065] Modularity: The configuration is organized in a modular way. Each input type can be used as a module, which is easy to expand and configure. This makes it easier to add new data sources and log formats.

[0066] Target output: Data can be sent to multiple targets. The most common method is to send data to Elasticsearch. The system provided by the present invention sends data to Kafka.

[0067] Real-time: Data can be collected and transmitted in real time to ensure timely log data.

[0068] Workflow diagram Figure 3 shown.

[0069] like Figure 4 As shown in the figure, the log processing module (Kafka) is a distributed, partitioned, multi-copy, multi-subscriber log system (distributed MQ system), which can be used for web / nginx logs, search logs, monitor logs, and access logs. It is a distributed message queue. It has high performance, persistence, multi-copy backup, and horizontal expansion capabilities. Producers write messages to the queue, and consumers take messages from the queue to perform business logic. It plays the role of decoupling, peak shaving, and asynchronous processing in log architecture design.

[0070] Kafka has a simple architecture. There can be multiple Producers, Brokers, and Consumers. Producers and consumers implement the Kafka registration interface. Data is sent from Producers to Brokers, which act as an intermediate cache and distributor. Brokers distribute consumers registered in the system. The role of Brokers is similar to cache, that is, a cache between active data and offline processing systems. The communication between the client and the server is based on the simple, high-performance TCP protocol that has nothing to do with programming languages.

[0071] The log storage module is based on the Lucene self-developed indexing and search system. Lucene is a Java-based full-text information retrieval toolkit. It is not a complete search application, but provides indexing and search functions for applications. Lucene is currently an open source project in the Apache Jakarta family. It is also the most popular Java-based open source full-text search toolkit. Application scenarios include search engines, site searches, and file system searches. The process of log retrieval: indexing and searching. Figure 5 described.

[0072] Indexing: Collect data—》KAFKA—》Document processing—》Store in the indexing system.

[0073] Search: Enter the query conditions -> query the index through lucene's query -> retrieve the results from the index library -> render the view.

[0074] The index processing program of each business environment consumes the topic logs of each business environment in Kafka to implement log persistence as files, log indexing, log alarm, and log statistics. Figure 6 The log storage module structure diagram shown includes:

[0075] File units are compressed and stored as original log files. They serve as a backup plan to prevent other system exceptions.

[0076] The search unit establishes a log index after index consumption, and establishes indexes that meet the requirements of each business according to different environments, business systems, business procedures, and business identifiers. It has solved various filtering conditions in the search process and met business needs.

[0077] The creation process of the index library is as follows: Figure 7 As shown, it includes: obtaining original documents, building document objects, analyzing documents, and creating indexes.

[0078] The alarm unit, based on the settings of monitoring scripts, alarm rules, alarm thresholds, alarm contacts, etc., will centrally notify, display and record the alarm results.

[0079] Filter: Select a data set by configuring multiple conditions.

[0080] Aggregation: Calculate the data set in the previous step using a predefined aggregation type to obtain a unique value.

[0081] Compare: Compare the result obtained in the previous step with the set threshold.

[0082] Email alarm: Different persons in charge are assigned to alarms, and relevant personnel are notified of system abnormalities via email.

[0083] WeChat alarm: WeChat alarm is the main alarm method, which can quickly and timely know the abnormal status and cause of a system.

[0084] Telephone alarm: Trigger telephone alarm according to the level of important business and system.

[0085] The overall alarm process is as follows Figure 8 shown.

[0086] The statistical unit has a wide range of business scope, mainly involving electronic coupons, payment systems, and order systems. In this process, the real-time throughput of the current system is known. The business department prints the logs in a formatted manner according to its own statistical needs. The system uses fink to collect business statistics within the real-time consumption log statistics time window. The process is as follows Fig. 9 shown.

[0087] The risk control unit and the consumption log of the risk control unit use a series of technical means and management measures to warn, prevent and respond to the risks of the enterprise based on the company's internal risk control monitoring. The risk control system discovers and identifies risks internally, reduces the possibility of risks, and ensures the safe and stable operation of the company's internal system.

[0088] Log visualization display module. The company has implemented a visualization log platform, which can track the execution of all business scenarios of any content with one click, and restore the execution site through a visualization link. The tracking effect is as follows: Fig.10 shown.

[0089] The log visualization display module can query business logs and exception logs according to relevant parameters based on the needs of the business department. It can display logs in real time and query, sort and filter logs according to different business parameters. It can query each system log and link relationship in the whole link.

[0090] This system mainly solves problems such as scattered logs that are inconvenient to view, complex and inefficient log search operations, and inability to detect business anomalies in a timely manner: the log processing module processes massive logs according to the business environment and business needs, and can be horizontally expanded; the log storage module can expand or shrink the log size at any time according to the log volume; the log search module can quickly search business-related logs to resolve system or business anomalies.

[0091] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0092] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A log management system, characterized in that: include: Log collection module, which collects log data from various sources and sends the data to the target location; Log processing module, used to process collected log data; Log storage module, used to store and search log data; Log visualization display module is used to display log query entry in real time.

2. The log management system according to claim 1, characterized in that: The log collection module uses the Filebeat log data collection tool.

3. The log management system according to claim 1, characterized in that: The various sources include: log files, system logs, Docker container logs, and Windows event logs.

4. The log management system according to claim 1, characterized in that: The log processing module uses a distributed MQ system for web / nginx logs, search logs, monitoring logs and access logs.

5. The log management system according to claim 1, characterized in that: The log storage module includes: a file unit for compressing and storing original log files; Search units include indexes established according to different environments, business systems, business procedures, and business identifiers to meet various business requirements; The alarm unit includes settings based on monitoring scripts, alarm rules, alarm thresholds, and alarm contacts, and is used to centrally notify and display alarm results and form alarm history records; The statistics unit is used to print logs in a certain format according to the real-time data throughput and the business department's own statistical needs. The system then consumes the business statistics within the log statistical time window in real time. The risk control unit is used to provide early warning, prevention and response to corporate risks based on the company's internal risk control monitoring and adopt a variety of technical means and management measures, thereby discovering and identifying risks within the company, reducing the possibility of risk occurrence, and ensuring the safe and stable operation of the company's internal systems.

6. The log management system according to claim 5, characterized in that: The index creation process includes: obtaining original documents, constructing document objects, analyzing documents, and creating indexes.

7. The log management system according to claim 1, characterized in that: The log visualization display module is used to track the execution of all business scenarios of any content with one click, and restore the execution site through a visual link.

8. The log management system according to claim 1, characterized in that: The log visualization display module is also used to query business logs and exception logs according to relevant parameters based on the needs of the business department.

9. The log management system according to claim 1, characterized in that: The log visualization display module is also used to display logs in real time and query, sort and filter logs according to different business parameters.

10. The log management system according to claim 1, characterized in that: The log visualization display module is also used to query the entire link of each system log and link relationship.

Citation Information

Patent Citations

  • A cloud log collection method based on distributed architecture

    CN109344033A

  • Three-dimensional log full-link monitoring system and method, medium and equipment

    CN114189430A

  • Visual monitoring system and method based on ELK

    CN116501584A

  • Log management system and method based on ElasticSearch

    CN117971606A