A database operation and maintenance method and device

By establishing monitoring channels and creating monitoring tasks in database and dimension, judging and triggering automatic operation and maintenance instructions, it solves the problem of unable to achieve automated operation and maintenance when the database administrator is not in.

CN113886194BActive Publication Date: 2025-01-24AOWANG INFORMATION TECH (XIAMEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111254912.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2025-01-24
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

In database operation and maintenance, the database administrator cannot realize automated operation and maintenance without being present, resulting in database downtime and other problems, affecting business operations.

Method used

By establishing a monitoring channel between the monitoring server and the monitored database client, a monitoring task is created, and the monitoring data is used to determine whether the automatic operation and maintenance triggering conditions are met. If so, the automatic operation and maintenance instructions are triggered and automatic operation and maintenance operations are performed.

Benefits of technology

Achieve automated operation and maintenance when the database administrator is absent, avoid database down, and improve system availability and work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886194B_ABST
    Figure CN113886194B_ABST
Patent Text Reader

Abstract

The present application discloses a database operation and maintenance method and device thereof, which are applied to a monitoring server, and perform the following processing for each monitored database client: establish a monitoring channel between the monitoring server and the monitored database client, create a monitoring task for the monitored database client, obtain monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel, and judge whether the acquired monitoring data meets the automatic operation and maintenance triggering condition; if the automatic operation and maintenance triggering condition is met, trigger the automatic operation and maintenance instruction, and send it to the monitored database client, so that the monitored database client performs the automatic operation and maintenance operation. By adopting this technical method, the system can realize automatic operation and maintenance in the absence of the database administrator, solve the problem of database downtime caused by failure to handle in time, avoid affecting some businesses, improve system availability and convenience, and improve work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a database operation and maintenance method and device thereof. Background Art

[0002] In database operation and maintenance work, the operation and maintenance of the database mainly relies on a third-party monitoring system or the database's own tools. For example, Oracle uses OEM (Oracle Enterprise Manager) for monitoring, and then sends alarm information to the DBA (Database Administrator) for processing when problems occur.

[0003] After the database alarm is completed, the DBA needs to intervene to clear the alarm. Generally, the core database of an enterprise needs to run 24 hours a day, but in some cases, the DBA has no way to respond in time, such as holidays, business trips or in the middle of the night, which will cause the database to be unable to respond in time. In the worst case, the client will be kept waiting for a long time, affecting some businesses. In the worst case, the system will crash and affect the use of all users. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a database operation and maintenance method and device thereof. By adopting this technical method, the system can realize automatic operation and maintenance in the absence of a database administrator, solve the problem of database downtime caused by failure to handle in time, avoid affecting some businesses, improve system availability and convenience, and improve work efficiency.

[0005] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In the first aspect, an embodiment of the present application proposes a database operation and maintenance method, which is applied to a monitoring server and performs the following processing for each monitored database client: establishing a monitoring channel between the monitoring server and the monitored database client; creating a monitoring task for the monitored database client; obtaining monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel; determining whether the obtained monitoring data meets the automatic operation and maintenance triggering condition; if the automatic operation and maintenance triggering condition is met, triggering the automatic operation and maintenance instruction and sending it to the monitored database client, so that the monitored database client performs the automatic operation and maintenance operation.

[0007] Optionally, the step of establishing a monitoring channel between the monitoring server and the monitored database client includes: receiving an enable remote command execution instruction from the monitored database client, wherein the enable remote command execution instruction is generated based on an operation on a remote command execution option on the monitored database client; and establishing a monitoring channel between the monitoring server and the monitored database client in response to the enable remote command execution instruction.

[0008] Optionally, the operation and maintenance method further includes: displaying a monitoring management interface, the monitoring management interface including a basic information configuration area for a monitored database client; receiving a basic information configuration operation performed on the monitored database client in the basic information configuration area to determine the monitored database client, the basic information configuration operation including setting a network address, a listening port and an account password for the monitored database client.

[0009] Optionally, the step of creating a monitoring task for a monitored database client includes: displaying a monitoring task creation area for the monitored database client, the monitoring task creation area including multiple preset monitoring templates, each preset monitoring template including at least one preset monitoring item and at least one preset alarm trigger, each preset monitoring item in the at least one preset monitoring item corresponds to one of the at least one preset alarm trigger; receiving a selection operation for one of the multiple preset monitoring templates, and forming a monitoring task for the monitored database client by at least one preset monitoring item and at least one preset alarm trigger in the selected preset monitoring template.

[0010] Optionally, the monitoring task creation area also includes custom configuration items for custom monitoring items, wherein the step of creating a monitoring task for a monitored database client also includes: receiving operations for the custom configuration items and displaying a custom monitoring item creation window; receiving input in the custom monitoring item creation window to form a custom monitoring script; generating a custom monitoring item corresponding to the custom monitoring script and displaying a configuration window for a custom alarm trigger; receiving input in the configuration window to generate a custom alarm trigger associated with the custom monitoring item; adding the associated custom monitoring item and custom alarm trigger together to the selected preset monitoring template, and adding the associated custom monitoring item and custom alarm trigger to the monitoring task.

[0011] Optionally, the monitoring data includes sub-monitoring data corresponding to each monitoring item configured for the monitored database client, and an alarm expression is set in each alarm trigger, wherein the step of determining whether the acquired monitoring data meets the automatic operation and maintenance trigger condition includes: for each monitoring item, performing the following processing: comparing the acquired sub-monitoring data with the alarm expression of the alarm trigger that matches the monitoring item; if the sub-monitoring data satisfies the alarm expression, it is determined that the automatic operation and maintenance trigger condition is met; if the sub-monitoring data does not satisfy the alarm expression, it is determined that the automatic operation and maintenance trigger condition is not met.

[0012] Optionally, if the automatic operation and maintenance triggering condition is met, the step of triggering the automatic operation and maintenance instruction includes: determining the target monitoring item that meets the automatic operation and maintenance triggering condition; triggering the automatic operation and maintenance instruction corresponding to the target monitoring item, the automatic operation and maintenance instruction carrying the target monitoring item identifier; after the monitored database client receives the automatic operation and maintenance instruction, the monitored database client searches for the automatic operation and maintenance script corresponding to the target monitoring item identifier from the shared folder, and executes the automatic operation and maintenance script to perform automatic operation and maintenance on the alarm of the target monitoring item.

[0013] Optionally, the shared folder stores monitoring item identifiers of multiple monitoring items and corresponding automatic operation and maintenance scripts, wherein an automatic operation and maintenance script for each monitoring item is created in the following manner: displaying a monitoring management interface, the monitoring management interface including an automatic operation and maintenance script creation option; receiving a selection for the automatic operation and maintenance script creation option, and displaying a script creation window for creating an automatic operation and maintenance script; receiving an editing operation in the script creation window, and creating an operation and maintenance script corresponding to the monitoring item; and saving the created automatic operation and maintenance script and the monitoring item identifier of the monitoring item to a shared folder.

[0014] Optionally, if the automatic operation and maintenance triggering conditions are met, the step of triggering the automatic operation and maintenance instruction includes: if the automatic operation and maintenance triggering conditions are met, an alarm notification message is generated, and the alarm notification message is sent to the operation and maintenance client; whether the operation and maintenance client responds to the alarm notification message; if the operation and maintenance client does not respond to the alarm notification message, and the non-response duration reaches a preset time threshold, the automatic operation and maintenance instruction is triggered.

[0015] On the second aspect, the embodiment of the present application also proposes a database operation and maintenance device, which is applied to a monitoring server. For each monitored database client, the device includes: a channel establishment module, which is used to establish a monitoring channel between the monitoring server and the monitored database client; a task creation module, which is used to create a monitoring task for the monitored database client; an acquisition module, which is used to acquire monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel; a judgment module, which is used to judge whether the acquired monitoring data meets the automatic operation and maintenance triggering conditions; a processing module, which is used to trigger the automatic operation and maintenance instructions if the automatic operation and maintenance triggering conditions are met, and send them to the monitored database client, so that the monitored database client performs automatic operation and maintenance operations.

[0016] The present application discloses a database operation and maintenance method and device thereof, which are applied to a monitoring server and perform the following processing for each monitored database client: establish a monitoring channel between the monitoring server and the monitored database client, create a monitoring task for the monitored database client, obtain monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel, judge whether the obtained monitoring data meets the automatic operation and maintenance triggering condition, and if the automatic operation and maintenance triggering condition is met, trigger the automatic operation and maintenance instruction and send it to the monitored database client, so that the monitored database client performs the automatic operation and maintenance operation.

[0017] This application has the following technical effects:

[0018] First, the technical method described in this application enables the system to achieve automated operation and maintenance in the absence of a database administrator, thereby solving problems such as database downtime caused by failure to handle issues in a timely manner, avoiding impact on some businesses, improving system availability and convenience, and improving work efficiency.

[0019] Second, this application ensures that subsequent database administrators have a basis for reviewing problems by adding a method for obtaining a snapshot of the database operation data of the monitored database client in the automatic operation and maintenance script.

[0020] Third, the use of shared folders to achieve unified maintenance and storage of automatic operation and maintenance scripts improves the management efficiency of scripts.

[0021] Fourth, by summarizing the database automatic operation and maintenance scripts under various automatic operation and maintenance scenarios, the data automatic operation and maintenance requirements in various scenarios are realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 The process of the operation and maintenance method provided in the embodiment of the present application is shown Figure 1 .

[0024] Figure 2 A flowchart showing the steps of a method for establishing a monitoring channel provided in an embodiment of the present application.

[0025] Figure 3 The process of creating a monitoring task to determine the disinfecting order provided by the embodiment of the present application is shown. Figure 1 .

[0026] Figure 4 The process of creating a monitoring task for a target disinfecting robot provided by an embodiment of the present application is shown. Figure 2 .

[0027] Figure 5 The process of the operation and maintenance method provided in the embodiment of the present application is shown Figure 2 .

[0028] Figure 6 A schematic diagram of the structure of the operation and maintenance device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0030] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present disclosure, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0031] In order to improve the control convenience of the disinfection robot, this application proposes a control system for the disinfection robot, see Figure 1 , Figure 1 The process of the operation and maintenance method provided in the embodiment of the present application is shown Figure 1 ,Specifically, this method is applied to monitoring servers, such as Figure 1 As shown, the operation and maintenance method includes:

