Database arbitration service monitoring method and device, monitoring equipment and storage medium

By performing regular checks and log filtering on the arbitration service, the database stability issues caused by arbitration service anomalies were resolved, enabling real-time monitoring of the arbitration service and improving the high availability and stability of the database.

CN116225818BActive Publication Date: 2026-07-07NETSUNION CLEARING CORP

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETSUNION CLEARING CORP
Filing Date
2021-12-03
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing technologies, arbitration service anomalies cannot be recovered immediately, which leads to a lack of stability in database operation and may result in data loss and database paralysis.

Method used

The arbitration service is periodically monitored by monitoring equipment, including service monitoring and arbitration object monitoring. The monitoring information is output to a log file, and the status of the arbitration service is determined by log filtering, thus realizing real-time monitoring of the arbitration service.

Benefits of technology

This enables timely monitoring of arbitration services, avoiding the impact of database malfunctions caused by the inability to handle faults in a timely manner, and improving the high availability and stability of the database.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116225818B_ABST
    Figure CN116225818B_ABST
Patent Text Reader

Abstract

The application discloses a database arbitration service monitoring method and device, a monitoring device and a storage medium. The method executed by the monitoring device comprises the following steps: performing service detection and arbitration object detection on the monitored arbitration service to obtain detection information; outputting the detection information to a log file; filtering the log file to obtain a filtering result; and determining the state of the arbitration service according to the filtering result. The method can monitor the arbitration service of an online running database in real time, so that a technician can know the running state of the arbitration service in time, and the current situation that a fault cannot be known in time and cannot be handled in time, thereby causing adverse effects on the running of the database, is avoided. The algorithm is simple and practical, and the high availability and stability of the database are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of database technology, and in particular to a method, apparatus, monitoring equipment, and storage medium for monitoring arbitration services of databases. Background Technology

[0002] In some business areas with high data availability requirements, the databases that support the business often adopt HA (High Availability) architecture, such as using MHA (Master HA, a high availability tool) components with MySQL databases, where a large amount of real-time business data is stored.

[0003] High-availability databases typically use an arbitration service, which is responsible for switching the roles of each database node. Therefore, the proper functioning of the arbitration service is the fundamental guarantee for the availability and stability of the database. If the arbitration service fails and cannot be detected and handled in a timely manner, it will cause great hidden dangers to the database, such as data loss, inability of the database to provide services to external applications, or even paralysis of front-end applications connected to the database.

[0004] However, in existing technologies, if the arbitration service malfunctions and cannot be restored immediately, the stability of the database operation cannot be guaranteed. Summary of the Invention

[0005] This application provides a method, apparatus, monitoring device, and storage medium for monitoring arbitration services in a database, so as to monitor the arbitration service at regular intervals, ensure the stable operation of the arbitration service, and thus achieve high availability and stability of the database.

[0006] The embodiments of this application adopt the following technical solutions:

[0007] In a first aspect, embodiments of this application provide a database arbitration service monitoring method, executed by a monitoring device, comprising: performing service detection and arbitration object detection on the monitored arbitration service to obtain detection information; outputting the detection information to a log file; filtering the log file to obtain a filtering result; and determining the status of the arbitration service based on the filtering result.

[0008] In some embodiments, the service detection includes detecting the running status of the arbitration process of the arbitration service.

[0009] In some embodiments, the arbitration object detection includes: detecting the probe connection status of a database node.

[0010] In some embodiments, the arbitration object detection includes: detecting the data replication status of the database node.

[0011] In some embodiments, filtering the log file to obtain a filtering result includes: filtering the log file based on log filtering rules containing keywords, and taking the number of times each keyword appears in the log file as the filtering result; wherein, the keywords include: a first keyword indicating that the service is normal, and a second keyword indicating that the arbitration object is normal.

[0012] In some embodiments, performing service detection and arbitration object detection on the monitored arbitration service includes: performing service detection and arbitration object detection in a first cycle; outputting the detection information to a log file includes: writing the detection information to the log file in an overwrite manner; filtering the log file includes: filtering the log file in a first cycle; determining the status of the arbitration service based on the filtering result includes: if any keyword appears 0 times in the log file, then the status of the arbitration service is determined to be abnormal.

