A database cluster monitoring method, device, system, and equipment

Through the distribution of tasks and analyzing the results in the GP cluster, the problem of low artificial inspection efficiency in existing technologies and unable to perceive the health status of the cluster in real time, and achieve efficient hardware inspection and health monitoring.

CN113051147BActive Publication Date: 2025-01-24CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110448149.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-25
Publication Date
2025-01-24
Estimated Expiration
2041-04-25

AI Technical Summary

Technical Problem

The existing GP cluster monitoring tools require manual hardware inspection, which is inefficient and cannot perceive the cluster health status in real time, resulting in reduced work efficiency.

Method used

By receiving the user's trigger operation, the pre -configured collection task is distributed to the master node of the database cluster to collect information. The collection task includes alarm indicators and inspection indicators. After obtaining the results file, the analysis module enters the inspection index to the healthy model, display the health model through the front -end interface, and send warnings when detecting the abnormal alarm indicators.

Benefits of technology

It has significantly improved the efficiency of the hardware inspection of the GP cluster, realized real -time perception of the health status of the cluster, improved operation and maintenance efficiency and saved manpower.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113051147B_ABST
    Figure CN113051147B_ABST
Patent Text Reader

Abstract

The present application discloses a monitoring method, device, system, and equipment for a database cluster. When a trigger operation is received from a user, a pre-configured collection task is distributed to the master node of the database cluster, so that the master node collects information according to the collection task. The result file obtained after the master node collects information is obtained. When an abnormality is detected in the value of the alarm indicator, an alarm prompt is sent to the user to prompt the user that a functional failure has occurred in the database cluster. The value of the inspection indicator is input into the health model, and the health model is displayed to the user through a preset interface. Compared with the prior art, there is no need to obtain the functional failure of the database cluster through manual intervention, the operation and maintenance efficiency is significantly improved, and the operation and maintenance manpower is saved. In addition, through the health model and inspection indicators, users are assisted in understanding the quality of the hardware performance of the database cluster, and can effectively perceive the health status of the database cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of database technology, and in particular to a monitoring method, device, system, and equipment for a database cluster. Background Art

[0002] GP stands for Greenplum Database, a large-scale parallel computing database developed based on PostgreSQL database. Its architecture is specially designed for managing large-scale analytical data warehouses and business intelligence workloads. The existing GP monitoring tool GPCC is GP's native automated operation and maintenance tool. It is oriented to database administrators and users, and provides monitoring and management functions based on a browser-based visual graphical interface. However, the existing monitoring tools require manual hardware inspections of GP clusters. In the huge GP cluster environment, the inspection efficiency is very low, and it is impossible to perceive the health status of each GP cluster, resulting in reduced work efficiency of the GP cluster.

[0003] Therefore, how to improve the hardware inspection efficiency of the GP cluster and effectively perceive the health status of the GP cluster has become an urgent problem to be solved in this field. Summary of the invention

[0004] The present application provides a monitoring method, device, system, and equipment for a database cluster, the purpose of which is to improve the hardware inspection efficiency of the GP cluster and effectively perceive the health status of the GP cluster.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] A method for monitoring a database cluster, comprising:

[0007] In the case of receiving a trigger operation from the user, the pre-configured collection task is distributed to the master node of the database cluster, so that the master node collects information according to the collection task; wherein the collection task includes information collection tasks of multiple indicators; the indicators include alarm indicators and inspection indicators; the alarm indicators are used to indicate information items that affect the service functions of the database cluster; the inspection indicators are used to indicate information items that affect the hardware performance of the database cluster but do not affect the service functions;

[0008] Obtaining a result file obtained after the master node performs information collection; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator;

[0009] When an abnormal value of the alarm indicator is detected, an alarm prompt is sent to the user to prompt the user that a functional failure of the database cluster occurs;

[0010] The values ​​of the inspection indicators are input into a pre-constructed health model, and the health model is displayed to the user through a preset front-end interface.

[0011] Optionally, also include:

[0012] Inputting the inspection index value recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain the predicted value of the inspection index; wherein the predicted value is used to reflect the performance of the database cluster hardware;

[0013] Counting the number of inspection indicators whose predicted values ​​are greater than a preset threshold;

[0014] When the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, the user is prompted that the database cluster is in a poor health state.