[0032] S100: Establish a monitoring channel between the monitoring server and the monitored database client.

[0033] In a preferred embodiment, the monitoring server may be a zabbix server. As a monitor that performs monitoring tasks, the monitoring server needs to interact with the monitored database client for data. A monitoring channel that can perform remote monitoring is established between the monitoring server and the monitored database client so that the monitoring server can obtain required data through the channel. Specifically, a monitoring service plug-in is pre-installed on the monitoring server for performing monitoring tasks. The monitoring service plug-in provides a monitoring management interface, through which data monitoring of the monitored database client can be completed. Specifically, the monitoring service plug-in may be a zabbix agent.

[0034] A basic information configuration operation performed on at least one monitored database client in a basic information configuration area is received to determine at least one monitored database client.

[0035] Here, the monitoring management interface includes a basic information configuration area for the monitored database client. The user can configure the basic information of the monitored database client in the basic information configuration area of ​​the monitored database client to create a monitored database client. The basic information configuration area of ​​the monitored database client includes configuration items such as the host name, network address, listening port, account password, etc. of the monitored database client. The basic information configuration operation includes configuration operations on configuration items such as the network address, listening port, account password, etc. of the monitored database client. After completing the configuration operations on these basic information, the monitored database client can be determined, and the user can continue to add monitored database clients in the basic information configuration area of ​​the monitored database client.