[0013] In some embodiments, performing service detection and arbitration object detection on the monitored arbitration service includes: performing service detection and arbitration object detection in a first cycle; outputting the detection information to a log file includes: writing the detection information to the log file in an add-on manner; filtering the log file includes: filtering the log file in a second cycle; determining the status of the arbitration service based on the filtering result includes: calculating the difference between the number of times each keyword appears in the log file in the current second cycle and the number of times the corresponding keyword appears in the log file in the previous second cycle; if the difference corresponding to any keyword does not match a preset value, the status of the arbitration service is determined to be abnormal; the preset value is determined based on the cycle length of the first cycle and the cycle length of the second cycle.

[0014] Secondly, embodiments of this application also provide a database arbitration service monitoring device, applied to a monitoring device, which is used to implement any of the methods described above.

[0015] In some embodiments, the database arbitration service monitoring device includes: a detection unit for performing service detection and arbitration object detection on the monitored arbitration service to obtain detection information; an output unit for outputting the detection information to a log file; a filtering unit for filtering the log file to obtain a filtering result; and a determination unit for determining the status of the arbitration service based on the filtering result.

[0016] In some embodiments, the detection unit is used to detect the running status of the arbitration process of the arbitration service.

[0017] In some embodiments, the detection unit is used to detect the probe connection status of the database node.

[0018] In some embodiments, the detection unit is used to detect the data replication status of the database node.

[0019] In some embodiments, the filtering unit is used to filter the log file based on log filtering rules containing keywords, and to take the number of times each keyword appears in the log file as the filtering result; wherein, the keywords include: a first keyword indicating that the service is normal, and a second keyword indicating that the arbitration object is normal.

[0020] In some embodiments, the detection unit is configured to perform service detection and arbitration object detection in a first cycle; the output unit is configured to write detection information to the log file in an overwrite manner; the filtering unit is configured to filter the log file in a first cycle; and the determination unit is configured to determine that the status of the arbitration service is abnormal if any keyword appears 0 times in the log file.

[0021] In some embodiments, the detection unit is configured to perform service detection and arbitration object detection in a first cycle; the output unit is configured to write detection information into the log file in an incremental manner; the filtering unit is configured to filter the log file in a second cycle; and the determination unit is configured to calculate the difference between the number of times each keyword appears in the log file in the current second cycle and the number of times the corresponding keyword appears in the log file in the previous second cycle; if the difference corresponding to any keyword does not match a preset value, the status of the arbitration service is determined to be abnormal; the preset value is determined based on the cycle length of the first cycle and the cycle length of the second cycle.

[0022] Thirdly, embodiments of this application also provide a monitoring device, including: a processor; and a memory arranged to store computer-executable instructions, which, when executed, cause the processor to perform any of the methods described above.

[0023] Fourthly, embodiments of this application also provide a computer-readable storage medium that stores one or more programs, which, when executed by a monitoring device including multiple applications, cause the monitoring device to perform any of the methods described above.

[0024] The above-mentioned at least one technical solution adopted in the embodiments of this application can achieve the following beneficial effects: by detecting the arbitration service and determining the status of the arbitration service based on the obtained detection information, it is possible to realize real-time monitoring of the arbitration service of the online database, so that technicians can know the operation status of the arbitration service in a timely manner, avoiding the current situation where failures cannot be detected and dealt with in a timely manner, which would have an adverse impact on the operation of the database; moreover, the algorithm is simple and highly practical, greatly improving the high availability and stability of the database. Attached Figure Description

[0025] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0026] Figure 1 This is a flowchart illustrating a database arbitration service monitoring method according to an embodiment of this application;

[0027] Figure 2 This is a schematic diagram of the structure of an arbitration service monitoring device for a database according to an embodiment of this application;

[0028] Figure 3 This is a schematic diagram of the structure of a monitoring device in an embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] Let's start with a brief introduction to high availability technologies. Taking MHA as an example, it supports various architectures. Here, we'll use a master-slave architecture as an example. The cluster needs at least three database servers: one acting as the master node and two acting as slave nodes. Here, "nodes" refers to database nodes.