[0015] Optionally, when detecting that the value of the alarm indicator is abnormal, sending an alarm prompt to the user to prompt the user that the database cluster has a functional failure, includes:

[0016] Performing keyword detection on the alarm log;

[0017] In the case where it is detected that the alarm log contains a preset alarm character, determining that the value of the alarm indicator is abnormal;

[0018] Send an alarm prompt to a preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that the database cluster has a functional failure.

[0019] A monitoring device for a database cluster, comprising:

[0020] A distribution unit is used to distribute a pre-configured collection task to a master node of a database cluster upon receiving a trigger operation from a user, so that the master node collects information according to the collection task; wherein the collection task includes information collection tasks of multiple indicators; the indicators include alarm indicators and inspection indicators; the alarm indicators are used to indicate information items that affect the service function of the database cluster; the inspection indicators are used to indicate information items that affect the hardware performance of the database cluster but do not affect the service function;

[0021] An acquisition unit, used to acquire a result file obtained after the master node collects information; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator;

[0022] An alarm unit, configured to send an alarm prompt to the user when detecting that the value of the alarm indicator is abnormal, prompting the user that the database cluster has a functional failure;

[0023] The display unit is used to input the numerical value of the inspection index into a pre-constructed health model, and display the health model to the user through a preset front-end interface.

[0024] Optionally, also include:

[0025] An evaluation unit is used to input the numerical value of the inspection index recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain a predicted value of the inspection index; wherein the predicted value is used to reflect the quality of the hardware performance of the database cluster; count the number of inspection indicators whose predicted values ​​are greater than a preset threshold; when the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, prompt the user that the database cluster is in a poor health state.

[0026] Optionally, the alarm unit is used to:

[0027] Performing keyword detection on the alarm log;

[0028] In the case where it is detected that the alarm log contains a preset alarm character, determining that the value of the alarm indicator is abnormal;

[0029] Send an alarm prompt to a preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that the database cluster has a functional failure.

[0030] A monitoring system for a database cluster, comprising:

[0031] Scheduling module, collection module, and analysis module;

[0032] The scheduling module is used to pre-configure a collection task according to the information of the database cluster when receiving a trigger operation from the user, and send the collection task to the collection module; wherein the collection task includes information collection tasks of multiple indicators; the indicators include alarm indicators and inspection indicators; the alarm indicators are used to indicate information items that affect the service function of the database cluster; the inspection indicators are used to indicate information items that affect the hardware performance of the database cluster but do not affect the service function;

[0033] The collection module is used to distribute the collection task to the master node of the database cluster when receiving the collection task, so that the master node collects information according to the collection task, and obtains the result file obtained after the master node collects information; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator;

[0034] The collection module is further used to send the alarm log and the inspection log to the analysis module;

[0035] The analysis module is configured to send an alarm prompt to the user when detecting that the value of the alarm indicator is abnormal, prompting the user that the database cluster has a functional failure;

[0036] The analysis module is also used to input the numerical value of the inspection index into a pre-constructed health model, and display the health model to the user through a preset front-end interface.

[0037] Optionally, the analysis module is further used for:

[0038] Inputting the inspection index value recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain the predicted value of the inspection index; wherein the predicted value is used to reflect the performance of the database cluster hardware;

[0039] Counting the number of inspection indicators whose predicted values ​​are greater than a preset threshold;

[0040] When the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, the user is prompted that the database cluster is in a poor health state.

[0041] A computer-readable storage medium includes a stored program, wherein the program executes the database cluster monitoring method.

[0042] A monitoring device for a database cluster, comprising: a processor, a memory and a bus; the processor and the memory are connected via the bus;

[0043] The memory is used to store programs, and the processor is used to run programs, wherein the program executes the database cluster monitoring method when it is running.

