Log data monitoring method and device, electronic device and storage medium

By adding annotations to the monitoring unit to obtain log data call information, and configuring monitoring components for real-time processing, the problem of hysteresis in current limiting and circuit breaker operations in traditional monitoring methods is solved, and the stability and availability of the system in high concurrency scenarios are improved.

CN118656284AInactive Publication Date: 2024-09-17E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411146048.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the processor processing request speed is too high with traditional monitoring methods, there is lag in the data monitoring current limiting and circuit breaker operation, which fails to effectively solve the system stability problem in high concurrency scenarios.

Method used

By adding preset annotations to the logs to be monitored in the monitoring unit, the log data call information is obtained, and processed according to the parameter configuration of the monitoring component, thereby realizing real-time current limiting and circuit breaker operations on the log data call information.

Benefits of technology

It implements real-time current limiting and circuit breaker for log data call information, improves the stability and availability of the system in high concurrency scenarios, and avoids the lag problem in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656284A
    Figure CN118656284A
Patent Text Reader

Abstract

The invention relates to a log data monitoring method and device, an electronic device and a storage medium, and the log data monitoring method comprises the steps: adding a preset annotation to a to-be-monitored log of a monitoring unit, and obtaining log data calling information through the annotation; in response to the log data monitoring request, performing parameter configuration on a monitoring component of the monitoring unit; and processing the log data calling information through the monitoring component. According to the method and the device, the real-time performance of carrying out the current-limiting fusing operation on the log data calling information is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a log data monitoring method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of the Internet, various online services and applications have emerged one after another, bringing great convenience to users. However, with the surge in the number of users and the increase in application load, how to ensure the stability and availability of services has become an important issue. Monitoring and current limiting as an effective response measure can protect the system from excessive load in high-concurrency scenarios and ensure the stable operation of services.

[0003] Traditional monitoring methods generally involve real-time monitoring based on monitoring tools, or collecting and analyzing log files to obtain system operating status and event information, and promptly discover and locate problems. However, when using these traditional monitoring methods, when the processor processes requests too quickly, the method of collecting and analyzing data and then executing the corresponding current limiting and fuse strategies has a certain lag.

[0004] With regard to the problem of lag in current limiting and fusing operations for data monitoring in related technologies, no effective solution has been proposed so far. Summary of the invention

[0005] In this embodiment, a log data monitoring method, device, electronic device and storage medium are provided to solve the problem of hysteresis in current limiting and fusing operations for data monitoring in related technologies.

[0006] In a first aspect, a log data monitoring method is provided in this embodiment, the method comprising: Adding a preset annotation to the monitored log of the monitoring unit, and obtaining log data call information through the annotation; In response to the log data monitoring request, parameter configuration is performed on the monitoring component of the monitoring unit; The log data call information is processed by the monitoring component.

[0007] In some embodiments, the adding of a preset annotation to the monitored log of the monitoring unit includes: Presetting a monitoring framework of the monitoring unit, wherein the monitoring framework includes the preset annotation; The preset annotation is marked at the business code corresponding to the log to be monitored to monitor the log to be monitored and obtain the log data calling information.

[0008] In some embodiments, in response to the log data monitoring request, configuring parameters of the monitoring component of the monitoring unit includes: In response to the log data monitoring request, obtaining parameters of a first configuration loading component; the first configuration loading component includes a component for processing the log data call information; According to the parameters of the first configuration loading component, the first configuration loading component is added to the monitoring component.

[0009] In some embodiments, the configuring parameters of the monitoring components of the monitoring unit further includes: In response to the log data monitoring request, obtaining a second configuration loading component; the second configuration loading component includes a component after updating the first configuration loading component; The parameters of the monitoring component are updated through the second configuration loading component.

[0010] In some embodiments, the processing of the log data call information by the monitoring component includes: The parameters of the monitoring component include preset fuse parameters; Determining whether the log data call information exceeds the preset fuse parameter; If exceeded, the fuse result will be output.

[0011] In some embodiments, the determining whether the log data call information exceeds the preset fuse parameter includes: When the log data call information does not exceed the preset fuse parameter, the log data call information is analyzed by a counting component to obtain an analysis result; When the analysis result does not exceed the preset current limiting parameter, the log data calling information is output according to a preset log format.