[0036] See also Figure 2 , Figure 2 A flowchart showing the steps of the method for establishing a monitoring channel provided in an embodiment of the present application is shown, which specifically includes the following steps:

[0037] S110: Receive an instruction to enable remote command execution from a monitored database client.

[0038] An agent monitoring plug-in responsible for executing the agent monitoring task is pre-installed on the monitored database client. Specifically, the agent monitoring plug-in can be zabbix agent. The function of the plug-in is to regularly collect various data of the monitored database client and send the data to the monitoring server for display.

[0039] The specific process for the monitored database client to receive the remote command execution enablement instruction is as follows: the monitored database client displays the proxy monitoring plug-in installation interface, receives the proxy monitoring plug-in installation package acquisition operation on the proxy monitoring plug-in installation interface, and can obtain the proxy monitoring plug-in installation package from the official website for installation. During the proxy monitoring plug-in installation process, the host name of the monitored database client and the network address of the monitoring server that performs the monitoring task are configured in the configuration file of the proxy monitoring plug-in, and the remote command execution instruction enablement operation for the monitoring server is obtained at the same time, so that the monitored database client can obtain the remote command of the monitoring server. After the monitored database client obtains the remote command of the monitoring server, it generates the remote command execution enablement instruction and sends the remote command execution enablement instruction to the monitoring server that performs the monitoring task, so that the monitoring server that performs the monitoring task receives the remote command execution enablement instruction.

[0040] S120: In response to the remote command execution enabling instruction, a monitoring channel is established between the monitoring server and the monitored database client.

[0041] In a preferred embodiment, after the proxy monitoring plug-in of the monitored database client enables the remote command execution instruction of the corresponding monitoring server, the monitoring server receives the monitoring status enablement instruction executed by the user in the monitoring management interface, and confirms that the monitored database client enables the remote command execution instruction, thereby establishing a monitoring channel between the monitoring server and the monitored database client.

[0042] return Figure 1 , S200, creating a monitoring task for the monitored database client.