[0044] The technical solution provided by the present application distributes the pre-configured collection task to the master node of the database cluster when receiving the user's trigger operation, so that the master node collects information according to the collection task. Among them, the collection task includes information collection tasks of multiple indicators, and the indicators include alarm indicators and inspection indicators. The alarm indicator is used to indicate the information items that affect the service function of the database cluster, and the inspection indicator is used to indicate the information items that affect the hardware performance of the database cluster but do not affect the service function. The result file obtained after the master node collects information is obtained. The result file includes an alarm log and an inspection log. The alarm log is used to record the value of the alarm indicator, and the inspection log is used to record the value of the inspection indicator. When the value of the alarm indicator is detected to be abnormal, an alarm prompt is sent to the user to prompt the user that the database cluster has a functional failure. The value of the inspection indicator is input into the pre-built health model, and the health model is displayed to the user through a preset front-end interface. Compared with the prior art, there is no need to obtain the functional failure of the database cluster through manual intervention, the operation and maintenance efficiency is significantly improved, and a large amount of operation and maintenance manpower is saved. In addition, through the health model and inspection indicators, users can be assisted to understand the hardware performance of the database cluster so that they can effectively perceive the health status of the database cluster. It can be seen that the solution described in this application can significantly improve the hardware inspection efficiency of the GP cluster and effectively perceive the health status of the GP cluster. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] Figure 1a A schematic diagram of the architecture of a monitoring system for a database cluster provided in an embodiment of the present application;

[0047] Figure 1b A schematic diagram of a health model provided in an embodiment of the present application;

[0048] Figure 1c A schematic diagram of a monitoring process implemented by a monitoring system of a database cluster provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of a database cluster monitoring method provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of the architecture of a monitoring device for a database cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0052] like Figure 1a FIG. 1 is a schematic diagram of the architecture of a monitoring system for a database cluster provided in an embodiment of the present application, including:

[0053] A scheduling module 101 , a collection module 102 , and an analysis module 103 .

[0054] The scheduling module 101 is used to pre-configure the collection task according to the information of the database cluster (hereinafter referred to as the cluster) when receiving the trigger operation of the user. The cluster information includes but is not limited to: the cluster name, the floating IP of the master node of the cluster, the database name, the cluster user, and the password of the cluster user. In addition, the scheduling module 101 is also used to send the collection task to the collection module 102. Specifically, the collection task can be sent to the collection module 102 when receiving the trigger operation of the user, and the collection task can also be sent to the collection module 102 at a scheduled time.

[0055] It should be noted that the specific implementation method of sending the collection task to the collection module 102 at a fixed time is common knowledge familiar to those skilled in the art. For example, a preset crontab process may be called to implement the scheduled sending of the collection task.

[0056] It should be emphasized that the collection task includes information collection tasks for multiple indicators, including alarm indicators and inspection indicators. Alarm indicators are used to indicate information items that affect cluster service functions, and inspection indicators are used to indicate information items that affect cluster hardware performance but do not affect service functions.

[0057] In an embodiment of the present application, the collection time specified in the information collection task of each indicator can be set by a technician according to actual conditions. Specifically, for alarm indicators, the collection time interval specified in the information collection task is shorter, and for inspection indicators, the collection time interval specified in the information collection task is longer.

[0058] The collection module 102 is used to distribute the collection task to the master node of the cluster through the preset collection server when receiving the collection task, so that the master node of the cluster collects information according to the collection task. In addition, the collection module 102 is also used to obtain the result file obtained after the master node of the cluster collects information, and send the result file to the analysis module 103.

[0059] It should be noted that the master nodes of different clusters all use the same collection script (such as a shell script, and the parameters used in the script are the same) during the information collection process, and the file formats of the result files of different clusters are unified and can be recognized by the preset monitoring and alarm platform.

[0060] Specifically, the directory structure of the collection script can be seen in Table 1.

[0061] Table 1

[0062]

[0063] In the above Table 1, "serial number", "primary directory", "secondary directory", "third-level directory", and "description" are all technical terms commonly used in directory structures. In addition, the contents indicated by "serial number", "primary directory", "secondary directory", "third-level directory", and "description" are all common knowledge familiar to those skilled in the art.

[0064] It should be noted that the contents shown in Table 1 above are only for illustration.

[0065] In the embodiment of the present application, the result file includes an alarm log and an inspection log. The alarm log is used to record the values ​​of the alarm indicators, and the inspection log is used to record the values ​​of the inspection indicators.

[0066] Specifically, the specific setting style of the alarm indicator can be seen in Table 2.

[0067] Table 2

[0068]

[0069]