[0012] In some embodiments, the method further comprises: Obtain a program interface of the monitoring component, and modify parameter configuration of the monitoring component according to the program interface.

[0013] In a second aspect, a log data monitoring device is provided in this embodiment, the device comprising: a configuration module, a response module, and a processing module; The configuration module is used to add preset annotations to the log to be monitored, and obtain log data call information through the annotations; The response module is used to configure parameters of the monitoring component of the monitoring unit in response to the log data monitoring request; The processing module is used to process the log data call information through the monitoring component.

[0014] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the log data monitoring method described in the first aspect when executing the computer program.

[0015] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the log data monitoring method described in the first aspect is implemented.

[0016] Compared with the related art, a log data monitoring method, device, electronic device and storage medium provided in this embodiment add monitoring logic to the log of the monitoring unit through non-invasive annotations, obtain log data call information through annotations, and configure parameters of the monitoring component according to the monitoring request of the log data, and then process the log data call information through the monitoring component, thereby realizing the real-time current limiting and fuse operation of the log data call information.

[0017] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 It is a hardware structure block diagram of a terminal of the log data monitoring method provided in an embodiment of the present application; Figure 2 is a flow chart of a log data monitoring method provided by an embodiment of the present application; Figure 3 is a schematic diagram of a service unit provided in this specific embodiment; Figure 4 This is a flow chart of aspect control of resources provided in this specific embodiment; Figure 5 is a schematic diagram of the service components provided in this specific embodiment; Figure 6 is a flow chart of the current limiting fusing method provided in this specific embodiment; Figure 7 It is a structural block diagram of the log data monitoring device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0020] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0021] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 1 is a hardware structure diagram of a terminal of the log data monitoring method provided in the embodiment of the present application. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0022] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the log data monitoring method in the present embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0023] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0024] Traditional monitoring methods generally start from the following four aspects: 1. Monitoring tools, such as Nagios, Zabbix, Prometheus, etc., provide real-time monitoring of systems, networks, applications, devices, etc.

[0025] 2. Log analysis: By collecting and analyzing log files, we can obtain the system’s operating status and event information, and promptly discover and locate problems.

[0026] 3. Performance analysis: Evaluate the system's operating status and performance bottlenecks by analyzing system performance indicators such as CPU, memory, and disk usage.

[0027] 4. Security monitoring: Use security monitoring tools such as Snort, Suricata, IDS, etc. to monitor and analyze network traffic in real time to promptly detect and respond to various security threats.

[0028] These traditional monitoring methods are often too complicated, require more servers and system resources, and have a certain lag. After data collection and analysis, the current limiting and circuit breaking strategies are implemented. This is often not applicable in systems with too high QPS (Queries-per-second).

[0029] Therefore, a log data monitoring method is provided in the embodiment of the present application. Through SDK (Software Development Kit, software development kit service component), the log point analysis is completed in a lightweight manner. Within a single POD (smallest, deployable computing unit) service, the flow limiting strategy can be autonomously obtained and executed, and the monitoring flow limiting function can be completed efficiently. Among them, POD is a computing unit in an open source container orchestration system. POD contains one or more containers, which share storage, network, and container runtime environment. Figure 2 is a flow chart of the log data monitoring method provided by the embodiment of the present application, such as Figure 2 As shown, the process includes the following steps: Step S210, adding a preset annotation to the to-be-monitored log of the monitoring unit, and obtaining log data call information through the annotation.

[0030] Among them, the processor obtains the monitored logs that need to be monitored and limited in the monitoring unit, and obtains the log data call information of the monitored log in the form of annotations to achieve non-invasive acquisition of log data call information. Exemplarily, the method of obtaining log data call information includes aspect-oriented programming (AOP), which allows cross-cutting concerns (such as logging, transaction management, etc.) to be separated without changing the business logic code. For example, in the Spring framework, AspectJ can be configured to intercept specific classes or methods and insert log records. It is also possible to decide whether to turn on detailed logging by reading switches in environment variables or configuration files, so that the log level and output format can be adjusted without modifying the code, thereby obtaining log data call information.

[0031] Furthermore, a monitoring framework of the monitoring unit is preset, and the monitoring framework includes preset annotations; the preset annotations are marked at the business code corresponding to the log to be monitored to monitor the log to be monitored and obtain log data call information.