[0043] In a preferred embodiment, after the monitoring channel is established, if you want to obtain the monitoring data of the monitored database client through the channel, you also need to configure a specific monitoring task for the monitored database client to complete the monitoring of the monitored database client. For details, see Figure 3 , Figure 3 The process of creating a monitoring task provided by the embodiment of the present application is shown Figure 1 , specifically including the following steps:

[0044] S210: Display a monitoring task creation area for the monitored database client.

[0045] In a preferred embodiment, the monitoring management interface also includes a monitoring task creation area, the monitoring task creation area includes multiple preset monitoring templates, each preset monitoring template includes at least one preset monitoring item and at least one preset alarm trigger, and each preset monitoring item in the at least one preset monitoring item corresponds to one of the at least one preset alarm trigger.

[0046] Here, the preset monitoring template is a monitoring template pre-set according to different monitored database clients, the preset monitoring item is a pre-set monitoring instruction, and the preset alarm trigger is an alarm expression corresponding to the preset monitoring item, wherein each preset monitoring item corresponds to a specific alarm expression.

[0047] Specifically, if the preset monitoring item can be the lock waiting time of the monitoring database, then the alarm expression of the preset alarm trigger corresponding to the preset monitoring item is that an alarm will be generated if the lock waiting time exceeds 10 minutes. Different preset monitoring items will also correspond to different alarm expressions according to their different monitoring instructions.

[0048] S220: Receive a selection of one of a plurality of preset monitoring templates, and form a monitoring task of a monitored database client by at least one preset monitoring item and at least one preset alarm trigger in the selected preset monitoring template.

[0049] Here, if there is a preset monitoring template among the pre-set multiple preset monitoring templates that can meet the monitoring needs of the monitored database client, the selection operation for the corresponding preset monitoring template can be directly received, and the monitoring task corresponding to the monitored database client can be generated according to at least one preset monitoring item and at least one preset alarm trigger in the preset monitoring template. It should be noted that before determining that the preset monitoring template generates the monitoring task corresponding to the monitored database client, it is necessary to determine whether the alarm expression of the preset alarm trigger corresponding to each preset monitoring item in the preset monitoring template needs to be modified. If it is determined that modification is required according to actual needs, the monitoring task corresponding to the monitored database client is generated after modification according to the alarm expression of the actual needs.

[0050] See also Figure 4 , Figure 4 The process of creating a monitoring task provided by the embodiment of the present application is shown Figure 2 ,like Figure 4 As shown, you can also create a monitoring task for the monitored database client by following the steps below:

[0051] S230: Receive an operation on the custom configuration item and display a custom monitoring item creation window.

[0052] If the monitored database client has already determined the preset monitoring template, but wants to add new monitoring items to the template according to actual needs, you need to customize a monitoring item and add the customized monitoring item to the selected template.

[0053] In a preferred embodiment, the monitoring task creation area also includes custom configuration items for custom monitoring items. When the preset monitoring template lacks monitoring items requiring data, it is necessary to add corresponding monitoring items through custom configuration items of custom monitoring items. Specifically, a selection operation on the custom configuration items of the custom monitoring items is received, and a custom monitoring item creation window is displayed. The custom creation window is used to create custom monitoring items.

[0054] S240, receiving input in the custom monitoring item creation window to form a custom monitoring script.

[0055] In an optional example, the custom monitoring item creation window includes a custom monitoring item name configuration area, a monitoring script configuration area, and a preset monitoring template link area. According to the monitoring requirements, the corresponding custom monitoring script can be written in the monitoring script configuration area. The monitoring script can use SQL (Structured Query Language) instructions. After writing the custom monitoring script, name the custom monitoring script in the custom monitoring item name configuration area, and select and confirm the added preset monitoring template for the custom monitoring item in the preset monitoring template link area.

[0056] S250: Generate a custom monitoring item corresponding to the custom monitoring script, and display a configuration window for the custom alarm trigger.

[0057] In a preferred embodiment, after selecting the preset monitoring template, the created custom monitoring item can be added to the linked preset monitoring template. After creating the custom monitoring item, it is also necessary to create a corresponding custom alarm trigger for the custom monitoring item. The monitoring task creation area also includes custom configuration items for the custom alarm trigger, receives a selection operation on the custom configuration item of the custom alarm trigger, and displays the configuration window of the custom alarm trigger.

[0058] The configuration window of the custom alarm trigger includes the name configuration area of ​​the custom alarm trigger, the alarm expression writing area, the alarm level selection area and the custom monitoring item link area. It receives the input of the name configuration area of ​​the custom alarm trigger in the name configuration area of ​​the custom alarm trigger, and determines the name of the custom alarm trigger, which is a description of the alarm instruction, such as exceeding the number of user logins.

[0059] An operation of writing an alarm expression of a custom alarm trigger in an alarm expression writing area is received, and an alarm expression of the custom alarm trigger is determined.