[0031] When MHA's arbitration service detects a master node failure, it promotes the slave node with the latest data to the new master node, thus completing a node role switch for that slave node. Additionally, MHA supports manual node role switching.

[0032] It is evident that while the arbitration service can ensure high availability of master and slave nodes, the high availability of the arbitration service itself cannot be guaranteed. If the arbitration service fails, the node switchover cannot be completed smoothly. For example, if the master node fails, and the switchover to one of the slave nodes cannot be completed smoothly, data before the fault is resolved will be lost, and external applications or businesses that rely on the database may also be unable to operate.

[0033] To address this issue, one solution is for operations and maintenance personnel to manually execute a health check command while the arbitration service is online to display its health status. However, this method is labor-intensive and time-consuming, and it is easy to miss some health status information. Furthermore, it cannot automatically output health information in real time. If the arbitration process is abnormal, it will have an adverse impact on the business that relies on the database because it cannot be restored in time.

[0034] In view of this, embodiments of this application propose a method for monitoring the arbitration service of a database. This method can detect the arbitration service as needed to obtain the health status of the arbitration service in a timely manner, thereby ensuring the high availability and stability of the database.

[0035] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0036] Figure 1 This is a flowchart illustrating a database arbitration service monitoring method according to an embodiment of this application. Figure 1 It can be seen that the method performed by the monitoring equipment includes at least the following steps S110 to S140.

[0037] Step S110: Perform service detection and arbitration object detection on the monitored arbitration service to obtain detection information.

[0038] In the embodiments of this application, the monitoring of the arbitration service is carried out from two aspects: the arbitration service and the arbitration object. Service detection can monitor whether the arbitration service is operating normally. Since one of the functions of the arbitration service is to switch the role of the database node, which depends on the cooperation of the database node, it is also necessary to detect the database node that is the arbitration object.

[0039] Step S120: Output the detection information to a log file.

[0040] In the embodiments of this application, log files are used as the medium for carrying detection information. This decouples the output of detection information from the subsequent steps that need to be performed. The detection of the arbitration service and the subsequent determination of the status of the arbitration service can be performed asynchronously, such as by using an asynchronous thread.

[0041] Step S130: Filter the log file to obtain the filtering result. For example, filtering can be performed using regular expressions.

[0042] Step S140: Determine the status of the arbitration service based on the filtering results.

[0043] visible, Figure 1 The method shown, by detecting the arbitration service and determining its status based on the detected information, enables real-time monitoring of the online arbitration service of the database. This allows technicians to promptly learn about the operation of the arbitration service, avoiding the situation where failures cannot be detected and addressed in a timely manner, thus preventing adverse effects on the database operation. Furthermore, the algorithm is simple, highly practical, and greatly improves the high availability and stability of the database.

[0044] In some embodiments, the service detection includes detecting the running status of the arbitration process of the arbitration service.

[0045] If the arbitration process is not running, the arbitration service cannot switch the roles of database nodes, thus losing its arbitration function. Therefore, if the arbitration process is abnormal, the arbitration service will also be abnormal. Additionally, the arbitration process can be easily monitored using commands supported by high-availability components.

[0046] In some embodiments, the arbitration object detection includes: detecting the probe connection status of a database node.

[0047] In addition to responding to manual switching instructions from operations and maintenance personnel, the arbitration service can also switch based on the status of database nodes. This requires the arbitration service to be able to know the status of data nodes, i.e., to perform liveness detection on the database nodes.

[0048] Liveness detection typically relies on liveness detection connections, which generally require an arbitration service based on a security protocol such as SSH (Secure Shell). Therefore, the health of the liveness detection connection can be determined by checking the security protocol status of the database node. For example, MHA supports entering commands to perform SSH checks, specifically to check if an SSH login was successful.

[0049] In some embodiments, the arbitration object detection includes: detecting the data replication status of the database node.