[0032] The specific method of obtaining log data call information in the form of annotations is to obtain the monitoring framework of the monitoring unit to ensure that the monitoring project is compatible with the monitoring framework launcher, and mark the customized annotations at the log to be monitored according to the customized annotations; then create a section, process the annotated method through the section, and record log information before and after the method processing. When the annotated method is called, non-intrusive log data call information is realized.

[0033] Step S220: In response to the log data monitoring request, parameter configuration is performed on the monitoring component of the monitoring unit.

[0034] Among them, after the processor receives the log data monitoring request sent by the client, it configures the parameters of the monitoring component of the monitoring unit according to the monitoring strategy of the log to be monitored in the log data monitoring request. Furthermore, the configured monitoring component includes a configuration loader component, a counter component and a current limiting fuse component, and the monitoring component is configured according to the actual monitoring request to realize the imperceptible processing of the log data call information.

[0035] Step S230: Process the log data call information through the monitoring component.

[0036] The processor processes the log data call information obtained non-invasively through the monitoring component configured according to the log data monitoring request, so as to perform current limiting and fusing operations on the log data according to the call status of the obtained resources.

[0037] Through the above-mentioned log data monitoring method, monitoring logic is added to the log of the monitoring unit through non-invasive annotations, and log data call information is obtained through annotations. According to the monitoring request of the log data, the monitoring component is configured with parameters, and then the log data call information is processed by the monitoring component, thereby realizing the real-time current limiting and fuse operation of the log data call information.

[0038] In some of the embodiments, in step S220 , in response to the log data monitoring request, parameter configuration is performed on the monitoring component of the monitoring unit, including steps S221 to S222 .

[0039] Step S221, in response to the log data monitoring request, obtain the parameters of the first configuration loading component; the first configuration loading component includes a component for processing log data call information. According to the parameters of the first configuration loading component, add the first configuration loading component to the monitoring component.

[0040] In response to the log data monitoring request sent by the client, according to the log data monitoring request, the parameters of the first configuration loading component pre-set by the user are loaded, and the configured parameters include current limiting parameters and fuse parameters. Exemplarily, the parameters of the first configuration loading component can be set default values, or can be configured by the user according to actual monitoring needs, which is not specifically limited here.

[0041] Step S222, when the parameter configuration of the monitoring component needs to be updated and modified, in response to the log data monitoring request, a second configuration loading component is obtained; the second configuration loading component includes a component after the first configuration loading component is updated; the parameters of the monitoring component are updated through the second configuration loading component.

[0042] Among them, when the client needs to modify the monitoring current limiting and fuse strategies according to actual needs, the first configuration loading component is modified to obtain the second configuration loading component corresponding to the updated current limiting and fuse strategies, and the parameters in the monitoring component are updated accordingly.

[0043] Based on the parameter configuration method in the above embodiment, the configured current limiting strategy is determined according to the client's log data monitoring request, that is, the parameters of the monitoring component are configured; when the current limiting strategy needs to be modified, it is only necessary to modify the parameters of the monitoring component accordingly, so that the client can configure the parameters of the monitoring component according to actual needs, so as to personalize the monitoring component according to monitoring needs, which can be widely used in various online services and applications, and provide strong support for ensuring the stability and availability of services.

[0044] In some embodiments, the log data call information is processed by the monitoring component in step S230, including: Step S231, the parameters of the monitoring component include preset fuse parameters; determine whether the log data call information exceeds the preset fuse parameters; if exceeded, output the fuse result.

[0045] Based on the above processing steps for log data call information, when the monitoring component configures the limited flow circuit breaker parameters and turns on the limited flow circuit breaker, it is determined whether the log data call information exceeds the preset circuit breaker parameters; if it exceeds, the circuit breaker result is output to the client. At this time, the corresponding downstream resources cannot be reached, that is, subsequent log data calls cannot be made.

[0046] Step S232, when the log data call information does not exceed the preset fuse parameter, the log data call information is analyzed by the counting component to obtain an analysis result. When the analysis result does not exceed the preset current limiting parameter, the log data call information is output according to the preset log format.

