CN-117278433-B - Log management method and device, electronic equipment and readable storage medium
Abstract
The invention relates to the technical field of log acquisition and discloses a log management method, a log management device, electronic equipment and a readable storage medium. The method comprises the steps of obtaining acquisition configuration information of a log through a visualization page, wherein the visualization page comprises a log registration component, an acquisition rule configuration component and a host correlation component, the acquisition configuration information comprises log registration information obtained through the log registration component, acquisition rules obtained through the acquisition rule configuration component and target host information obtained through the host correlation component, deploying log acquisition service according to the target host information, configuring log acquisition tasks according to the log registration information and the acquisition rules, and controlling the log acquisition service to execute the log acquisition tasks to convert the acquired log data into quantifiable data. By implementing the method, the technical threshold of operation and maintenance personnel is reduced, and the log acquisition efficiency and accuracy are effectively improved.
Inventors
- YOU JINYI
- TIAN YE
- QIANG QUNLI
- LIU CHAOQIAN
- LIU XIAOGUANG
- WEI YING
- WANG XIAOZHE
Assignees
- 网联清算有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20220615
Claims (10)
- 1. A method of log management, the method performed by a log management platform, comprising: Acquiring acquisition configuration information of a log through a visual page, wherein the visual page comprises a log registration component, an acquisition rule configuration component and a host correlation component, and the acquisition configuration information comprises the log registration information acquired through the log registration component, the acquisition rule acquired through the acquisition rule configuration component and target host information acquired through the host correlation component; Deploying a log acquisition service according to the target host information, and configuring a log acquisition task according to the log registration information and the acquisition rule; And controlling the log acquisition service to execute the log acquisition task and converting the acquired log data into quantifiable data.
- 2. The method of claim 1, wherein at least one of the log registration component, the collection rule configuration component, and the host association component is pre-configured with a verification rule; The verification rule is used for limiting the input acquisition configuration information and/or verifying the input acquisition configuration information, and displaying prompt information under the condition that the verification is not passed, wherein the prompt information characterizes the modification prompt of the acquisition configuration information.
- 3. The method of claim 1, wherein at least one of the log registration component, the collection rule configuration component, and the host association component is pre-configured with a parameter generation rule; the acquiring the acquisition configuration information of the log through the visualization page comprises the following steps: and generating second acquisition configuration information according to the parameter generation rule and the first acquisition configuration information input through the visual page.
- 4. The method of claim 1, wherein deploying a log collection service based on the target host information comprises: And (3) based on the installation package of the log acquisition service, the log acquisition service is issued in the target host in a gray scale.
- 5. The method of claim 1, wherein the converting the collected log data into quantifiable data comprises: Collecting text data of an original log; asynchronous processing is carried out on the text data, so that processed text data are obtained; and performing word segmentation processing on the processed text data based on a regular rule to obtain quantifiable data.
- 6. The method of claim 1, wherein the visualization page further comprises an operation and maintenance configuration component, the acquisition configuration information further comprising operation and maintenance configuration information obtained by the operation and maintenance configuration component, the method further comprising: judging whether log monitoring is required to be executed or not based on the operation and maintenance configuration information; if log monitoring is required to be executed, monitoring whether the quantifiable data triggers an alarm condition or not; and if the quantifiable data triggers an alarm condition, sending out alarm information.
- 7. The method of any one of claims 1-6, further comprising: And sending the obtained quantifiable data to a log search engine for storage.
- 8. A log management device, applied to a log management platform, comprising: The acquisition module is used for acquiring acquisition configuration information of the log through a visual page, wherein the visual page comprises a log registration component, an acquisition rule configuration component and a host correlation component, and the acquisition configuration information comprises the log registration information acquired through the log registration component, the acquisition rule acquired through the acquisition rule configuration component and target host information acquired through the host correlation component; the deployment configuration module is used for deploying log acquisition service according to the target host information and configuring log acquisition tasks according to the log registration information and the acquisition rules; the conversion module is used for controlling the log acquisition service to execute the log acquisition task and converting the acquired log data into quantifiable data.
- 9. An electronic device, comprising: A memory and a processor, the memory and the processor being communicatively coupled to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the log management method of any of claims 1-7.
- 10. A computer-readable storage medium storing computer instructions for causing a computer to perform the log management method of any one of claims 1 to 7.
Description
Log management method and device, electronic equipment and readable storage medium Technical Field The invention relates to the technical field of log acquisition, in particular to a log management method, a log management device, electronic equipment and a readable storage medium. Background In general, the collection and quantitative analysis of the log file are realized based on the open source technologies of the jume and logstash, the main method is to deploy the jume-agent on the target server, grab and collect the content of the log file through the jume-agent, then quantitatively analyze the collected log data through logstash, and finally transfer the collected log data to ELASTICSEARCH service. However, the method involves a plurality of operation and maintenance components, the configuration process is complex, and the operation and maintenance personnel with insufficient technical level are difficult to configure successfully, so that the log collection efficiency is low, and the operation and maintenance cost is high. Disclosure of Invention In view of the above, the embodiments of the present invention provide a log management method, apparatus, electronic device, and readable storage medium, so as to solve the problems of higher operation and maintenance cost and lower log collection efficiency caused by complex log collection configuration process. According to a first aspect, the embodiment of the invention provides a log management method, which is executed by a log management platform and comprises the steps of acquiring acquisition configuration information of a log through a visual page, wherein the visual page comprises a log registration component, an acquisition rule configuration component and a host correlation component, the acquisition configuration information comprises the log registration information acquired through the log registration component, the acquisition rule acquired through the acquisition rule configuration component and target host information acquired through the host correlation component, deploying a log acquisition service according to the target host information, configuring a log acquisition task according to the log registration information and the acquisition rule, and controlling the log acquisition service to execute the log acquisition task to convert acquired log data into quantifiable data. According to the log management method provided by the embodiment of the invention, the acquisition configuration information of the log is obtained through the visual page, the acquisition configuration information comprises log registration information, acquisition rules and target host information, then the log acquisition service is deployed based on the target host information, and the log acquisition task is configured according to the log registration information and the acquisition rules, so that the log acquisition service is controlled to execute the log acquisition task, and the acquired log data is converted into quantifiable data. According to the method, effective configuration flow guidance is provided for the acquisition configuration information of the log through the visual page, operation and maintenance personnel can customize the acquisition configuration information of the log through the visual page, so that the technical threshold of the operation and maintenance personnel is reduced, log data corresponding to the operation and maintenance personnel are automatically acquired through the acquisition configuration information of the log, and the log acquisition efficiency and accuracy are effectively improved. With reference to the first aspect, in a first implementation manner of the first aspect, at least one component of the log registration component, the acquisition rule configuration component and the host association component is preset with a verification rule, the verification rule is used for limiting the input acquisition configuration information and/or verifying the input acquisition configuration information, and prompt information is displayed when the verification is not passed, wherein the prompt information characterizes a modification prompt of the acquisition configuration information. According to the log management method provided by the embodiment of the invention, the input acquisition configuration information is limited through the verification rule, and/or the input acquisition configuration information is verified, so that the prompt information for modifying the acquisition configuration information is generated when the verification is not passed, thereby prompting a user to adjust the acquisition configuration information according to the prompt information, avoiding configuration errors, effectively improving configuration efficiency and realizing the maximum optimization of acquisition configuration. With reference to the first aspect, in a second implementation manner of the first aspect, at least one compon