Database operation and maintenance method and device, equipment, storage medium and program product
By generating and executing monitoring probe statements to obtain the performance status of distributed databases, the problems of complex monitoring and performance overhead in the prior art are solved, and safe, real-time and accurate performance monitoring and problem positioning are achieved.
Patent Information
- Application Number
- CN202411819720.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-18
AI Technical Summary
When operating and maintaining distributed databases, the monitoring is complex and generates performance overhead. Log monitoring has information security problems, so performance problems cannot be located and handled in a timely manner.
By obtaining the configuration performance data of distributed databases and database nodes, a monitoring probe statement is generated and sent to the database node, and the probe statement is executed to obtain performance status monitoring data, thereby determining the database performance status.
It realizes that without increasing the performance overhead of distributed databases, it can simply, conveniently, securely, real-time and precisely monitor and obtain database performance status, timely locate and resolve abnormal problems, and ensure the normal operation of the database and business.
Smart Images

Figure CN119645966A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed database technology, and in particular to a database operation and maintenance method, device, equipment, storage medium and program product. Background Art
[0002] When operating and maintaining a distributed database, the prior art usually uses a passive monitoring solution to monitor the performance of the distributed database, specifically monitoring the performance indicators of the distributed database at the corresponding node, and determining the performance status of the distributed database based on the corresponding threshold; or by collecting the log files of the distributed database, and monitoring the events, exceptions and errors occurring in the distributed database system through the logs, and then using a performance analysis tool to diagnose and determine the performance status of the distributed database.
[0003] However, in a large-scale distributed database environment, the existing technology of monitoring the performance indicators of the distributed database at the corresponding nodes is complex to operate and will generate a large additional performance overhead that affects normal business; when monitoring the performance status of the distributed database through the log monitoring solution, there are information security issues, and it is impossible to locate and handle the performance problems of the distributed database in a timely manner. Summary of the invention
[0004] The embodiments of the present invention provide a database operation and maintenance method, apparatus, equipment, storage medium and program product, which can be used to actively control and simply, conveniently, safely, in real time and accurately monitor and obtain the performance status of a distributed database without increasing the performance overhead of the distributed database as much as possible.
[0005] In a first aspect, an embodiment of the present invention provides a database operation and maintenance method, including:
[0006] Obtaining configuration performance data of a distributed database and a database node to obtain database information, wherein the database node is a server node where the distributed database is located;
[0007] generating a monitoring probe statement based on the database information, and sending the monitoring probe statement to the database node, so that the database node executes the monitoring probe statement to obtain performance status monitoring data of the distributed database; and
[0008] The performance status of the distributed database is determined based on the performance status monitoring data returned by the database node.
[0009] In a second aspect, an embodiment of the present invention provides a database operation and maintenance device, including:
[0010] A database information acquisition module, used to acquire the configuration performance data of the distributed database and the database node to obtain database information, wherein the database node is the server node where the distributed database is located;
[0011] A probe statement generating and sending module, configured to generate a monitoring probe statement based on the database information, and send the monitoring probe statement to the database node, so that the database node executes the monitoring probe statement to obtain performance status monitoring data of the distributed database; and
[0012] A performance status determination module is used to determine the performance status of the distributed database based on the performance status monitoring data returned by the database node.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, database operation and maintenance as described in any one of the embodiments of the present invention is implemented.
[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements database operation and maintenance as described in any one of the embodiments of the present invention.
[0015] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the database operation and maintenance as described in any one of the embodiments of the present invention.
[0016] A database operation and maintenance method, apparatus, device, storage medium and program product provided by an embodiment of the present invention obtains database information by acquiring configuration performance data of a distributed database and a database node, generates a monitoring probe statement based on the database information, and then sends the monitoring probe statement to the database node so that the database node executes the monitoring probe statement to obtain performance status monitoring data of the distributed database, and then determines the performance status of the distributed database based on the performance status monitoring data returned by the database node. This can facilitate active control to simply, conveniently, safely, in real time and accurately monitor and obtain the performance status of the distributed database without increasing the performance overhead of the distributed database as much as possible, and can facilitate timely location and resolution of problems when abnormalities occur in the distributed database, thereby ensuring that the distributed database and related businesses remain in smooth operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flowchart of a database operation and maintenance method provided by an embodiment of the present invention;
[0019] Figure 2 is another flowchart of the database operation and maintenance method provided by an embodiment of the present invention;
[0020] Figure 3 is another flowchart of the database operation and maintenance method provided by an embodiment of the present invention;
[0021] Figure 4 It is a structural schematic diagram of a database operation and maintenance device provided by an embodiment of the present invention;
[0022] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The existing solutions for monitoring the performance of distributed databases are usually passive monitoring solutions, including:
[0024] (1) Monitor the performance indicators of the distributed database at the corresponding nodes: monitor various system indicators, such as CPU utilization, memory usage, disk I / O, network traffic, etc. You can set alarms by setting thresholds for monitoring indicators, so that when problems and abnormalities occur in the system, alarms can be issued and maintenance measures can be taken.
[0025] (2) Obtain monitoring data by collecting log files of distributed databases: Collect log files of databases and use log monitoring to record events, exceptions, and errors that occur in the system. Afterwards, performance analysis tools can be used to diagnose and analyze database performance problems and causes, such as troubleshooting slow SQL, SQL with abnormal resource consumption, abnormal tables, abnormal data, etc.
[0026] However, when using the first method, monitoring the multi-dimensional performance data of hundreds of nodes in a large-scale distributed database environment is very complex and has poor real-time performance. In addition, real-time monitoring and processing of this data will incur additional performance overhead, which may affect normal business.
[0027] When using the second method, sensitive information may be involved, and the related monitoring functions need to pay extra attention to data privacy and data security issues. After a problem is detected, it may not be possible to quickly locate the cause of the problem, and it is necessary to wait until the problem occurs before taking appropriate measures to restore database performance.
[0028] The database operation and maintenance method, device, equipment, storage medium and program product provided by the embodiments of the present invention perform active monitoring by generating monitoring probe statements. The monitoring method is simple, convenient and can be performed in real time. Moreover, the embodiments of the present invention can be beneficial to actively control the performance overhead of the distributed database as little as possible and will not affect the normal business of the distributed database. In addition, since the method of the present application is actively monitored, it can obtain monitoring performance data on demand to ensure that business-related data is not obtained during the monitoring process, and to prevent the leakage of sensitive information, so it can be beneficial to ensure data security. In addition, since the present application obtains the performance status data of the distributed database in an active manner, it can promptly determine the performance problems of the distributed database when the performance status data is abnormal, so as to promptly deal with the corresponding problems.
[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] Figure 1A flowchart of a database operation and maintenance method provided in an embodiment of the present invention. This embodiment is applicable to the scenario of distributed database operation and maintenance. The method can be executed by a database operation and maintenance device provided in an embodiment of the present invention, and the device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated in an electronic device as an example. Reference Figure 1 , the method may specifically include the following steps:
[0032] Step 101, obtain the configuration performance data of the distributed database and the database node to obtain database information, where the database node is the server node where the distributed database is located. This step is conducive to generating monitoring probe statements for the distributed database based on the configuration performance data of the distributed database and the database node.
[0033] Specifically, the configuration performance data of the distributed database and database node may include all configuration performance data related to the performance status of the distributed database, and may also include part of the configuration performance data related to the performance status of the distributed database.
[0034] Specifically, for two different performance data, when the two performance data reflect the same performance state of the database, only one of the two performance data may be obtained, or both performance data may be obtained.
[0035] Optionally, the configuration performance data of the above distributed database includes: database version information.
[0036] Specifically, the application logic corresponding to different versions of database systems, such as database functions and database performance, may be different. Therefore, obtaining the version information of the database can help generate monitoring probe statements based on the version information, thereby obtaining more accurate monitoring data.
[0037] Optionally, the configuration performance data of the above database nodes includes: node scale, storage capacity information and computing power information of the database nodes.
[0038] Specifically, in order to monitor the database performance status in a timely and accurate manner, the node scale, storage capacity information and computing power information of the database nodes are closely related to the number of required monitoring probe statements. Therefore, obtaining the node scale, storage capacity information and computing power information of the database nodes can facilitate the generation of monitoring probe statements that match the node scale, storage capacity and computing power information of the database.
[0039] Specifically, the configuration performance data of the above database node may include detailed parameter data of the processor, memory, disk storage, disk, network, etc. of the database node.
[0040] Step 102: Generate monitoring probe statements based on database information and send the monitoring probe statements to database nodes so that the database nodes execute the monitoring probe statements to obtain performance status monitoring data of the distributed database. This step can help the database nodes execute the corresponding monitoring probe statements to obtain accurate performance status monitoring data of the distributed database.
[0041] Optionally, the above monitoring probe statements include status query statements and performance test statements.
[0042] Specifically, the above status query statement can be used to query the status of a distributed database. For example, the resource utilization rate of the node where the distributed database is located can be queried.
[0043] Specifically, the above performance test statements can be used to test and monitor the performance of a distributed database. For example, a performance test statement that simulates a database operation can be generated to simulate and control the distributed database to perform an operation and collect corresponding performance data.
[0044] Optionally, the above performance status monitoring data includes: the execution time of the monitoring probe statement executed by the database node, the resource utilization rate of the database node, and the throughput of the database node.
[0045] Optionally, the above performance status monitoring data also includes abnormal event data.
[0046] Optionally, the process of generating the monitoring probe statement based on the database information includes: calling a shell script based on the database information to generate the monitoring probe statement composed of a Structured Query Language (SQL) statement.
[0047] Optionally, the Shell interpreter provided on the database node provided in the embodiment of the present invention is a program.
[0048] Specifically, calling a shell script, ie, a shell script, to generate a monitoring probe statement can help reduce resource consumption when a database node executes the monitoring probe statement.
[0049] Optionally, the above process of generating monitoring probe statements based on database information includes: determining the data volume of the monitoring probe statements based on the node scale, storage capacity information and computing power information of the database nodes, and generating the monitoring probe statements based on the data volume of the monitoring probe statements.
[0050] In a specific example, the total storage capacity of each service bureau node of the distributed database is 1TB, and there are 100 nodes in total. The probe statement program is adjusted to generate a monitoring probe statement with a data volume of 100GB, and each service node corresponds to a monitoring probe statement with a data volume of 1GB.
[0051] It can be understood that by calling a shell script, i.e., a shell script, to generate monitoring probe statements and determining the data volume of the monitoring probe statements based on the node scale, storage capacity information, and computing power information of the database node, the performance overhead of the database node in executing and controlling the monitoring probe statements can be minimized, and the impact on the normal business of the database node can be avoided as much as possible.
[0052] Optionally, the process of sending the monitoring probe statement to the database node includes: sending the monitoring probe statement to the database node based on a set monitoring cycle.
[0053] Step 103, determining the performance status of the distributed database based on the performance status monitoring data returned by the database node. This step, based on steps 101 and 102, obtains database information by acquiring the configuration performance data of the distributed database and the database node, generates monitoring probe statements based on the database information, and then sends the monitoring probe statements to the database node, so that the database node executes the monitoring probe statements, obtains the performance status monitoring data of the distributed database, and then determines the performance status of the distributed database based on the performance status monitoring data returned by the database node, which can be helpful for actively controlling the performance status of the distributed database to be simply, conveniently, safely, in real time and accurately monitored without increasing the performance overhead of the distributed database as much as possible, and is helpful for timely locating and solving problems when abnormalities occur in the distributed database, ensuring that the distributed database and related businesses remain running smoothly.
[0054] Optionally, the above process of determining the performance status of the distributed database based on the performance status monitoring data returned by the database node includes: summarizing and quantitatively analyzing the performance status monitoring data.
[0055] Specifically, quantitative aggregation and quantitative segmentation of performance status monitoring data can quantify the status and performance of the database, identify potential problems or performance bottlenecks and status anomalies, and provide performance evaluation indicators and reports.
[0056] Optionally, the process of determining the performance status of the distributed database based on the performance status monitoring data returned by the database node includes:
[0057] Whether the database node is abnormal is determined based on whether the difference between the execution time of the monitoring probe statement executed by the database node and the corresponding normal execution time is greater than a preset time threshold, whether the resource utilization of the database node is greater than a preset utilization threshold, and / or whether the throughput of the database node is less than a preset throughput threshold.
[0058] Optionally, the database operation and maintenance method provided by the embodiment of the present invention also includes: displaying the performance status of the distributed database.
[0059] Specifically, the quantitative data of the performance status of the above distributed database can be made into reports, monitoring charts, etc. for display.
[0060] Specifically, displaying the performance status of a distributed database can help operation and maintenance personnel intuitively observe and judge whether the database is running normally, so as to make correct operation and maintenance decisions.
[0061] Optionally, the database operation and maintenance method provided by the embodiment of the present invention further includes: issuing an alarm when the performance status of the distributed database is abnormal.
[0062] Optionally, when the quantitative data of the performance status of the above-mentioned distributed database does not belong to the corresponding preset range, the corresponding performance status is determined to be an abnormal state, a monitoring alarm mechanism is triggered, and an alarm message is sent.
[0063] Specifically, when the resource utilization of the database node is greater than a preset first resource utilization threshold or less than a preset second resource utilization threshold, the resource utilization of the distributed database may be determined to be abnormal.
[0064] Specifically, issuing an alarm when the performance status of a distributed database is abnormal can help operation and maintenance personnel respond quickly, so as to discover system problems in time before large-scale failures occur and improve the stability of the database.
[0065] Optionally, the database operation and maintenance method provided by the embodiment of the present invention further includes: when the performance status of the distributed database is abnormal, adjusting the resource configuration and / or load distribution of the distributed database.
[0066] Optionally, the above process of adjusting the resource configuration and / or load distribution of the distributed database includes: scaling the capacity of the corresponding database nodes.
[0067] Optionally, when the resource utilization of the database node is greater than a preset first resource utilization threshold, the capacity of the corresponding database node may be expanded.
[0068] Optionally, the above process of adjusting the resource configuration and / or load distribution of the distributed database includes: limiting the flow and / or queuing the job tasks of the distributed database.
[0069] It is understandable that when the performance status of a distributed database is abnormal, adjusting the resource configuration and / or load distribution of the distributed data can solve system problems in a timely manner before a large-scale failure occurs in the distributed database, improve the stability of the database, or reduce operating costs.
[0070] The following further describes the database operation and maintenance method provided by the embodiment of the present invention. Figure 2As shown, the following steps may be included:
[0071] Step 201 , determining whether the distributed database is a database that is being monitored for the first time, or whether the corresponding database information has changed.
[0072] Optionally, the process of determining whether the corresponding database information has changed includes:
[0073] Obtain the scaling records, migration records, and / or machine replacement records of the distributed database to obtain database change records; if the time corresponding to the database change record is after the time when the configuration performance data of the distributed database and database node was last generated to obtain the database information, then it is determined that the corresponding database information has changed, otherwise it is determined that the corresponding CNC has not changed.
[0074] Step 202: when the distributed database is a database to be monitored for the first time, or when the corresponding database information changes, the configuration performance data of the distributed database and the database node are acquired to obtain the database information.
[0075] Step 203: Generate a monitoring probe statement based on the database information, and send the monitoring probe statement to the database node, so that the database node executes the monitoring probe statement to obtain the performance status monitoring data of the distributed database.
[0076] Step 204: determine the performance status of the distributed database based on the performance status monitoring data returned by the database node.
[0077] Optionally, when the distributed database is not a database for which monitoring is deployed for the first time and corresponding database information has not changed, the existing monitoring probe statement is used.
[0078] Optionally, when the distributed database is not a database for which monitoring is deployed for the first time and the corresponding database information has not changed, the existing monitoring probe statements are used according to a preset cycle to execute steps 203 and 204 to monitor the performance status of the distributed database.
[0079] The embodiments of the present invention can help to timely generate monitoring probe statements corresponding to the current database information of the distributed database, thereby helping to ensure the accuracy of the acquired performance status monitoring data and performance status.
[0080] The following further describes the database operation and maintenance method provided by the embodiment of the present invention. Figure 3 As shown, the following steps may be included:
[0081] Step 301: Obtain configuration performance data of a distributed database and database nodes to obtain database information.
[0082] Step 302: Determine the monitoring requirements of the distributed database based on the purpose of the distributed database, where the monitoring requirements include key monitoring performance of the distributed database.
[0083] Optionally, when the purpose of the distributed database involves data table association, for example, when the distributed database is used for positioning, the monitoring requirements of the distributed database are determined to focus on monitoring performance including data redistribution performance.
[0084] It is understandable that the data of each node in a distributed database is hash-distributed. When the tables are associated, the data may be redistributed according to different conditions, that is, the data may be moved from one node to another. Therefore, for distributed databases whose uses involve data table association, it is necessary to focus on monitoring the data redistribution performance.
[0085] Step 303: Generate a monitoring probe statement based on the database information and monitoring requirements, and send the monitoring probe statement to the database node, so that the database node executes the monitoring probe statement to obtain the performance status monitoring data of the distributed database.
[0086] Optionally, the above process of generating monitoring probe statements based on database information and monitoring requirements includes: when the distributed database is used for positioning, generating monitoring probe statements that simulate positioning operations.
[0087] Step 304: determine the performance status of the distributed database based on the performance status monitoring data returned by the database node.
[0088] The embodiments of the present invention can be beneficial to more flexibly monitor the important status performance of the distributed database based on the usage characteristics of the distributed database, and better ensure the normal operation of the distributed data.
[0089] Figure 4 is a structural diagram of a database operation and maintenance device provided in an embodiment of the present invention, and the device is suitable for executing a database operation and maintenance method provided in an embodiment of the present invention. Figure 4 As shown, the device may specifically include:
[0090] The database information acquisition module 401 is used to acquire the configuration performance data of the distributed database and database nodes to obtain database information, where the database node is the server node where the distributed database is located. This module is conducive to generating monitoring probe statements for the distributed database based on the configuration performance data of the distributed database and database nodes.
[0091] Optionally, the configuration performance data of the above distributed database includes: database version information.
[0092] Optionally, the configuration performance data of the above database nodes includes: node scale, storage capacity information and computing power information of the database nodes.
[0093] The probe statement generation and sending module 402 is used to generate monitoring probe statements based on database information and send the monitoring probe statements to database nodes so that the database nodes execute the monitoring probe statements and obtain the performance status monitoring data of the distributed database. This module is conducive to enabling the database nodes to execute the corresponding monitoring probe statements to obtain accurate performance status monitoring data of the distributed database.
[0094] Optionally, the above monitoring probe statements include status query statements and performance test statements.
[0095] Optionally, the above performance status monitoring data includes: the execution time of the monitoring probe statement executed by the database node, the resource utilization rate of the database node, and the throughput of the database node.
[0096] Optionally, the probe statement generating and sending module 402 can be specifically used to call a shell script based on database information to generate a monitoring probe statement consisting of a structured query language statement.
[0097] Optionally, the above-mentioned probe statement generation and sending module 402 can be specifically used to determine the data volume of the monitoring probe statement based on the node scale, storage capacity information data and computing power information data of the database node; and to generate a monitoring probe statement based on the data volume of the monitoring probe statement.
[0098] The performance status determination module 403 is used to determine the performance status of the distributed database based on the performance status monitoring data sent back by the database node. This module is combined with modules 401 and 402, and can obtain database information by obtaining the configuration performance data of the distributed database and the database node, and generate monitoring probe statements based on the database information, and then send the monitoring probe statements to the database node, so that the database node executes the monitoring probe statements, obtains the performance status monitoring data of the distributed database, and then determines the performance status of the distributed database based on the performance status monitoring data sent back by the database node. It can control the performance status of the distributed database to be simply, conveniently, safely, in real time and accurately monitored without increasing the performance overhead of the distributed database as much as possible, and is conducive to timely locating and solving problems when abnormalities occur in the distributed database, ensuring that the distributed database and related businesses remain running smoothly.
[0099] Optionally, the database operation and maintenance device provided by the embodiment of the present invention further includes: a display module, which is used to display the performance status of the distributed database.
[0100] Optionally, the database operation and maintenance device provided by the embodiment of the present invention further includes: an alarm module, which is used to issue an alarm when the performance status of the distributed database is abnormal.
[0101] Optionally, the database operation and maintenance device provided by the embodiment of the present invention further includes: an adjustment module, which is used to adjust the resource configuration and / or load distribution of the distributed database when the performance status of the distributed database is abnormal.
[0102] Optionally, the database operation and maintenance device provided by the embodiment of the present invention further includes: a judgment module, used to judge whether the distributed database is a database that is deployed and monitored for the first time, or whether the corresponding database information has changed.
[0103] Optionally, the aforementioned database information acquisition module 401 is used to acquire configuration performance data of the distributed database and database nodes to obtain database information when the distributed database is a database that is being monitored for the first time or when the corresponding database information changes.
[0104] Optionally, the database operation and maintenance device provided by the embodiment of the present invention further includes: a monitoring requirement acquisition module, which is used to determine the monitoring requirements of the distributed database based on the purpose of the distributed database, and the monitoring requirements include key monitoring performance of the distributed database.
[0105] Optionally, the aforementioned probe statement generating and sending module 402 can be specifically used to generate monitoring probe statements based on database information and monitoring requirements.
[0106] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0107] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the database operation and maintenance method provided in any of the above embodiments is implemented.
[0108] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the database operation and maintenance method provided in any of the above embodiments is implemented.
[0109] The embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the database operation and maintenance method as described in any one of the embodiments of the present invention.
[0110] Reference below Figure 5, which shows a schematic diagram of the structure of a computer system 500 of an electronic device suitable for implementing an embodiment of the present invention. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0111] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0112] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0113] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0114] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be arranged in a processor, for example, it may be described as follows: a processor includes a database information acquisition module, a probe statement generation and sending module, and a performance status determination module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0117] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining the configuration performance data of the distributed database and the database node to obtain database information, where the database node is the server node where the distributed database is located; generating a monitoring probe statement based on the database information, and sending the monitoring probe statement to the database node so that the database node executes the monitoring probe statement and obtains the performance status monitoring data of the distributed database; and determining the performance status of the distributed database based on the performance status monitoring data returned by the database node.
[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A database operation and maintenance method, characterized in that: include: Obtaining configuration performance data of a distributed database and a database node to obtain database information, wherein the database node is a server node where the distributed database is located; Generate a monitoring probe statement based on the database information, and send the monitoring probe statement to the database node, so that the database node executes the monitoring probe statement to obtain performance status monitoring data of the distributed database; as well as The performance status of the distributed database is determined based on the performance status monitoring data returned by the database node.
2. The database operation and maintenance method according to claim 1, characterized in that: Also includes: Displaying the performance status of the distributed database; Producing an alarm when the performance status of the distributed database is abnormal; and / or When the performance status of the distributed database is abnormal, the resource configuration and / or load distribution of the distributed database is adjusted.
3. The database operation and maintenance method according to claim 1, characterized in that: Before acquiring the configuration performance data of the distributed database and the database node to obtain the database information, the database operation and maintenance method further includes: Determine whether the distributed database is a database that is being monitored for the first time, or whether the corresponding database information has changed; When the distributed database is a database that is being monitored for the first time, or when corresponding database information changes, the step of obtaining the configuration performance data of the distributed database and database nodes is started to obtain database information.
4. The database operation and maintenance method according to claim 1, characterized in that: Before generating a monitoring probe statement based on the database information, the database operation and maintenance method further includes: Determining monitoring requirements of the distributed database based on the purpose of the distributed database, wherein the monitoring requirements include key monitoring performance of the distributed database; The generating a monitoring probe statement based on the database information includes: The monitoring probe statement is generated based on the database information and the monitoring requirement.
5. The database operation and maintenance method according to any one of claims 1 to 4, characterized in that: The configuration performance data of the distributed database includes: database version information; The configuration performance data of the database node includes: node scale, storage capacity information data and computing power information data of the database node; The performance status monitoring data includes: the execution time of the monitoring probe statement executed by the database node, the resource utilization rate of the database node, and the throughput of the database node; The monitoring probe statements include: status query statements and performance test statements.
6. The database operation and maintenance method according to claim 5, characterized in that: The generating a monitoring probe statement based on the database information includes: Determining the data volume of the monitoring probe statement based on the node scale, storage capacity information data and computing power information data of the database node; and The monitoring probe statement is generated based on the data volume of the monitoring probe statement.
7. A database operation and maintenance device, characterized in that: include: A database information acquisition module, used to acquire the configuration performance data of the distributed database and the database node to obtain database information, wherein the database node is the server node where the distributed database is located; A probe statement generating and sending module, used to generate a monitoring probe statement based on the database information, and send the monitoring probe statement to the database node, so that the database node executes the monitoring probe statement to obtain the performance status monitoring data of the distributed database; as well as A performance status determination module is used to determine the performance status of the distributed database based on the performance status monitoring data returned by the database node.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the database operation and maintenance method as described in any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the database operation and maintenance method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the database operation and maintenance method according to any one of claims 1 to 6.