[0047] Among them, when it is determined that the log data call information does not exceed the preset fuse parameters, the log data call information is analyzed through the counting component to determine whether the analysis result meets the preset current limiting parameters. When the analysis result exceeds the preset current limiting parameters, the call of the log data needs to be current limited. When the analysis result does not exceed the preset current limiting parameters, the log data call information of this response monitoring is output according to the preset log format, and data support is provided for the next current limiting fuse task based on the current log data call information, which is conducive to adaptively modifying the configuration parameters of the monitoring component according to the real-time response data, and is conducive to improving the accuracy of the monitoring current limiting fuse strategy.

[0048] In some of the embodiments, the log data monitoring method further includes: obtaining a program interface of the monitoring component, and modifying parameter configuration of the monitoring component according to the program interface.

[0049] The present embodiment is described and illustrated by means of specific examples below.

[0050] This specific embodiment is based on the existing monitoring and limiting method of the capability exposure platform, and proposes a programmable adaptive capability exposure platform monitoring and limiting method. This method realizes autonomous monitoring and can quickly statistically analyze the call status of the API; it can also realize flexible and autonomous circuit breaker and current limiting configuration. Among them, the capability exposure platform is a way of capability combination and orchestration to achieve efficient collaboration of services. The platform can combine multiple capabilities according to its own business needs to achieve flexible customization of business scenarios. This kind of orchestration has a fatal flaw, high throughput, and strong dependence on the downstream. Once the performance of the downstream is bottlenecked, it will occupy a large amount of IO and cause an avalanche.

[0051] Specifically, autonomous monitoring: based on POD, log collection, analysis and aggregation are completed. Service integrators can complete log collection by adding corresponding annotations to the resources that need to be monitored, including but not limited to API (Application Programming Interface) methods. The collected data is the basis for current limiting. Conversely, the collection and analysis of these data can help users achieve adaptive current limiting effects.

[0052] Flexible and autonomous circuit breaker and current limiting configuration: When the service component is introduced, the current limiting strategy configured by the user will be loaded by default (the default value will be used if not configured). After the POD service is running, the user can modify the current limiting strategy at any time according to actual needs. In addition, the component also supports SPI (Service Provider Interface) extension, which is used to provide plug-ins and has good scalability and ease of use. Users can customize their own strategies and modify the implementation mode at any time. It can be widely used in various online services and applications, providing strong support for ensuring the stability and availability of services.

[0053] This specific embodiment introduces service components so that the service integrator can collect and monitor related resources on demand, configure current limiting and fuse configurations on demand, and even customize its own business logic on demand, which is beneficial to improving the stability and availability of the service.

[0054] Figure 3 is a schematic diagram of a service unit provided in this specific embodiment. Figure 3, a service component SDK (Software Development Kit, software development kit service component) is introduced into the service unit pod, and current limiting configuration is performed in the service component. Specifically, the current limiting configuration is loaded before the service is started, and the application programming interface API of the current limiting configuration is exposed after the service is started to realize subsequent configuration changes; at the same time, SPI is implemented according to actual needs. After the service is started normally, the entire service unit automatically integrates monitoring, current limiting and fuse functions. Among them, the service supply interface-SPI is a function of the Java platform, which allows third parties to provide plug-in interfaces for Java core class libraries, extension points or other services; that is, the service supply interface is implemented on demand, optionally, through the built-in mainstream implementation of the component. SPI is a service discovery mechanism, which is based on the service provision mechanism of Java, and allows third-party service implementers to provide extended functions for the system without modifying the original code. The service component here is the monitoring component in the aforementioned embodiment. After the service component is configured, resource monitoring is added by annotation, and then the service is started.

[0055] Figure 4 This is a flowchart of the aspect control of resources provided by this specific embodiment, such as Figure 4 As shown, the monitoring data collection method in this specific embodiment is based on the AOP mode of spring. Under the AOP mode of spring, resources are subject to aspect control and can be divided into a data collection and analysis module and a current limiting and fuse component module according to function.

[0056] The data collection module collects the incoming resource data, including resource ID, execution time, and exception information. It uses the counter component to count the running status per unit time and output a specific log format.

[0057] The current limiting fuse module is mainly composed of three components: the configuration loader component, the counter component, and the current limiting fuse component. These three components all provide SPI expandable functions and built-in implementations. The configuration loader component is responsible for loading and changing configuration information for use by the counter and current limiting fuse. The counter component, the core computing module, statistically analyzes resource calls and provides a decision basis for current limiting fuses. The current limiting fuse module is responsible for decision-making and implementation operations. When the current limiting fuse switch is turned on (provided by the configuration loader component), the relevant processing logic is performed.