[0060] Receive the selection operation of the custom monitoring item in the custom monitoring item link area, determine the custom monitoring item associated with the custom alarm trigger, and after the configuration is completed, you can associate the custom alarm trigger with the previously created custom monitoring item.

[0061] S260: Add the associated custom monitoring items and custom alarm triggers to the selected preset monitoring template, and add the associated custom monitoring items and custom alarm triggers to the monitoring task.

[0062] In a preferred embodiment, after the custom monitoring items and custom alarm triggers are created, the custom monitoring items and custom alarm triggers can be associated with the preset monitoring template selected by the monitored database client according to the corresponding link relationship, thereby adding the custom monitoring items and custom alarm triggers created as needed to the corresponding preset monitoring template.

[0063] In another preferred embodiment, the monitoring task creation area also includes a custom template creation area. If the preset monitoring items in the preset monitoring template do not meet the monitoring requirements of the monitored database client, a custom template creation instruction executed in the custom template creation area is received to create a new custom template. The custom template creation area includes a custom template name configuration area and a template link monitoring server configuration area. The custom template name configuration area is the custom template configuration name, and the custom template is connected to the monitoring server currently executing the monitoring task in the template link monitoring server configuration area. After the configuration is completed, a custom template can be created, and the custom template does not contain any monitoring items and triggers. Specifically, according to the corresponding monitoring requirements, a custom template can be created in the monitoring task creation area for the monitored database client.

[0064] Select the created custom template, and then generate the corresponding monitoring task according to steps S230 to S260.

[0065] return Figure 1 , S300, obtaining monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel.

[0066] In a preferred embodiment, after the monitoring channel and monitoring task are created, the corresponding monitoring data can be obtained from the monitoring channel according to the monitoring task corresponding to the monitored database client, so as to monitor the operating status of the monitored database client, and the obtained monitoring data can be saved to the database for convenient archiving and viewing at any time.

[0067] S400: Determine whether the acquired monitoring data meets the automatic operation and maintenance triggering condition.

[0068] In a preferred embodiment, the monitoring data includes sub-monitoring data corresponding to each monitoring item in the monitoring template configured for the monitored database client, and an alarm expression is set in each alarm trigger. For example, the monitoring data includes the table space of the database, the memory of the database monitoring server, and the database lock waiting time, etc. Each sub-monitoring data corresponds to a monitoring item, and an alarm expression for the sub-monitoring data is set in the alarm trigger corresponding to each monitoring item, see Figure 5 , Figure 5 The process of the operation and maintenance method provided in the embodiment of the present application is shown Figure 2 ,like Figure 5 As shown, for each monitoring item, the steps of determining whether the acquired monitoring data meets the automatic operation and maintenance triggering conditions include:

[0069] S410: Determine whether the sub-monitoring data satisfies the alarm expression of the corresponding alarm trigger.

[0070] The acquired sub-monitoring data corresponding to each monitoring item is compared with the alarm expression of the alarm trigger corresponding to the monitoring item. If the sub-monitoring data satisfies the alarm expression, it is determined that the automatic operation and maintenance trigger condition is met.

[0071] If the sub-monitoring data does not satisfy the alarm expression, it is determined that the automatic operation and maintenance conditions are not met, and the monitored data client continues to be monitored.

[0072] In a specific embodiment, when the sub-monitoring data corresponding to the acquired monitoring item is the lock waiting time of the database, the sub-monitoring data is compared with the alarm expression of the alarm trigger corresponding to the monitoring item. For example, when the alarm expression is greater than 10 minutes, if the lock waiting time exceeds 10 minutes, it is determined that the automatic operation and maintenance trigger condition is met; if the lock waiting time does not exceed 10 minutes, it is determined that the automatic operation and maintenance trigger condition is not met, and the monitored data client continues to be monitored.

[0073] return Figure 1 , S500, if the automatic operation and maintenance triggering condition is met, the automatic operation and maintenance instruction is triggered and sent to the monitored database client, so that the monitored database client performs the automatic operation and maintenance operation.

[0074] In a preferred embodiment, if Figure 4 As shown, if the automatic operation and maintenance triggering condition is met, the steps of triggering the automatic operation and maintenance instruction include:

[0075] S510: Determine the target monitoring items that meet the automatic operation and maintenance trigger conditions

[0076] In a preferred embodiment, when a monitoring item in a monitoring task is a table space of a monitoring database, and the table space data of the database of the monitored database client corresponding to the monitoring item obtained satisfies the alarm expression, that is, the table space occupancy is greater than 90%, that is, the automatic operation and maintenance trigger condition is met, then the monitoring item is determined to be a target monitoring item that meets the automatic operation and maintenance trigger condition.