[0050] As mentioned earlier, high availability of a database requires the deployment of master-slave nodes. Slave nodes need to replicate data from the master node. Therefore, if a database node's data replication status is abnormal, the arbitration service should switch the node's role, for example, switching the slave node to the master node, or making the node with the abnormal replication status unavailable. If a database node's data replication status is abnormal, but the arbitration service does not switch the node's role, it indicates that the arbitration service has failed to perform its intended function, and this should be considered an abnormal status for the arbitration service.

[0051] In some embodiments, filtering the log file to obtain a filtering result includes: filtering the log file based on log filtering rules containing keywords, and taking the number of times each keyword appears in the log file as the filtering result; wherein, the keywords include: a first keyword indicating that the service is normal, and a second keyword indicating that the arbitration object is normal.

[0052] For example, you can use the `cat` command to connect to a log file, use the `grep` command with a specified keyword for filtering, and use the `wc -l` command to count the number of lines containing the keyword, thus obtaining the number of times the keyword appears in the log file. Specifically, this can be achieved using a shell script.

[0053] As shown in the previous embodiments, when performing arbitration object detection, the probe connection status of the database node can be detected, as well as the data replication status of the database node. The second keyword can include keywords indicating that the probe connection is normal, or it can include keywords indicating that the data replication is normal.

[0054] In some embodiments, service testing can be performed first, and if the service testing is normal, arbitration object testing can then be performed, thereby reducing the impact on database nodes and improving the utilization rate of database nodes by the business.

[0055] In some embodiments, performing service detection and arbitration object detection on the monitored arbitration service includes: performing service detection and arbitration object detection in a first cycle; outputting the detection information to a log file includes: writing the detection information to the log file in an overwrite manner; filtering the log file includes: filtering the log file in a first cycle; determining the status of the arbitration service based on the filtering result includes: if any keyword appears 0 times in the log file, then the status of the arbitration service is determined to be abnormal.

[0056] In the embodiments of this application, the content of the detection information can be either a string representing normal or abnormal detection, or simply a string representing normal detection, while no detection information with content is output when an abnormal detection occurs; that is, the detection information is empty. Writing to the log file in an overwrite manner means that regardless of whether the detection information is empty, the original content in the log file will be erased. Thus, if a detection is performed and the keyword representing normal detection does not appear in the log file, it can be inferred that the result of that detection is abnormal, thereby determining that the arbitration service is in an abnormal state. It should be noted that if a type of keyword (first keyword or second keyword) contains multiple keywords (for example, the second keyword can contain keywords representing normal live connection and keywords representing normal data replication), then the absence of even one keyword is sufficient to determine that the arbitration service is in an abnormal state.

[0057] In some embodiments, performing service detection and arbitration object detection on the monitored arbitration service includes: performing service detection and arbitration object detection in a first cycle; outputting the detection information to a log file includes: writing the detection information to the log file in an add-on manner; filtering the log file includes: filtering the log file in a second cycle; determining the status of the arbitration service based on the filtering result includes: calculating the difference between the number of times each keyword appears in the log file in the current second cycle and the number of times the corresponding keyword appears in the log file in the previous second cycle; if the difference corresponding to any keyword does not match a preset value, the status of the arbitration service is determined to be abnormal; the preset value is determined based on the cycle length of the first cycle and the cycle length of the second cycle.

[0058] In these embodiments, the log files are not overwritten but rather new detection information is added. Therefore, the cycle length of the first cycle used for the two detections performed on the arbitration service and the cycle length of the second cycle for filtering the log files can be the same or different; the cycle length of the second cycle can be an integer multiple of the cycle length of the first cycle.

[0059] For two consecutive second cycles, the number of times each keyword appears in the log file can be counted at the end of each second cycle.

[0060] For example, using a 5-second cycle as the first period, a service test and an arbitration object test are performed every 5 seconds. If both tests are normal, test information indicating a normal service test and a normal arbitration object test are written to the log file. If any test is abnormal, no corresponding test information is written. If the second cycle is 5 seconds, then if the arbitration service is normal, the difference should be 1, i.e., the default value is 1; if the second cycle is 10 seconds, the default value is 2, and so on.