[0070] In Table 2, the so-called "check items" are the information items described in the embodiments of the present application, the "functional indicators" and "performance indicators" are further subdivisions of the information items, the "monitoring frequency" is used to characterize the collection time interval specified in the information collection task, and the contents indicated in the "sequence number", "check items", "whether to alarm", and "log code" are all common knowledge familiar to technical personnel in this field and will not be repeated here.

[0071] It should be noted that the contents described in Table 2 above are only for illustration.

[0072] Specifically, the specific setting style of the inspection indicators can be seen in Table 3.

[0073] Table 3

[0074]

[0075]

[0076] In Table 3, the so-called "inspection items" are the information items described in the embodiments of the present application, "functional indicators" and "performance indicators" are further subdivisions of the information items, "scheduled inspections", "daily monitoring" and "real-time inspections" are all used to characterize the collection time intervals specified in the information collection tasks, and the contents indicated in the "serial number", "inspection items", and "log code" are all common knowledge familiar to technical personnel in this field and will not be repeated here.

[0077] It should be noted that the contents described in Table 3 above are only for illustration.

[0078] The analysis module 103 is used to send an alarm prompt to the user when an abnormal value of the alarm indicator is detected, prompting the user that the database cluster has a functional failure. Specifically, the analysis module 103 is used to: perform keyword detection on the alarm log, and when it is detected that the alarm log contains a preset alarm character, determine that the value of the alarm indicator is abnormal, and send an alarm prompt to the preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that the database cluster has a functional failure.

[0079] The analysis module 103 is also used to input the values ​​of the inspection indicators into a pre-built health model, and display the health model to the user through a preset front-end interface.

[0080] It should be noted that the so-called health model is a health evaluation index system, which uses multi-dimensional indicators to reflect the health status of the cluster. Figure 1b Specifically, the cluster health model can be optimized using a machine learning algorithm.

[0081] In addition, the analysis module 103 is also used to: input the numerical values ​​of the inspection indicators recorded in the inspection log within the preset historical time period into the preset trend prediction model to obtain the predicted values ​​of the inspection indicators, and the predicted values ​​are used to reflect the performance of the cluster hardware; count the number of inspection indicators whose predicted values ​​are greater than the preset threshold; when the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than the preset value, prompt the user that the health status of the cluster is not good.

[0082] It should be noted that the trend prediction model is common knowledge familiar to those skilled in the art and will not be described in detail here.

[0083] It should be emphasized that the existing monitoring indicators of GP clusters have the disadvantage of single monitoring indicators, and lack a GP performance monitoring indicator system with rich collection indicators and strong scalability as the operation and maintenance support of the enterprise-level big data platform. In addition, the existing monitoring tools of GP clusters lack the distinction between alarm indicators and inspection indicators. The system described in the embodiment of the present application realizes the distinction between functional alarms and hardware inspections for different types of indicators, connects the alarm indicators that affect the functions of the GP cluster with the preset monitoring and alarm platform, realizes automatic alarms, and improves operation and maintenance efficiency. The inspection indicators that affect the hardware performance of the GP cluster are displayed through a health model to provide an effective reference basis for users (such as operation and maintenance personnel) to optimize cluster performance.

[0084] In view of the functions of the above modules, such as Figure 1c As shown, the monitoring system of the database cluster described in the present application implements the process of monitoring the hardware performance and service functions of the database cluster, including the following steps:

[0085] S101: When receiving a trigger operation from a user, the scheduling module pre-configures a collection task according to information of a database cluster.

[0086] S102: The scheduling module sends a collection task to the collection module.

[0087] S103: The collection module distributes the collection task to the master node of the database cluster, so that the master node collects information according to the collection task.

[0088] The result files include alarm logs and inspection logs.

[0089] S104: The collection module obtains the result file obtained after the main node collects information.

[0090] The result files include alarm logs and inspection logs.

[0091] S105: The collection module sends the alarm log and the inspection log to the analysis module.

[0092] S106: When an abnormal value of the alarm indicator is detected, the analysis module sends an alarm prompt to the user, prompting the user that a functional failure occurs in the database cluster.

[0093] S107: The analysis module inputs the values ​​of the inspection indicators into a pre-built health model, and displays the health model to the user through a preset front-end interface.