[0077] S520. Trigger the automatic operation and maintenance instruction corresponding to the target monitoring item.

[0078] Here, the automatic operation and maintenance instruction carries the target monitoring item identifier, that is, each monitoring item is pre-set with a corresponding automatic operation and maintenance instruction, and the automatic operation and maintenance instruction indicates the target monitoring item identifier. When the target monitoring item that meets the automatic operation and maintenance triggering condition is determined, the automatic operation and maintenance instruction corresponding to the target monitoring item is triggered.

[0079] S530: The monitored database client receives the corresponding automatic operation and maintenance instruction and performs automatic operation and maintenance.

[0080] After receiving the automatic operation and maintenance instruction, the monitored database client searches for the automatic operation and maintenance script corresponding to the target monitoring item identifier from the shared folder, and executes the automatic operation and maintenance script to automatically operate and maintain the alarm of the target monitoring item.

[0081] In an optional embodiment, after the monitoring server triggers the automatic operation and maintenance instruction, it sends the corresponding automatic operation and maintenance instruction to the monitored database client. After the monitored database client receives the automatic operation and maintenance instruction, it first saves a snapshot of the database operation data of the current monitored database client to the monitoring server database, so that subsequent users can have a basis for reviewing the problem.

[0082] The monitored database client finds the automatic operation and maintenance script corresponding to the target monitoring item identifier from the shared folder according to the target monitoring item identifier carried in the automatic operation and maintenance instruction, wherein the shared folder stores monitoring item identifiers of multiple monitoring items and corresponding pre-set automatic operation and maintenance scripts, each automatic operation and maintenance script carries the monitoring identifier corresponding to each monitoring item, and finds the target automatic operation and maintenance script corresponding to the target monitoring item identifier from the multiple automatic operation and maintenance scripts, thereby running the target automatic operation and maintenance script to complete the automatic operation and maintenance of the target monitoring item.

[0083] In a specific embodiment, an automatic operation and maintenance script is created for each monitoring item in the following manner:

[0084] A monitoring management interface is displayed. Specifically, the monitoring management interface also includes an automatic operation and maintenance script creation option, a selection for the automatic operation and maintenance script creation option is received, a script creation window for creating an automatic operation and maintenance script is displayed, the script creation window includes an automatic operation and maintenance script original name creation area, a script writing area, and a monitoring item identification selection area, the editing operation in the script creation window is received, an operation and maintenance script corresponding to any monitoring item is created, a name is added to the newly created script in the automatic operation and maintenance script original name creation area, the automatic operation and maintenance script corresponding to the monitoring item is written in the automatic operation and maintenance script writing area, the corresponding automatic operation and maintenance script is generated, the corresponding monitoring item identification is selected in the monitoring item identification selection area, the written automatic operation and maintenance script is connected to the corresponding monitoring item, the created automatic operation and maintenance script and the monitoring identification of any monitoring item are saved in a shared folder, and unified automatic operation and maintenance script maintenance and storage are achieved through the shared folder, thereby improving the script management efficiency.

[0085] like Figure 5 As shown, if the automatic operation and maintenance triggering condition is met, the step of triggering the automatic operation and maintenance instruction also includes:

[0086] S540: If the sub-monitoring data satisfies the alarm expression, an alarm notification message is generated and sent to the operation and maintenance client.

[0087] In a preferred embodiment, when there is a target monitoring item that meets the automatic operation and maintenance triggering conditions, an alarm notification message for the target monitoring item can also be generated and sent to the operation and maintenance client to facilitate the database administrator to process the target monitoring item.

[0088] S550: Detect whether the operation and maintenance client responds to the alarm notification message.

[0089] In a preferred embodiment, the monitoring server includes a pre-set time threshold. When sending an alarm notification message to the operation and maintenance client, it detects whether the operation and maintenance client has performed operation and maintenance processing on the target monitoring item within the time range of the preset time threshold.

[0090] If the operation and maintenance client does not respond to the alarm notification message, and the duration of the non-response reaches a preset time threshold, an automatic operation and maintenance instruction is triggered, and the process returns to step S520.

[0091] In a preferred embodiment, if within the time range of the preset time threshold, the sub-monitoring data corresponding to the target monitoring item monitored by the monitoring server still satisfies the alarm expression of the corresponding alarm trigger, it is determined that the operation and maintenance client has not performed operation and maintenance processing on the target monitoring item within the time range of the preset time threshold. At this time, the automatic operation and maintenance instruction is triggered and returns to S520 for processing.

[0092] This application can realize the data automatic operation and maintenance requirements in various scenarios by summarizing and triggering the database automatic operation and maintenance scripts in various automatic operation and maintenance scenarios.