[0058] Among them, the configuration loading component provides automatic configuration loading and hot update functions, and determines the introduction of functional components. For example, users can choose to introduce only data collection, or only need to limit the flow of fuses. The counter component uses the cache mode by default. One advantage here is that it directly analyzes the operation of the pod and avoids being affected by other data in the cluster. The fuse and current limiting component triggers the fuse and current limiting action when the resource call of the service has a bottleneck, that is, the QPS is too high, or it is not reachable at all. The resource response information is pre-configured information.

[0059] refer to Figure 4 , the overall business logic includes the following: first, collect the section data, that is, collect the log data call information in the aforementioned embodiment; then perform data analysis according to the current limiting fuse component, wherein the current limiting fuse component is provided with an application programming interface API of the configuration loader component, which is used to provide access to and modify the configuration entry; a counter component service supply interface SPI is also provided, in which a single service unit pod is built in and implemented through the Redis cluster version; a limited current fuse component service supply interface SPI is also provided, which is built in the service unit and meets the business customization and scalability requirements. After the data is analyzed, the corresponding structured log is output through the configured monitoring component, and at the same time, an extensible log output service supply interface SPI is provided in the output part. After the structured log is output, the section ends and a resource response is generated, which is conducive to improving the real-time performance of the current limiting fuse operation.

[0060] In one specific embodiment, the configuration integration steps are as follows: Step 1: Component integration. You can introduce components through building tools such as gradle or Maven, then add monitoring resources (including but not limited to API calls and database calls, etc.), and finally, configure service parameters as needed (no configuration means using the default values, which does not affect the startup and operation of the service itself), such as whether to enable log monitoring, whether to enable current limiting, counter configuration, and the counter middleware used (such as Menory, Redis), etc.

[0061] Step 2: Service startup and configuration loading. A component associated here is the configuration loading component. After the service is started, the configuration is automatically loaded. For configuration modification, the component has an exposed API to implement hot updates.

[0062] Step 3: Resource call and response. The service component SDK provides a black box, and the business implementation is completely unaffected.

[0063] Figure 5 is a schematic diagram of the service components provided in this specific embodiment, refer to Figure 5Optionally, the service component SDK is configured with multiple SPIs, including caching, resource monitoring, and log output, which can be implemented through built-in memory or built-in log4j versions. When resource scheduling and response are required, they are performed directly in the service component SDK, and the business is not aware of them. After completing the monitoring current limiting and fuse tasks, the log data call information is output to the analysis system-ELK system in a preset log format. Among them, the ELK system is a log analysis platform composed of three open source tools: Elasticsearch, Logstash, and Kibana. Elasticsearch is a highly scalable full-text search and analysis engine, Logstash is used to collect, convert and transmit log data, and Kibana provides a visual interface for searching, analyzing and displaying log data.

[0064] Figure 6 is a flow chart of the current limiting fusing method provided in this specific embodiment, refer to Figure 6 After initiating resource access, configure the loader component; when the configuration is turned on, it reaches the current limiting component to determine whether to turn on the current limiting fuse. After that, when the current limiting fuse is turned on, the red light judgment is triggered. The red light means the fuse is blown, and the downstream resource is no longer reachable. The response result can be returned directly. The yellow light means current limiting. Statistics show whether it meets the current limiting settings (i.e. QPS per unit time). Under the green light, call the resource to respond normally. Before responding, trigger the asynchronous task to provide data decision for the next current limiting fuse. Finally, the log module uniformly outputs log information and archives it to systems such as ELK to provide a data source for subsequent data statistical analysis and reporting.

[0065] Through the programmable adaptive capability open platform monitoring and limiting method provided by the present application, when the service component is introduced, resources are added by annotation, including but not limited to the access to API resources, which is more flexible; real-time data, including pod information, number of requests, response time, error rate, etc., are collected non-invasively, providing a basis for subsequent current limiting strategies, and standard log formats can also be directly output for analysis and collection by ELK, etc.; users can customize monitoring strategies, including current limiting types (such as whether current limiting is a fuse, a counter), thresholds, duration, etc.; component control can also be performed, such as only introducing log components or current limiting functions; requests can also be current limited according to real-time monitoring results and adaptively adjusted current limiting strategies to ensure stable operation of the system; through non-invasive component injection, the original business is not affected, and resource statistics and management functions can be realized by simply adding resource annotations; and all core components provide SPI extensions, which can easily realize component reconstruction and customization.