[0094] In summary, compared with the prior art, there is no need to manually intervene to learn about the functional failure of the database cluster, the operation and maintenance efficiency is significantly improved, and a large amount of operation and maintenance manpower is saved. In addition, through the health model and inspection indicators, users are assisted in understanding the hardware performance of the database cluster so that they can effectively perceive the health status of the database cluster. It can be seen that the solution described in this embodiment can significantly improve the hardware inspection efficiency of the GP cluster and effectively perceive the health status of the GP cluster.

[0095] like Figure 2 FIG. 1 is a schematic diagram of a method for monitoring a database cluster provided in an embodiment of the present application, comprising the following steps:

[0096] S201: When a trigger operation of a user is received, a pre-configured collection task is distributed to a master node of a database cluster, so that the master node collects information according to the collection task.

[0097] Among them, the collection tasks include information collection tasks of multiple indicators, and the indicators include alarm indicators and inspection indicators. The alarm indicators are used to indicate information items that affect the service functions of the database cluster, and the inspection indicators are used to indicate information items that affect the hardware performance of the database cluster but do not affect the service functions.

[0098] S202: Obtain the result file obtained after the master node collects information.

[0099] The result file includes an alarm log and an inspection log. The alarm log is used to record the values ​​of the alarm indicators, and the inspection log is used to record the values ​​of the inspection indicators.

[0100] S203: When an abnormal value of the alarm indicator is detected, an alarm prompt is sent to the user to prompt the user that a functional failure occurs in the database cluster.

[0101] Optionally, keyword detection is performed on the alarm log; when it is detected that the alarm log contains preset alarm characters, it is determined that the value of the alarm indicator is abnormal; an alarm prompt is sent to a preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that a functional failure has occurred in the database cluster.

[0102] S204: Input the values ​​of the inspection indicators into a pre-built health model, and display the health model to the user through a preset front-end interface.

[0103] Optionally, the values ​​of inspection indicators recorded in the inspection log within a preset historical time period are input into a preset trend prediction model to obtain predicted values ​​of the inspection indicators; wherein the predicted values ​​are used to reflect the performance of the database cluster hardware; the number of inspection indicators whose predicted values ​​are greater than a preset threshold is counted; when the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, the user is prompted that the health status of the database cluster is not good.

[0104] In summary, compared with the prior art, there is no need to manually intervene to learn about the functional failure of the database cluster, the operation and maintenance efficiency is significantly improved, and a large amount of operation and maintenance manpower is saved. In addition, through the health model and inspection indicators, users are assisted in understanding the hardware performance of the database cluster so that they can effectively perceive the health status of the database cluster. It can be seen that the solution described in this embodiment can significantly improve the hardware inspection efficiency of the GP cluster and effectively perceive the health status of the GP cluster.

[0105] Corresponding to the method for monitoring a database cluster provided in the above-mentioned embodiment of the present application, the embodiment of the present application also provides a device for monitoring a database cluster.

[0106] like Figure 3 FIG. 1 is a schematic diagram of the architecture of a monitoring device for a database cluster provided in an embodiment of the present application, including:

[0107] The distribution unit 100 is used to distribute the pre-configured collection task to the master node of the database cluster when receiving the user's trigger operation, so that the master node collects information according to the collection task; wherein the collection task includes information collection tasks of multiple indicators; the indicators include alarm indicators and inspection indicators; the alarm indicators are used to indicate information items that affect the service functions of the database cluster; the inspection indicators are used to indicate information items that affect the hardware performance of the database cluster but do not affect the service functions.

[0108] The acquisition unit 200 is used to obtain the result file obtained after the main node collects information; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator.

[0109] The alarm unit 300 is used to send an alarm prompt to the user when it is detected that the value of the alarm indicator is abnormal, prompting the user that the database cluster has a functional failure.

[0110] Among them, the alarm unit 300 is used to: perform keyword detection on the alarm log; when it is detected that the alarm log contains preset alarm characters, determine that the value of the alarm indicator is abnormal; send an alarm prompt to the preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that a functional failure of the database cluster has occurred.

[0111] The display unit 400 is used to input the values ​​of the inspection indicators into a pre-built health model, and display the health model to the user through a preset front-end interface.

[0112] The evaluation unit 500 is used to input the numerical values ​​of the inspection indicators recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain the predicted values ​​of the inspection indicators; wherein the predicted values ​​are used to reflect the performance of the database cluster hardware; the number of inspection indicators whose predicted values ​​are greater than a preset threshold is counted; when the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than the preset value, the user is prompted that the health status of the database cluster is not good.