[0093] S560: If the detection operation and maintenance client responds to the alarm notification message, cancel the alarm.

[0094] In a preferred embodiment, if the sub-monitoring data corresponding to the target monitoring item monitored by the monitoring server does not satisfy the corresponding alarm expression within the time range of the preset time threshold, it is determined that the corresponding sub-monitoring data has returned to normal at this time, that is, the operation and maintenance client has performed operation and maintenance processing on the target monitoring item within the time range of the preset time threshold and canceled the alarm.

[0095] Through the above-mentioned technical methods, this application enables the system to achieve automated operation and maintenance in the absence of a database administrator, solve the problem of database downtime caused by failure to handle in a timely manner, avoid affecting some businesses, improve system availability and convenience, and improve work efficiency.

[0096] The present application also provides a device for automatic database operation and maintenance, see Figure 6 , Figure 6 The schematic diagram of the structure of the operation and maintenance device provided in the embodiment of the present application is shown, and the device includes:

[0097] The channel establishing module 610 is used to establish a monitoring channel between the monitoring server and the monitored database client.

[0098] The task creation module 620 is used to create a monitoring task for the monitored database client.

[0099] The acquisition module 630 is used to acquire the monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel.

[0100] The judgment module 640 is used to judge whether the acquired monitoring data meets the automatic operation and maintenance triggering condition.

[0101] The processing module 650 is used to trigger the automatic operation and maintenance instruction if the automatic operation and maintenance triggering condition is met, and send it to the monitored database client, so that the monitored database client performs the automatic operation and maintenance operation.

[0102] It should be noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0103] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A database operation and maintenance method, characterized in that: Applied to the monitoring server, the following processing is performed for each monitored database client: Establish a monitoring channel between the monitoring server and the monitored database client; Create monitoring tasks for the monitored database clients; Acquire monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel; Determine whether the acquired monitoring data meets the automatic operation and maintenance triggering conditions; If the automatic operation and maintenance triggering condition is met, the automatic operation and maintenance instruction is triggered and sent to the monitored database client, so that the monitored database client performs the automatic operation and maintenance operation; The shared folder stores the monitoring item identifiers of multiple monitoring items and the corresponding automatic operation and maintenance scripts. The automatic operation and maintenance script for each monitoring item is created in the following way: Displaying a monitoring management interface, wherein the monitoring management interface includes an automatic operation and maintenance script creation option; receiving a selection for the automatic operation and maintenance script creation option, and displaying a script creation window for creating an automatic operation and maintenance script; Receive the editing operation in the script creation window and create an operation and maintenance script corresponding to any monitoring item; Save the created automatic operation and maintenance script and the monitoring identifier of any monitoring item to a shared folder; During the operation and maintenance process, the monitored database client finds the automatic operation and maintenance script corresponding to the target monitoring item identifier from the shared folder according to the target monitoring item identifier carried in the automatic operation and maintenance instruction, and runs the target automatic operation and maintenance script to complete the automatic operation and maintenance of the target monitoring item. The target monitoring item is the monitoring item that meets the automatic operation and maintenance trigger condition; After the monitoring server triggers the automatic operation and maintenance instruction, it sends the corresponding automatic operation and maintenance instruction to the monitored database client. After receiving the automatic operation and maintenance instruction, the monitored database client saves a snapshot of the database operation data of the current monitored database client to the monitoring server database.

2. The operation and maintenance method according to claim 1, characterized in that: The steps of establishing a monitoring channel between the monitoring server and the monitored database client include: Receiving a remote command execution enabling instruction from a monitored database client, wherein the remote command execution enabling instruction is generated according to an operation on a remote command execution option on the monitored database client; In response to the remote command execution enabling instruction, a monitoring channel is established between the monitoring server and the monitored database client.

3. The operation and maintenance method according to claim 1, characterized in that: Also includes: Displaying a monitoring management interface, the monitoring management interface including a basic information configuration area for a monitored database client; A basic information configuration operation performed on a monitored database client in the basic information configuration area is received to determine the monitored database client, wherein the basic information configuration operation includes setting a host name, a network address, a listening port, and an account password of the monitored database client.

4. The operation and maintenance method according to claim 1, characterized in that: The steps to create a monitoring task for the monitored database client include: Displaying a monitoring task creation area for a monitored database client, the monitoring task creation area including a plurality of preset monitoring templates, each preset monitoring template including at least one preset monitoring item and at least one preset alarm trigger, each preset monitoring item in the at least one preset monitoring item corresponds to one of the at least one preset alarm trigger; A selection of one of the plurality of preset monitoring templates is received, and a monitoring task of a monitored database client is formed by at least one preset monitoring item and at least one preset alarm trigger in the selected preset monitoring template.