[0066] Therefore, it can be widely used in capability exposure platforms and traditional microservice architectures. In capability exposure platforms, the number of requests and response time of each service node are monitored, and some unstable resources are timely limited and fuse-broken to ensure the stability and reliability of the platform. In traditional microservice architectures, each service of the microservice architecture is monitored to improve the availability and scalability of the system.

[0067] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0068] In this embodiment, a log data monitoring device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0069] Figure 7 is a structural block diagram of a log data monitoring device provided in an embodiment of the present application, such as Figure 7 As shown, the device includes: a configuration module 10, a response module 20 and a processing module 30.

[0070] The configuration module 10 is used to add preset annotations to the log to be monitored and obtain log data call information through the annotations.

[0071] The response module 20 is used to perform parameter configuration on the monitoring components of the monitoring unit in response to the log data monitoring request.

[0072] The processing module 30 is used to process the log data call information through the monitoring component.

[0073] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0074] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0075] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0076] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program: S1, add a preset annotation to the monitored log of the monitoring unit, and obtain log data call information through the annotation.

[0077] S2, in response to the log data monitoring request, configuring parameters of the monitoring components of the monitoring unit.

[0078] S3, processes the log data call information through the monitoring component.

[0079] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0080] In addition, in combination with the log data monitoring method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program; when the computer program is executed by a processor, any log data monitoring method in the above embodiments is implemented.

[0081] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0082] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0083] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0084] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A log data monitoring method, characterized in that: The method comprises: Adding a preset annotation to the monitored log of the monitoring unit, and obtaining log data call information through the annotation; In response to the log data monitoring request, parameter configuration is performed on the monitoring component of the monitoring unit; The log data call information is processed by the monitoring component.

2. The log data monitoring method according to claim 1, characterized in that: The adding of the preset annotation to the monitored log of the monitoring unit includes: Presetting a monitoring framework of the monitoring unit, wherein the monitoring framework includes the preset annotation; The preset annotation is marked at the business code corresponding to the log to be monitored to monitor the log to be monitored and obtain the log data calling information.

3. The log data monitoring method according to claim 1 or claim 2, characterized in that: The step of performing parameter configuration on the monitoring component of the monitoring unit in response to the log data monitoring request includes: In response to the log data monitoring request, obtaining parameters of a first configuration loading component; the first configuration loading component includes a component for processing the log data call information; According to the parameters of the first configuration loading component, the first configuration loading component is added to the monitoring component.

4. The log data monitoring method according to claim 3, characterized in that: The parameter configuration of the monitoring component of the monitoring unit also includes: In response to the log data monitoring request, obtaining parameters of a second configuration loading component; the second configuration loading component includes a component that is updated from the first configuration loading component; The parameters of the monitoring component are updated by using the parameters of the second configuration loading component.

5. The log data monitoring method according to claim 1, characterized in that: The processing of the log data call information by the monitoring component includes: The parameters of the monitoring component include preset fuse parameters; Determining whether the log data call information exceeds the preset fuse parameter; If exceeded, the fuse result will be output.

6. The log data monitoring method according to claim 5, characterized in that: The determining whether the log data call information exceeds the preset fuse parameter includes: When the log data call information does not exceed the preset fuse parameter, the log data call information is analyzed by a counting component to obtain an analysis result; When the analysis result does not exceed the preset current limiting parameter, the log data calling information is output according to a preset log format.

7. The log data monitoring method according to claim 1, characterized in that: The method further comprises: Obtain a program interface of the monitoring component, and modify parameter configuration of the monitoring component according to the program interface.

8. A log data monitoring device, characterized in that: The device comprises: a configuration module, a response module, and a processing module; The configuration module is used to add preset annotations to the log to be monitored, and obtain log data call information through the annotations; The response module is used to configure parameters of the monitoring component of the monitoring unit in response to the log data monitoring request; The processing module is used to process the log data call information through the monitoring component.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the log data monitoring method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the log data monitoring method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Unified service traffic-limiting fusing platform and method thereof

    CN111787073A

  • Data processing method and apparatus, electronic device, and storage medium

    WO2022068761A1