[0113] In summary, compared with the prior art, there is no need to manually intervene to learn about the functional failure of the database cluster, the operation and maintenance efficiency is significantly improved, and a large amount of operation and maintenance manpower is saved. In addition, through the health model and inspection indicators, users are assisted in understanding the hardware performance of the database cluster so that they can effectively perceive the health status of the database cluster. It can be seen that the solution described in this embodiment can significantly improve the hardware inspection efficiency of the GP cluster and effectively perceive the health status of the GP cluster.

[0114] The present application also provides a computer-readable storage medium, which includes a stored program, wherein the program executes the database cluster monitoring method provided by the present application.

[0115] The present application also provides a database cluster monitoring device, including: a processor, a memory and a bus. The processor and the memory are connected via a bus, the memory is used to store programs, and the processor is used to run programs, wherein when the program is running, the database cluster monitoring method provided by the present application is executed, including the following steps:

[0116] In the case of receiving a trigger operation from the user, the pre-configured collection task is distributed to the master node of the database cluster, so that the master node collects information according to the collection task; wherein the collection task includes information collection tasks of multiple indicators; the indicators include alarm indicators and inspection indicators; the alarm indicators are used to indicate information items that affect the service functions of the database cluster; the inspection indicators are used to indicate information items that affect the hardware performance of the database cluster but do not affect the service functions;

[0117] Obtaining a result file obtained after the master node performs information collection; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator;

[0118] When an abnormal value of the alarm indicator is detected, an alarm prompt is sent to the user to prompt the user that a functional failure of the database cluster occurs;

[0119] The values ​​of the inspection indicators are input into a pre-constructed health model, and the health model is displayed to the user through a preset front-end interface.

[0120] Optionally, also include:

[0121] Inputting the inspection index value recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain the predicted value of the inspection index; wherein the predicted value is used to reflect the performance of the database cluster hardware;

[0122] Counting the number of inspection indicators whose predicted values ​​are greater than a preset threshold;

[0123] When the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, the user is prompted that the database cluster is in a poor health state.

[0124] Optionally, when detecting that the value of the alarm indicator is abnormal, sending an alarm prompt to the user to prompt the user that the database cluster has a functional failure, includes:

[0125] Performing keyword detection on the alarm log;

[0126] In the case where it is detected that the alarm log contains a preset alarm character, determining that the value of the alarm indicator is abnormal;

[0127] Send an alarm prompt to a preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that the database cluster has a functional failure.

[0128] If the functions described in the method of the embodiment of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a storage medium readable by a computing device. Based on this understanding, the part of the embodiment of the present application 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 to enable a computing device (which can be a personal computer, server, mobile computing device or 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: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0129] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0130] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for monitoring a database cluster, characterized in that: include: In the case of receiving a trigger operation from the user, the pre-configured collection task is distributed to the master node of the database cluster, so that the master node collects information according to the collection task; wherein the collection task includes information collection tasks of multiple indicators; the multiple indicators include alarm indicators and inspection indicators; the alarm indicators are used to indicate information items that affect the service functions of the database cluster, including: GP cluster availability check, GP instance downtime check, GP cluster node disk hardware log check, calculation tilt and load check; the inspection indicators are used to indicate information items that affect the hardware performance of the database cluster but do not affect the service functions, including: GP master-slave instance data out of sync, input / input errors, number of database connections, number of database active sessions, session lock wait check, AGE value check, deadlock check and long SQL check; the master nodes of different clusters use the same collection script during information collection, and the file formats of the result files of different clusters are the same; Obtaining a result file obtained after the master node performs information collection; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator; When an abnormal value of the alarm indicator is detected, an alarm prompt is sent to the user to prompt the user that a functional failure of the database cluster occurs; Inputting the values ​​of the inspection indicators into a pre-built health model, and displaying the health model to the user through a preset front-end interface; Inputting the inspection index value recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain the predicted value of the inspection index; wherein the predicted value is used to reflect the performance of the database cluster hardware; Counting the number of inspection indicators whose predicted values ​​are greater than a preset threshold; When the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, the user is prompted that the database cluster is in a poor health state.