5. The operation and maintenance method according to claim 4, characterized in that: The monitoring task creation area also includes custom configuration items for custom monitoring items. The step of creating a monitoring task for the monitored database client also includes: Receive an operation for the custom configuration item and display a custom monitoring item creation window; Receiving input in the custom monitoring item creation window to form a custom monitoring script; Generate a custom monitoring item corresponding to the custom monitoring script, and display a configuration window for a custom alarm trigger; The associated custom monitoring items and custom alarm triggers are added to the selected preset monitoring template, and the associated custom monitoring items and custom alarm triggers are added to the monitoring task.

6. The operation and maintenance method according to claim 4, characterized in that: The monitoring data includes sub-monitoring data corresponding to each monitoring item configured for the monitored database client, and an alarm expression is set in each alarm trigger. The step of determining whether the acquired monitoring data meets the automatic operation and maintenance triggering condition includes: For each monitoring item, perform the following processing: The acquired sub-monitoring data is compared with the alarm expression of the alarm trigger that matches the monitoring item. If the sub-monitoring data satisfies the alarm expression, it is determined that the automatic operation and maintenance trigger condition is met. If the sub-monitoring data does not satisfy the alarm expression, it is determined that the automatic operation and maintenance triggering condition is not satisfied.

7. The operation and maintenance method according to claim 6, characterized in that: If the automatic operation and maintenance triggering conditions are met, the steps for triggering the automatic operation and maintenance instructions include: Determine the target monitoring items that meet the automatic operation and maintenance trigger conditions; Trigger the automatic operation and maintenance instructions corresponding to the target monitoring items; After receiving the automatic operation and maintenance instruction, the monitored database client searches for the automatic operation and maintenance script corresponding to the target monitoring item identifier from the shared folder, and executes the operation and maintenance script to automatically operate and maintain the alarm of the target monitoring item.

8. The operation and maintenance method according to claim 1, characterized in that: If the automatic operation and maintenance triggering conditions are met, the steps for triggering the automatic operation and maintenance instructions include: If the automatic operation and maintenance triggering condition is met, an alarm notification message is generated and sent to the operation and maintenance client; Detecting whether the operation and maintenance client responds to the alarm notification message; If the operation and maintenance client does not respond to the alarm notification message, and the duration of the non-response reaches a preset time threshold, an automatic operation and maintenance instruction is triggered.

9. A device for automatic operation and maintenance of a database, characterized in that: Applied to the monitoring server, for each monitored database client, the device includes: A channel establishment module is used to establish a monitoring channel between the monitoring server and the monitored database client; A task creation module is used to create monitoring tasks for monitored database clients; An acquisition module, used to acquire monitoring data corresponding to the monitoring task of the monitored database client through the established monitoring channel; A judgment module is used to judge whether the acquired monitoring data meets the automatic operation and maintenance triggering conditions; A processing module, for triggering an automatic operation and maintenance instruction if the automatic operation and maintenance triggering condition is met, and sending the instruction to the monitored database client so that the monitored database client performs the automatic operation and maintenance operation; The shared folder stores the monitoring item identifiers of multiple monitoring items and the corresponding automatic operation and maintenance scripts. The task creation module is also used to: Displaying a monitoring management interface, wherein the monitoring management interface includes an automatic operation and maintenance script creation option; receiving a selection for the automatic operation and maintenance script creation option, and displaying a script creation window for creating an automatic operation and maintenance script; Receive the editing operation in the script creation window and create an operation and maintenance script corresponding to any monitoring item; Save the created automatic operation and maintenance script and the monitoring identifier of any monitoring item to a shared folder; The processing module is also used for: after the monitoring server triggers the automatic operation and maintenance instruction, the corresponding automatic operation and maintenance instruction is sent to the monitored database client, so that the monitored database client finds the automatic operation and maintenance script corresponding to the target monitoring item identifier from the shared folder according to the target monitoring item identifier carried in the automatic operation and maintenance instruction and runs it to complete the automatic operation and maintenance of the target monitoring item, and the target monitoring item is the monitoring item that meets the automatic operation and maintenance triggering condition; The processing module is also used for: after the monitoring server triggers the automatic operation and maintenance instruction, sending the corresponding automatic operation and maintenance instruction to the monitored database client, so that after the monitored database client receives the automatic operation and maintenance instruction, it saves a snapshot of the database operation data of the current monitored database client to the monitoring server data.

Citation Information

Patent Citations

  • Server test method, server test device and server test system

    CN106775968A

  • Data acquisition method and device

    CN107896175A

  • Method and system for realizing Hadoop cluster monitoring

    CN108255661A