[0061] Taking steps S110 and S120 executed using thread one, and steps S130 and S140 executed using thread two as an example, the first cycle and the second cycle can be the sleep cycles of thread one and thread two, respectively. Through reasonable cycle settings, thread two does not need to communicate with thread one continuously, nor does it need to wait for the running status of thread one; the two can be independent of each other. However, in terms of the overall timing, it will appear that the detection information is obtained and output first through steps S110 and S120, and then the status of the arbitration service is determined through steps S130 and S140.

[0062] In some embodiments of this application, if the status of the arbitration service is determined to be abnormal, alarm information can be further generated, and an alarm can be issued based on the alarm information by calling the alarm module or other means.

[0063] To enable technical personnel to quickly identify any anomalies or malfunctions in the arbitration service, and to further understand the type and cause of the malfunction, alarm information can be generated based on the filtering results. For example, if the primary keyword is missing, an alarm message "Arbitration process not running normally" can be generated. The alarm module can then be invoked to notify relevant technical personnel of the malfunction, including but not limited to sending SMS messages. The alarm module can also be connected to an audible and visual alarm to issue a warning by sounding an alarm and flashing lights when the arbitration service is confirmed to be in an abnormal state. This alarm module can be configured for different departments or levels, such as a general basic alarm module for the company or a departmental alarm module. Furthermore, this alarm module can be a reuse of an existing alarm module; specifically, it can be called through an API interface. Alternatively, the alarm module can be set up specifically for the arbitration service; this application does not impose any restrictions.

[0064] In some embodiments of this application, the above method can be based on any implementation of an existing programming language, such as Perl or Python.

[0065] This application also provides a database arbitration service monitoring device, applied to a monitoring device, which is used to implement any of the methods described above.

[0066] Figure 2 A schematic diagram of the structure of a database arbitration service monitoring device according to an embodiment of this application is shown. Figure 2 As shown, the database arbitration service monitoring device 200 includes:

[0067] The detection unit 210 is used to perform service detection and arbitration object detection on the monitored arbitration service to obtain detection information; the output unit 220 is used to output the detection information to a log file; the filtering unit 230 is used to filter the log file to obtain a filtering result; and the determination unit 240 is used to determine the status of the arbitration service based on the filtering result.

[0068] In some embodiments, the detection unit 210 is used to detect the running status of the arbitration process of the arbitration service.

[0069] In some embodiments, the detection unit 210 is used to detect the active connection status of the database node.

[0070] In some embodiments, the detection unit 210 is used to detect the data replication status of the database node.

[0071] In some embodiments, the filtering unit 230 is used to filter the log file based on log filtering rules containing keywords, and take the number of times each keyword appears in the log file as the filtering result; wherein, the keywords include: a first keyword indicating that the service is normal, and a second keyword indicating that the arbitration object is normal.

[0072] In some embodiments, the detection unit 210 is configured to perform service detection and arbitration object detection in a first cycle; the output unit 220 is configured to write detection information to the log file in an overwrite manner; the filtering unit 230 is configured to filter the log file in a first cycle; and the determination unit 240 is configured to determine that the status of the arbitration service is abnormal if any keyword appears 0 times in the log file.

[0073] In some embodiments, the detection unit 210 is used to perform service detection and arbitration object detection in a first cycle; the output unit 220 is used to write detection information to the log file in an incremental manner; the filtering unit 230 is used to filter the log file in a second cycle; the determination unit 240 is used to calculate the difference between the number of times each keyword appears in the log file in the current second cycle and the number of times the corresponding keyword appears in the log file in the previous second cycle; if the difference corresponding to any keyword does not match a preset value, the status of the arbitration service is determined to be abnormal; the preset value is determined based on the cycle length of the first cycle and the cycle length of the second cycle.

[0074] It is understood that the above-mentioned database arbitration service monitoring device can implement each step of the database arbitration service monitoring method executed by the monitoring equipment provided in the foregoing embodiments. The relevant explanations of the database arbitration service monitoring method are applicable to the database arbitration service monitoring device, and will not be repeated here.