2. The method according to claim 1, characterized in that When detecting that the value of the alarm indicator is abnormal, sending an alarm prompt to the user to prompt the user that the database cluster has a functional failure, includes: Performing keyword detection on the alarm log; In the case where it is detected that the alarm log contains a preset alarm character, determining that the value of the alarm indicator is abnormal; Send an alarm prompt to a preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that the database cluster has a functional failure.

3. A monitoring device for a database cluster, characterized in that: include: A distribution unit is used to distribute the pre-configured collection task to the master node of the database cluster when receiving a trigger operation from the user, so that the master node collects information according to the collection task; wherein the collection task includes information collection tasks of multiple indicators; the multiple indicators include alarm indicators and inspection indicators; the alarm indicators are used to indicate information items that affect the service function of the database cluster, including: GP cluster availability check, GP instance downtime check, GP cluster node disk hardware log check, calculation tilt and load check; the inspection indicator is used to indicate information items that affect the hardware performance of the database cluster but do not affect the service function, including: GP master and standby instance data synchronization, input / input errors, number of database connections, number of database active sessions, session lock wait check, AGE value check, deadlock check and long SQL check; the master nodes of different clusters use the same collection script in the process of information collection, and the file formats of the result files of different clusters are the same; An acquisition unit, used to acquire a result file obtained after the master node collects information; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator; An alarm unit, configured to send an alarm prompt to the user when detecting that the value of the alarm indicator is abnormal, prompting the user that the database cluster has a functional failure; A display unit, used to input the numerical value of the inspection index into a pre-built health model, and display the health model to the user through a preset front-end interface; An evaluation unit is used to input the numerical value of the inspection index recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain a predicted value of the inspection index; wherein the predicted value is used to reflect the quality of the hardware performance of the database cluster; count the number of inspection indicators whose predicted values ​​are greater than a preset threshold; when the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, prompt the user that the database cluster is in a poor health state.

4. The device according to claim 3, characterized in that The alarm unit is used for: Performing keyword detection on the alarm log; In the case where it is detected that the alarm log contains a preset alarm character, determining that the value of the alarm indicator is abnormal; Send an alarm prompt to a preset monitoring alarm platform, triggering the monitoring alarm platform to send a prompt to the user that the database cluster has a functional failure.

5. A monitoring system for a database cluster, characterized in that: include: Scheduling module, collection module, and analysis module; The scheduling module is used to pre-configure a collection task according to the information of the database cluster when receiving a trigger operation from the user, and send the collection task to the collection module; wherein the collection task includes information collection tasks of multiple indicators; the multiple indicators include multiple alarm indicators and multiple inspection indicators; the alarm indicator is used to indicate information items that affect the service function of the database cluster; the inspection indicator is used to indicate information items that affect the hardware performance of the database cluster but do not affect the service function; The collection module is used to distribute the collection task to the master node of the database cluster when receiving the collection task, so that the master node collects information according to the collection task, and obtains the result file obtained after the master node collects information; the result file includes an alarm log and an inspection log; the alarm log is used to record the value of the alarm indicator; the inspection log is used to record the value of the inspection indicator; The collection module is further used to send the alarm log and the inspection log to the analysis module; The analysis module is configured to send an alarm prompt to the user when detecting that the value of the alarm indicator is abnormal, prompting the user that the database cluster has a functional failure; The analysis module is further used to input the values ​​of the inspection indicators into a pre-built health model, and to display the health model to the user through a preset front-end interface; Inputting the inspection index value recorded in the inspection log within a preset historical time period into a preset trend prediction model to obtain the predicted value of the inspection index; wherein the predicted value is used to reflect the performance of the database cluster hardware; Counting the number of inspection indicators whose predicted values ​​are greater than a preset threshold; When the number of inspection indicators whose predicted values ​​are greater than the preset threshold is greater than a preset value, the user is prompted that the database cluster is in a poor health state.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the database cluster monitoring method according to claim 1 or 2.

7. A monitoring device for a database cluster, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus; The memory is used to store programs, and the processor is used to run programs, wherein the program executes the database cluster monitoring method according to claim 1 or 2 when running.

Citation Information

Patent Citations

  • Automatic operation and maintenance system based on acquisition cluster

    CN109857613A

  • Cloud management using a component health model

    US20140195853A1