PolarDB alarm docking adaptation method and device
By embedding monitoring hooks on the PolarDB cluster and grab event information in real time, and generating alarm information with preset mapping and filtering rules, the problem of timely and accurate alarm delivery in the PolarDB monitoring system is solved, and efficient abnormal judgment and intelligence are achieved alarm processing.
Patent Information
- Application Number
- CN202411495072.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-18
AI Technical Summary
How to achieve timely and accurate alarm delivery in PolarDB production environment, adapt to existing specifications and configurations to flexibly adjust, and improve the abnormal judgment ability and alarm processing efficiency of the monitoring system.
By embedding monitoring hooks in the online work order of PolarDB cluster, it realizes automatic registration, actively crawls event information in real time, and analyzes and filters based on preset mapping rules and filtering rules, generates target alarm information and sends it to the associated alarm object .
The abnormal judgment ability and alarm timeliness of the monitoring system are improved, the alarm processing process is optimized, the processing efficiency is improved, and alarm analysis is performed through large models, improving the level of intelligence.
Smart Images

Figure CN119484243A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of platform monitoring technology, and in particular to a PolarDB alarm docking adaptation method and device. Background Art
[0002] PolarDB is a new generation of relational cloud-native database that combines the advantages of commercial databases and open source cloud databases. It has both the low-cost advantage of distributed design and the ease of use of centralized design.
[0003] PolarDB has become the first choice for many enterprises and organizations in the process of digital transformation due to its excellent performance, high availability and cloud-native features. With the increasing deployment of PolarDB in production environments, how to adapt alarms to existing specifications, flexibly adjust configurations and deliver alarms in a timely and accurate manner has become a key issue facing current monitoring. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a PolarDB alarm docking adaptation method and device, which can improve processing efficiency.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a PolarDB alarm docking adaptation method, the method comprising:
[0007] Automatic registration is achieved by embedding a monitoring hook in the PolarDB cluster launch ticket to monitor the launched PolarDB cluster.
[0008] During the monitoring process, event information is captured in real time and analyzed based on preset mapping rules to obtain key field information.
[0009] The key field information is filtered based on a preset filtering generation rule to obtain a target alarm event, target alarm information is generated based on the target alarm event, and the alarm information is sent to an associated alarm object.
[0010] In a second aspect, an embodiment of the present application further provides a PolarDB alarm docking adaptation device, the device comprising:
[0011] The monitoring module is used to monitor the online PolarDB cluster by embedding a monitoring hook in the PolarDB cluster online work order to achieve automatic registration;
[0012] The capture module is used to actively capture event information in real time during the monitoring process, and parse and process the event information based on preset mapping rules to obtain key field information;
[0013] A generation module is used to filter the key field information based on a preset filtering generation rule to obtain a target alarm event, generate target alarm information based on the target alarm event, and send the alarm information to an associated alarm object.
[0014] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the PolarDB alarm docking adaptation method described in any one of the first aspects.
[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the PolarDB alarm docking adaptation method described in any one of the first aspects is executed.
[0016] The embodiments of the present application have the following beneficial effects:
[0017] (1) Enhance the ability to judge abnormal monitoring and improve the timeliness of alarms:
[0018] By choosing active alarm acquisition methods, the limitations of passive methods such as websocket and Trap are avoided, and abnormal situations of PolarDB can be discovered and handled more promptly. The established monitoring self-abnormal judgment mechanism can automatically generate alarms for potential problems such as the network and PolarDB monitoring services, improving the reliability and response speed of the monitoring system. By regularly comparing the number of messages, the integrity and accuracy of the monitoring data are ensured, further enhancing the abnormal judgment ability of the monitoring system.
[0019] (2) Optimize the alarm processing process and improve processing efficiency: Establish two layers of rules on the service side and the user side, so that the urgency of alarm processing is closer to the actual situation, and improve the pertinence and efficiency of alarm processing. The service side rules convert event messages into Alert alarms, simplify the alarm processing process, and reduce the difficulty of processing. The user side rules are defined in the configuration center, which improves the flexibility of adjustment and makes alarm processing more in line with actual needs.
[0020] (3) Applying large models to analyze alarms and improve the level of intelligence: By building a professional PolarDB alarm analysis vector knowledge base and combining it with the large model RAG application mode, it can automatically and accurately interpret PolarDB alarms and provide scientific processing suggestions and strategies in real time, thereby improving the level of intelligence in alarm processing. It allows users to revise and supplement professional knowledge based on practical experience, realizes continuous optimization and self-iteration of the knowledge base, and enhances the accuracy and practicality of alarm analysis. Programmatically and regularly detects the company's PolarDB documents and updates the vector library, which can cope with the impact of continuous iterations of PolarDB and ensure the timeliness and accuracy of alarm analysis.
[0021] To sum up, the embodiments of the present application can significantly improve the abnormal judgment ability, alarm processing efficiency and intelligence level of the PolarDB monitoring system, and provide more reliable, efficient and intelligent support for the company's operation and maintenance work. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 is a flowchart of steps S101-S103 provided in an embodiment of the present application;
[0024] Figure 2 It is a flowchart of steps S201-S202 provided in an embodiment of the present application;
[0025] Figure 3 It is a flowchart of steps S301-S304 provided in an embodiment of the present application;
[0026] Figure 4 It is a flowchart of steps S401-S402 provided in an embodiment of the present application;
[0027] Figure 5 This is a schematic diagram of the PolarDB alarm docking adaptation provided in the embodiment of the present application;
[0028] Figure 6 It is a structural diagram of the PolarDB alarm docking adapter device provided in an embodiment of the present application;
[0029] Figure 7 It is a schematic diagram of the composition structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0030] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0031] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0032] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0033] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0034] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0036] See also Figure 1 , Figure 1This is a flowchart of steps S101-S103 of the PolarDB alarm docking adaptation method provided in the embodiment of the present application, which will be combined with Figure 1 Steps S101-S103 are shown for explanation.
[0037] In step S101, automatic registration is achieved by embedding a monitoring hook in the PolarDB cluster online work order to monitor the online PolarDB cluster.
[0038] See also Figure 5 , Figure 5 This is a schematic diagram of the PolarDB alarm docking adaptation provided in the embodiment of the present application, such as Figure 5 As shown in the figure, first define a monitoring hook. In the PolarDB cluster online work order system, define a monitoring hook. In the automated script or work order approval process for cluster online, embed the call to the monitoring hook. When the cluster is successfully online, the call of the monitoring hook is automatically triggered. When the monitoring hook is triggered, a registration request is sent to the monitoring platform to register the newly launched PolarDB cluster information (such as cluster ID, IP address, port, etc.) into the monitoring system.
[0039] In step S102, during the monitoring process, event information is actively captured in real time, and the event information is parsed based on a preset mapping rule to obtain key field information.
[0040] Here, according to the preset mapping rules, the received Event events are deeply parsed to extract key field information, and the event information is actively captured in real time through the PolarDB Http Api interface; regular omission verification is performed to compare the number of event messages within the time period to avoid information omission and ensure data integrity. According to the preset mapping rules, the received Event events (event information) are deeply parsed to extract key field information.
[0041] In step S103, the key field information is filtered based on a preset filtering generation rule to obtain a target alarm event, target alarm information is generated based on the target alarm event, and the alarm information is sent to an associated alarm object.
[0042] Here, a set of filtering generation rules is preset in the monitoring platform to filter the parsed key field information and generate target alarm events. For example, it can be set that only events with a CPU usage rate of more than 80% for more than 5 minutes will generate an alarm. According to the filtering generation rules, the parsed key field information is filtered and processed to generate the target alarm event. Based on the target alarm event, an alarm message containing alarm details (such as alarm type, alarm level, occurrence time, cluster information, etc.) is generated. Alarm objects associated with the alarm information are configured in the monitoring platform, such as operation and maintenance personnel, development team, etc. Alarm information can be sent via email, text message, instant messaging tools, etc. When the target alarm event occurs, the monitoring platform automatically sends the alarm information to the associated alarm object.
[0043] In some embodiments, see Figure 2 , Figure 2 It is a flowchart of steps S201-S202 provided in an embodiment of the present application. The method also includes steps S201-S202, which will be described in combination with each step.
[0044] In step S201, in response to an adjustment request for the filter generation rule, the adjusted filter generation rule is received; wherein the adjustment request includes at least one of adjustment of events requiring alarm, adjustment of alarm levels, and automatic adjustment of alarm events and / or alarm levels within a specific time period.
[0045] In step S202, the plaintiff alarm generation rule is updated based on the adjusted filter generation rule.
[0046] Here, the embodiment of the present application allows users to define alarm reshaping rules through the configuration center, such as adjustment of alarm content, upgrade and downgrade of levels, etc., and supports automatic adjustment of alarm levels in specific time periods (such as key protection periods). In the monitoring system, there may be a need to adjust the filter generation rules. These adjustments may be due to changes in business, adjustments to operation and maintenance strategies, or feedback on existing alarm effects.
[0047] When an adjustment request is received, the system receives and parses the adjusted filter generation rules. These adjustments include:
[0048] Adjustments to alarm events are required: add or delete specific alarm event types, or modify the trigger conditions of existing alarm events.
[0049] Adjustment of alert level: Adjust the alert level (such as from warning to severe) according to the severity of the incident or the scope of impact.
[0050] Automatic adjustment within a specific time period: Set to automatically adjust alarm events or alarm levels within a specific time period. For example, lower the alarm threshold during business peaks to more sensitively capture potential problems; raise the threshold during business troughs to reduce unnecessary alarms.
[0051] After receiving and parsing the adjusted filtering generation rules, the system needs to update the original alarm generation rules. After the rules are updated and verified to be correct, the system applies these updated rules in real time, which means that the monitoring system will start using the new rules to filter key field information and generate target alarm events.
[0052] After the rules are updated and applied, the system also needs to notify the relevant operation and maintenance personnel or management team so that they can understand the current alarm strategy and make further adjustments or optimizations as needed. This method can achieve dynamic adjustment and optimization of the filter generation rules, so as to better adapt to changes in business needs and operation and maintenance strategies.
[0053] In some embodiments, the method further comprises:
[0054] In response to a request to view the alarm information, the alarm information is displayed through a first display area and suggestion information is displayed through a second display area; wherein the suggestion information is used to provide alarm explanations and handling opinions, and the suggestion information is provided through a preset knowledge base, and the knowledge base is built based on PolarDB help documents and / or artificial intelligence big models.
[0055] Here, when the operation and maintenance personnel or relevant management teams need to view the alarm information, they can initiate a viewing request through the interface or tools provided by the monitoring system. The system responds to these requests and displays the corresponding alarm information. After receiving the viewing request, the system will display the alarm information in the first display area. This information usually includes the alarm type, alarm level, trigger condition, occurrence time, and detailed information of the affected PolarDB cluster. This information provides the context and severity of the problem.
[0056] In addition to displaying alarm information, the system also displays suggestion information in the second display area. These suggestions are intended to provide explanations and handling opinions for alarms to help operation and maintenance personnel understand and solve problems more quickly. Suggestion information is provided through a preset knowledge base. This knowledge base is built based on PolarDB's help documents and / or artificial intelligence big models. PolarDB's help documents provide detailed information on database operations, configuration, troubleshooting, etc., while the artificial intelligence big model is able to provide intelligent suggestions and solutions based on a large amount of historical data and experience.
[0057] In some embodiments, the knowledge base is constructed by at least one of the following methods:
[0058] Obtain key warning information, error codes, and detailed explanations in the PolarDB help document, convert the key warning information, the error codes, and the detailed explanations into vectors, perform natural language processing on the vectors, and obtain the knowledge base;
[0059] Integrate the knowledge base with a large model RAG system to retrieve relevant alarm explanations from the knowledge base through the large model RAG and generate the suggestion information;
[0060] The knowledge base is updated based on the iteration of PolarDB;
[0061] The information in the knowledge base is corrected or supplemented through the modification interface.
[0062] The following is a detailed explanation of how to build and maintain a knowledge base using the PolarDB help documentation, the large model RAG system, and the iterative updates of PolarDB:
[0063] 1) Use PolarDB help documentation to build a knowledge base.
[0064] First, obtain key warning information, error codes, and their detailed explanations from the PolarDB help document. This information is the basis for building a knowledge base. Convert the obtained key warning information, error codes, and detailed explanations into vectors. This step is to convert text information into a data format that can be processed by computers to facilitate subsequent natural language processing. Perform natural language processing on the converted vectors, including but not limited to word segmentation, part-of-speech tagging, named entity recognition, semantic understanding, etc. These processing steps help to extract key information from the text and build associations between texts to form a knowledge base.
[0065] 2)Integrate large model RAG system.
[0066] Integrate the constructed knowledge base with the large model RAG system. The RAG system (which may refer to a retrieval-enhanced generation model or other similar large models) can retrieve relevant alarm explanations based on the information in the knowledge base and generate suggestion information. When the monitoring system receives an alarm, the RAG system will retrieve explanations related to the alarm in the knowledge base and generate suggestion information based on these explanations. These suggestion information may include possible causes of the alarm, solution steps, and preventive measures.
[0067] 3) Iteratively update the knowledge base based on PolarDB.
[0068] As PolarDB continues to iterate and update, new warning information, error codes, and explanations may appear. Therefore, the knowledge base needs to be continuously updated based on the iteration of PolarDB to ensure its timeliness and accuracy. The update strategy can include regularly checking the update log of PolarDB, collecting new help documents and FAQ information, and integrating this information into the knowledge base.
[0069] 4) Modify the interface to correct or supplement the knowledge base.
[0070] In order to facilitate maintenance personnel or system administrators to modify or supplement the knowledge base, special modification interfaces can be designed. These interfaces can allow users to add new alarm information, error codes and explanations, or modify existing information. In order to ensure the security and accuracy of the knowledge base, permission management is required for the modification interface. Only users with corresponding permissions can modify or supplement the knowledge base through the interface.
[0071] The knowledge base built and maintained in the above way can not only provide rich alarm explanations and processing opinions, but also be continuously updated with the iteration of PolarDB to maintain its timeliness and accuracy. At the same time, by integrating the large model RAG system and designing modification interfaces, the intelligence level and ease of use of the knowledge base can be further improved.
[0072] In some embodiments, see Figure 3 , Figure 3 It is a flowchart of steps S301-S304 provided in an embodiment of the present application. The real-time active capture of event information can be achieved through steps S301-S304, which will be explained in combination with each step.
[0073] In step S301, periodic polling and continuous crawling are performed through the PolarDB interface; wherein the polling period and the retrieval step are independently set, and the periodic polling and continuous crawling are performed based on at least one of the following rules.
[0074] In step S302, data is captured by taking the end time of the previous cycle minus the regression time as the collection starting point.
[0075] In step S303, if an abnormality occurs during the capture process, the frequency is automatically increased after the abnormality is recovered to perform data recovery.
[0076] In step S304, the alarm quantity and event quantity within the period are regularly compared, and when there is an error, it is automatically supplemented.
[0077] Here, through the PolarDB interface, the system regularly initiates data capture requests. This cycle is preset and can be adjusted according to actual needs. The retrieval step size is also set independently, which determines the stride or range of data retrieved from the database each time it is captured. The embodiment of the present application adds a regression link and flexibly configures the duration. The end time of the previous cycle minus the regression duration is used as the collection starting point to solve the problem of missing alarms due to the deviation between the occurrence time of some alarms and the generation time of the alarms.
[0078] During the crawling process, if an exception occurs (such as network failure, database connection problem, etc.), the system will automatically increase the crawling frequency after the exception is recovered to catch up the data. This ensures that data loss is minimized even in the event of a short-term failure.
[0079] The system will also periodically compare the number of alarms and events in a cycle. If a discrepancy is found between the two (for example, the number of alarms is greater than the number of events, which may mean that some events have not been captured correctly), the system will automatically make up the data. This strategy helps ensure the accuracy and completeness of the data and avoid information loss due to omissions during the capture process.
[0080] In summary, through strategies such as periodic polling, flexible adjustment of the collection starting point, data recovery after abnormal recovery, and comparative recording of alarm volume and event volume, this real-time active capture of event information solution can efficiently and accurately capture the required data from PolarDB, providing a solid foundation for subsequent data processing and analysis.
[0081] In some embodiments, see Figure 4 , Figure 4 It is a flow chart of steps S401-S402 provided in an embodiment of the present application. The mapping rule is a field resolution table. The event information is parsed and processed based on the preset mapping rule to obtain key field information. This can be achieved through steps S401-S402 and will be explained in combination with each step.
[0082] In step S401, field extraction processing is performed on the event information to obtain at least one target field.
[0083] In step S402, for the at least one target field, each target field in the at least one target field is translated based on the field resolution table to obtain the key field information.
[0084] Here, the system first performs field extraction on the event information. The purpose of this step is to identify and extract at least one target field from the original event information. These target fields are usually defined in advance and are important for subsequent processing and analysis. Next, for each extracted target field, the system performs translation processing based on the preset field resolution table. The field resolution table is a table containing field mapping relationships, which defines how each target field should be translated or mapped to a specific meaning or format. During the translation process, the system will find an entry in the field resolution table that matches the target field, and convert the target field into the corresponding key field information according to the instructions of the entry. This conversion process includes changing the field name, converting the data type, adjusting the data format, etc. After the above translation process, the system will eventually obtain a set of key field information. These key field information are parsed and converted, and they are presented in a specific format or meaning to facilitate subsequent data processing and analysis.
[0085] In the above method, based on the preset field parsing table, the system can extract and translate the event information to obtain a set of key field information. This process ensures the consistency and accuracy of the data and provides a reliable basis for subsequent data processing and analysis. At the same time, since the field parsing table is preset, the process also has certain flexibility and scalability, which can adapt to different data processing requirements.
[0086] In some embodiments, the alarm object is a predefined object, and the alarm object corresponds to belonging information and object information; when there is no matching alarm object, the alarm information is sent to the cluster administrator.
[0087] Here, the alarm object is a predefined object, and the alarm object corresponds to ownership information and object information; when there is no matching alarm object, the alarm information is sent to the cluster administrator. Alarm objects are a series of predefined entities or resources in the monitoring system, which may be servers, databases, network devices, applications, etc. Each alarm object has corresponding ownership information and object information. Ownership information may include the department, team or person in charge to which the object belongs; object information includes detailed information such as the name, type, location, and configuration of the object.
[0088] When the monitoring system detects an anomaly or problem, it generates an alarm message. This alarm message may contain detailed information such as the condition that triggered the alarm, time, level, and scope of impact. The system will try to match this alarm message with predefined alarm objects. The matching process may be based on certain keywords, tags, or attributes in the alarm message.
[0089] If the system can find an alarm object that matches the alarm information, it will send the alarm information to the corresponding responsible person or team for processing based on the object's ownership information and object information. If the system cannot find a matching alarm object, it will send the alarm information as an unmatched alarm to the cluster administrator or the designated default handler. This usually means that the alarm information may involve a new, unknown object, or an abnormal situation that requires special attention.
[0090] In the above way, by pre-defining the alarm objects and their corresponding attribution information and object information, the monitoring system can more accurately identify and process the alarm information. When there is no matching alarm object, the system sends the alarm information to the cluster administrator to ensure that all important alarms can be processed and paid attention to in a timely manner.
[0091] In summary, the embodiments of the present application have the following beneficial effects:
[0092] (1) Enhance the ability to judge abnormal monitoring and improve the timeliness of alarms:
[0093] By choosing active alarm acquisition methods, the limitations of passive methods such as websocket and Trap are avoided, and abnormal situations of PolarDB can be discovered and handled more promptly. The established monitoring self-abnormal judgment mechanism can automatically generate alarms for potential problems such as the network and PolarDB monitoring services, improving the reliability and response speed of the monitoring system. By regularly comparing the number of messages, the integrity and accuracy of the monitoring data are ensured, further enhancing the abnormal judgment ability of the monitoring system.
[0094] (2) Optimize the alarm processing process and improve processing efficiency: Establish two layers of rules on the service side and the user side, so that the urgency of alarm processing is closer to the actual situation, and improve the pertinence and efficiency of alarm processing. The service side rules convert event messages into Alert alarms, simplify the alarm processing process, and reduce the difficulty of processing. The user side rules are defined in the configuration center, which improves the flexibility of adjustment and makes alarm processing more in line with actual needs.
[0095] (3) Applying large models to analyze alarms and improve the level of intelligence: By building a professional PolarDB alarm analysis vector knowledge base and combining it with the large model RAG application mode, it can automatically and accurately interpret PolarDB alarms and provide scientific processing suggestions and strategies in real time, thereby improving the level of intelligence in alarm processing. It allows users to revise and supplement professional knowledge based on practical experience, realizes continuous optimization and self-iteration of the knowledge base, and enhances the accuracy and practicality of alarm analysis. Programmatically and regularly detects the company's PolarDB documents and updates the vector library, which can cope with the impact of continuous iterations of PolarDB and ensure the timeliness and accuracy of alarm analysis.
[0096] To sum up, the embodiments of the present application can significantly improve the abnormal judgment ability, alarm processing efficiency and intelligence level of the PolarDB monitoring system, and provide more reliable, efficient and intelligent support for the company's operation and maintenance work.
[0097] Based on the same inventive concept, the embodiment of the present application also provides a PolarDB alarm docking adaptation device corresponding to the PolarDB alarm docking adaptation method in the first embodiment. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned PolarDB alarm docking adaptation method, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0098] like Figure 6 As shown, Figure 6 : is a schematic diagram of the structure of the PolarDB alarm docking adapter 600 provided in an embodiment of the present application. The PolarDB alarm docking adapter 600 includes:
[0099] Monitoring module 601, used to monitor the online PolarDB cluster by embedding a monitoring hook in the PolarDB cluster online work order to achieve automatic registration;
[0100] The capture module 602 is used to actively capture event information in real time during the monitoring process, and parse the event information based on a preset mapping rule to obtain key field information;
[0101] The generation module 603 is used to filter the key field information based on a preset filtering generation rule to obtain a target alarm event, generate target alarm information based on the target alarm event, and send the alarm information to an associated alarm object.
[0102] Those skilled in the art should understand that Figure 6 The implementation functions of each unit in the PolarDB alarm docking adaptation device 600 shown can be understood by referring to the relevant description of the aforementioned PolarDB alarm docking adaptation method. Figure 6The functions of each unit in the PolarDB alarm docking adapter device 600 shown can be implemented by a program running on a processor, or by a specific logic circuit.
[0103] In a possible implementation, the generating module 603 further includes:
[0104] In response to an adjustment request for the filter generation rule, receiving the adjusted filter generation rule; wherein the adjustment request includes at least one of adjustment of an event requiring an alarm, adjustment of an alarm level, and automatic adjustment of an alarm event and / or an alarm level within a specific time period;
[0105] The plaintiff alarm generation rules are updated based on the adjusted filtering generation rules.
[0106] In a possible implementation, the generating module 603 further includes:
[0107] In response to a request to view the alarm information, the alarm information is displayed through a first display area and suggestion information is displayed through a second display area; wherein the suggestion information is used to provide alarm explanations and handling opinions, and the suggestion information is provided through a preset knowledge base, and the knowledge base is built based on PolarDB help documents and / or artificial intelligence big models.
[0108] In a possible implementation, the knowledge base is constructed by at least one of the following methods:
[0109] Obtain key warning information, error codes, and detailed explanations in the PolarDB help document, convert the key warning information, the error codes, and the detailed explanations into vectors, perform natural language processing on the vectors, and obtain the knowledge base;
[0110] Integrate the knowledge base with a large model RAG system to retrieve relevant alarm explanations from the knowledge base through the large model RAG and generate the suggestion information;
[0111] The knowledge base is updated based on the iteration of PolarDB;
[0112] The information in the knowledge base is corrected or supplemented through the modification interface.
[0113] In a possible implementation, the capturing module 602 actively captures event information in real time, including:
[0114] Periodic polling and continuous crawling are performed through the PolarDB interface; wherein the polling period and the retrieval step length are set independently, and the periodic polling and continuous crawling are performed based on at least one of the following rules:
[0115] The data is captured by taking the end time of the previous cycle minus the regression time as the collection starting point;
[0116] If an exception occurs during the crawling process, the frequency will be automatically increased after the exception is recovered to catch up the data;
[0117] The alarm quantity and event quantity within a period are compared regularly, and any errors are automatically supplemented.
[0118] In a possible implementation, the mapping rule is a field parsing table. Based on the preset mapping rule, the capture module 602 parses the event information to obtain key field information, including:
[0119] Performing field extraction processing on the event information to obtain at least one target field;
[0120] For the at least one target field, each target field in the at least one target field is translated based on the field resolution table to obtain the key field information.
[0121] In a possible implementation manner, the alarm object is a predefined object, and the alarm object corresponds to belonging information and object information; when there is no matching alarm object, the alarm information is sent to a cluster administrator.
[0122] The above-mentioned PolarDB alarm docking adapter has the following beneficial effects:
[0123] (1) Enhance the ability to judge abnormal monitoring and improve the timeliness of alarms:
[0124] By choosing active alarm acquisition methods, the limitations of passive methods such as websocket and Trap are avoided, and abnormal situations of PolarDB can be discovered and handled more promptly. The established monitoring self-abnormal judgment mechanism can automatically generate alarms for potential problems such as the network and PolarDB monitoring services, improving the reliability and response speed of the monitoring system. By regularly comparing the number of messages, the integrity and accuracy of the monitoring data are ensured, further enhancing the abnormal judgment ability of the monitoring system.
[0125] (2) Optimize the alarm processing process and improve processing efficiency: Establish two layers of rules on the service side and the user side, so that the urgency of alarm processing is closer to the actual situation, and improve the pertinence and efficiency of alarm processing. The service side rules convert event messages into Alert alarms, simplify the alarm processing process, and reduce the difficulty of processing. The user side rules are defined in the configuration center, which improves the flexibility of adjustment and makes alarm processing more in line with actual needs.
[0126] (3) Applying large models to analyze alarms and improve the level of intelligence: By building a professional PolarDB alarm analysis vector knowledge base and combining it with the large model RAG application mode, it can automatically and accurately interpret PolarDB alarms and provide scientific processing suggestions and strategies in real time, thereby improving the level of intelligence in alarm processing. It allows users to revise and supplement professional knowledge based on practical experience, realizes continuous optimization and self-iteration of the knowledge base, and enhances the accuracy and practicality of alarm analysis. Programmatically and regularly detects the company's PolarDB documents and updates the vector library, which can cope with the impact of continuous iterations of PolarDB and ensure the timeliness and accuracy of alarm analysis.
[0127] To sum up, the embodiments of the present application can significantly improve the abnormal judgment ability, alarm processing efficiency and intelligence level of the PolarDB monitoring system, and provide more reliable, efficient and intelligent support for the company's operation and maintenance work.
[0128] like Figure 7 As shown, Figure 7 The present invention provides a schematic diagram of the structure of an electronic device 700, wherein the electronic device 700 includes:
[0129] A processor 701, a storage medium 702 and a bus 703, wherein the storage medium 702 stores machine-readable instructions executable by the processor 701. When the electronic device 700 is running, the processor 701 communicates with the storage medium 702 via the bus 703, and the processor 701 executes the machine-readable instructions to perform the steps of the PolarDB alarm docking adaptation method described in the embodiment of the present application.
[0130] In actual application, the components in the electronic device 700 are coupled together via the bus 703. It is understood that the bus 703 is used to realize the connection and communication between these components. In addition to the data bus, the bus 703 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 7 Various buses are labeled as bus 703.
[0131] The above electronic device has the following beneficial effects:
[0132] (1) Enhance the ability to judge abnormal monitoring and improve the timeliness of alarms:
[0133] By choosing active alarm acquisition methods, the limitations of passive methods such as websocket and Trap are avoided, and abnormal situations of PolarDB can be discovered and handled more promptly. The established monitoring self-abnormal judgment mechanism can automatically generate alarms for potential problems such as the network and PolarDB monitoring services, improving the reliability and response speed of the monitoring system. By regularly comparing the number of messages, the integrity and accuracy of the monitoring data are ensured, further enhancing the abnormal judgment ability of the monitoring system.
[0134] (2) Optimize the alarm processing process and improve processing efficiency: Establish two layers of rules on the service side and the user side, so that the urgency of alarm processing is closer to the actual situation, and improve the pertinence and efficiency of alarm processing. The service side rules convert event messages into Alert alarms, simplify the alarm processing process, and reduce the difficulty of processing. The user side rules are defined in the configuration center, which improves the flexibility of adjustment and makes alarm processing more in line with actual needs.
[0135] (3) Applying large models to analyze alarms and improve the level of intelligence: By building a professional PolarDB alarm analysis vector knowledge base and combining it with the large model RAG application mode, it can automatically and accurately interpret PolarDB alarms and provide scientific processing suggestions and strategies in real time, thereby improving the level of intelligence in alarm processing. It allows users to revise and supplement professional knowledge based on practical experience, realizes continuous optimization and self-iteration of the knowledge base, and enhances the accuracy and practicality of alarm analysis. Programmatically and regularly detects the company's PolarDB documents and updates the vector library, which can cope with the impact of continuous iterations of PolarDB and ensure the timeliness and accuracy of alarm analysis.
[0136] To sum up, the embodiments of the present application can significantly improve the abnormal judgment ability, alarm processing efficiency and intelligence level of the PolarDB monitoring system, and provide more reliable, efficient and intelligent support for the company's operation and maintenance work.
[0137] The embodiment of the present application also provides a computer-readable storage medium, which stores executable instructions. When the executable instructions are executed by at least one processor 701, the PolarDB alarm docking adaptation method described in the embodiment of the present application is implemented.
[0138] In some embodiments, the storage medium can be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface storage, an optical disk, or a compact disc read-only memory (CDROM); it can also be various devices including one or any combination of the above memories.
[0139] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0140] As an example, executable instructions may, but do not necessarily, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (for example, files storing one or more modules, subroutines, or code portions).
[0141] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0142] The computer-readable storage medium has the following advantages:
[0143] (1) Enhance the ability to judge abnormal monitoring and improve the timeliness of alarms:
[0144] By choosing active alarm acquisition methods, the limitations of passive methods such as websocket and Trap are avoided, and abnormal situations of PolarDB can be discovered and handled more promptly. The established monitoring self-abnormal judgment mechanism can automatically generate alarms for potential problems such as the network and PolarDB monitoring services, improving the reliability and response speed of the monitoring system. By regularly comparing the number of messages, the integrity and accuracy of the monitoring data are ensured, further enhancing the abnormal judgment ability of the monitoring system.
[0145] (2) Optimize the alarm processing process and improve processing efficiency: Establish two layers of rules on the service side and the user side, so that the urgency of alarm processing is closer to the actual situation, and improve the pertinence and efficiency of alarm processing. The service side rules convert event messages into Alert alarms, simplify the alarm processing process, and reduce the difficulty of processing. The user side rules are defined in the configuration center, which improves the flexibility of adjustment and makes alarm processing more in line with actual needs.
[0146] (3) Applying large models to analyze alarms and improve the level of intelligence: By building a professional PolarDB alarm analysis vector knowledge base and combining it with the large model RAG application mode, it can automatically and accurately interpret PolarDB alarms and provide scientific processing suggestions and strategies in real time, thereby improving the level of intelligence in alarm processing. It allows users to revise and supplement professional knowledge based on practical experience, realizes continuous optimization and self-iteration of the knowledge base, and enhances the accuracy and practicality of alarm analysis. Programmatically and regularly detects the company's PolarDB documents and updates the vector library, which can cope with the impact of continuous iterations of PolarDB and ensure the timeliness and accuracy of alarm analysis.
[0147] To sum up, the embodiments of the present application can significantly improve the abnormal judgment ability, alarm processing efficiency and intelligence level of the PolarDB monitoring system, and provide more reliable, efficient and intelligent support for the company's operation and maintenance work.
[0148] In the several embodiments provided in the present application, it should be understood that the disclosed methods and electronic devices can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0149] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0150] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0151] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0152] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A PolarDB alarm docking adaptation method, characterized in that: The method comprises: Automatic registration is achieved by embedding a monitoring hook in the PolarDB cluster launch ticket to monitor the launched PolarDB cluster. During the monitoring process, event information is captured in real time and analyzed based on preset mapping rules to obtain key field information. The key field information is filtered based on a preset filtering generation rule to obtain a target alarm event, target alarm information is generated based on the target alarm event, and the alarm information is sent to an associated alarm object.
2. The method according to claim 1, characterized in that The method further comprises: In response to an adjustment request for the filter generation rule, receiving the adjusted filter generation rule; wherein the adjustment request includes at least one of adjustment of an event requiring an alarm, adjustment of an alarm level, and automatic adjustment of an alarm event and / or an alarm level within a specific time period; The plaintiff alarm generation rules are updated based on the adjusted filtering generation rules.
3. The method according to claim 1, characterized in that The method further comprises: In response to a request to view the alarm information, the alarm information is displayed through a first display area and suggestion information is displayed through a second display area; wherein the suggestion information is used to provide alarm explanations and handling opinions, and the suggestion information is provided through a preset knowledge base, and the knowledge base is built based on PolarDB help documents and / or artificial intelligence big models.
4. The method according to claim 3, characterized in that The knowledge base is constructed by at least one of the following methods: Obtain key warning information, error codes, and detailed explanations in the PolarDB help document, convert the key warning information, the error codes, and the detailed explanations into vectors, perform natural language processing on the vectors, and obtain the knowledge base; Integrate the knowledge base with a large model RAG system to retrieve relevant alarm explanations from the knowledge base through the large model RAG and generate the suggestion information; The knowledge base is updated based on the iteration of PolarDB; The information in the knowledge base is corrected or supplemented through the modification interface.
5. The method according to claim 1, characterized in that The real-time active capture of event information includes: Periodic polling and continuous crawling are performed through the PolarDB interface; wherein the polling period and the retrieval step length are set independently, and the periodic polling and continuous crawling are performed based on at least one of the following rules: The data is captured by taking the end time of the previous cycle minus the regression time as the collection starting point; If an exception occurs during the crawling process, the frequency will be automatically increased after the exception is recovered to catch up the data; The alarm quantity and event quantity within a period are compared regularly, and any errors are automatically supplemented.
6. The method according to claim 1, characterized in that The mapping rule is a field analysis table. Based on the preset mapping rule, the event information is analyzed and processed to obtain key field information, including: Performing field extraction processing on the event information to obtain at least one target field; For the at least one target field, each target field in the at least one target field is translated based on the field resolution table to obtain the key field information.
7. The method according to claim 1, characterized in that The alarm object is a predefined object, and the alarm object corresponds to belonging information and object information; when there is no matching alarm object, the alarm information is sent to the cluster administrator.
8. A PolarDB alarm docking adapter device, characterized in that: The device comprises: The monitoring module is used to monitor the online PolarDB cluster by embedding a monitoring hook in the PolarDB cluster online work order to achieve automatic registration; The capture module is used to actively capture event information in real time during the monitoring process, and parse and process the event information based on preset mapping rules to obtain key field information; A generation module is used to filter the key field information based on a preset filtering generation rule to obtain a target alarm event, generate target alarm information based on the target alarm event, and send the alarm information to an associated alarm object.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to execute the PolarDB alarm docking adaptation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the PolarDB alarm docking adaptation method according to any one of claims 1 to 7 is executed.