[0075] Figure 3 This is a schematic diagram of the structure of a monitoring device according to an embodiment of this application. Please refer to it. Figure 3 At the hardware level, the monitoring device includes a processor, and optionally also an internal bus, network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the monitoring device may also include other hardware required for other business operations.

[0076] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0077] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0078] The processor reads the corresponding computer program from non-volatile memory into main memory and then executes it, forming a database arbitration service monitoring device at the logical level. The processor executes the program stored in memory and specifically performs the following operations:

[0079] Service detection and arbitration object detection are performed on the monitored arbitration service to obtain detection information; the detection information is output to a log file; the log file is filtered to obtain a filtering result; and the status of the arbitration service is determined based on the filtering result.

[0080] The above is as stated in this application. Figure 3 The method executed by the database arbitration service monitoring device disclosed in the illustrated embodiment can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0081] The monitoring equipment can also perform Figure 1 The method for implementing the arbitration service monitoring device of the database, and the implementation of the arbitration service monitoring device of the database. Figure 2 The functions of the embodiments shown are not described in detail here.

[0082] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a monitoring device comprising multiple applications, enable the monitoring device to perform... Figure 1 The method executed by the database arbitration service monitoring device in the illustrated embodiment is specifically used to perform:

[0083] Service detection and arbitration object detection are performed on the monitored arbitration service to obtain detection information; the detection information is output to a log file; the log file is filtered to obtain a filtering result; and the status of the arbitration service is determined based on the filtering result.

[0084] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0085] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0086] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0087] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0088] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0089] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0090] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0091] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0092] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0093] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for monitoring arbitration services in a database, executed by monitoring equipment, wherein, The method includes: The monitoring of arbitration services and arbitration subjects is used to obtain monitoring information. The detection information is output to a log file; The log files are filtered to obtain the filtering results; The status of the arbitration service is determined based on the filtering results; The service detection is used to monitor whether the arbitration service is operating normally, and the arbitration object detection includes detecting the database node that serves as the arbitration object; The filtering of the log file to obtain the filtering results includes: The log file is filtered based on log filtering rules containing keywords, and the number of times each keyword appears in the log file is used as the filtering result. The keywords include: a first keyword indicating that the service is normal, and a second keyword indicating that the arbitration object is normal; Service detection and arbitration object detection, along with determining the status of the arbitration service, are performed separately using asynchronous threads for the monitored arbitration service. The monitoring of arbitration service execution and arbitration object detection includes: execution service detection and arbitration object detection in the first cycle; The step of outputting the detection information to the log file includes: writing the detection information to the log file in an incremental manner; The filtering of the log files includes: filtering the log files on a second cycle; The step of determining the status of the arbitration service based on the filtering results includes: calculating the number of times each keyword appears in the log file during the current second period, and the difference between the number of times the corresponding keyword appears in the log file during the previous second period; if the difference for any keyword does not match a preset value, the status of the arbitration service is determined to be abnormal; the preset value is determined based on the period length of the first period and the period length of the second period.

2. The method according to claim 1, wherein, The service detection includes detecting the running status of the arbitration process of the arbitration service.

3. The method according to claim 1, wherein, The arbitration object detection includes: detecting the probe connection status of database nodes.

4. The method according to claim 1, wherein, The arbitration object detection includes: detecting the data replication status of database nodes.

5. The method according to claim 1, wherein, The monitoring of arbitration service execution and arbitration object detection includes: execution service detection and arbitration object detection in the first cycle; The step of outputting the detection information to the log file includes: writing the detection information to the log file in an overwrite manner; The filtering of the log file includes: filtering the log file in a first cycle; The step of determining the status of the arbitration service based on the filtering results includes: if any keyword appears 0 times in the log file, then the status of the arbitration service is determined to be abnormal.

6. A database arbitration service monitoring device, applied to monitoring equipment, wherein, The apparatus is used to implement the method according to any one of claims 1 to 5.

7. A monitoring device, comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the method of any one of claims 1 to 5.

8. A computer-readable storage medium storing one or more programs, which, when executed by a monitoring device comprising a plurality of applications, cause the monitoring device to perform the method of any one of claims 1 to 5.