CN115834172A - Database risk warning method, device, equipment and storage medium - Google Patents

Database risk warning method, device, equipment and storage medium Download PDF

Info

Publication number
CN115834172A
CN115834172A CN202211425800.9A CN202211425800A CN115834172A CN 115834172 A CN115834172 A CN 115834172A CN 202211425800 A CN202211425800 A CN 202211425800A CN 115834172 A CN115834172 A CN 115834172A
Authority
CN
China
Prior art keywords
verification
database
risk
module
result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211425800.9A
Other languages
Chinese (zh)
Inventor
雷丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN202211425800.9A priority Critical patent/CN115834172A/en
Publication of CN115834172A publication Critical patent/CN115834172A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The application relates to the technical field of computers, digital medical treatment and finance, and provides a database risk warning method, a database risk warning device, database risk warning equipment and a database risk warning storage medium, wherein the method comprises the following steps: the method comprises the steps of creating and pushing a verification configuration page, responding to an input result of the verification configuration page, obtaining a polling instruction of each verification item included by each module of a database, monitoring time, verifying each verification item according to the polling instruction when the time falls into polling time of each verification item to obtain a verification result, counting abnormal conditions corresponding to the verification result, determining risk levels of each module, and pushing corresponding alarm prompts according to the risk levels of each module. According to the method, through user-defined configuration, verification is performed in different periods according to the influence degree of the verification item on the database, potential risks can be found in time, corresponding warning reminding is pushed according to different risk levels of the modules, and a manager can conveniently perform troubleshooting on the high-risk modules.

Description

Database risk warning method, device, equipment and storage medium
Technical Field
The application relates to the technical field of computers, finance and digital medical treatment, in particular to a database risk warning method, device, equipment and storage medium.
Background
The database is a warehouse for organizing, storing and managing data according to a data structure, and the regular verification of the database is an important link of daily maintenance of the database. By checking various operation indexes of the database, the operation risk of the system is evaluated, and the quality of database service can be effectively improved.
In the conventional database verification method, a background regularly runs a verification script, and contents and results of verification are pushed to a database administrator in a mail mode. However, the traditional database verification method runs at regular time, and the indexes cannot be verified at different periods according to the influence degree of the indexes on the database, so that the potential risks of the database cannot be effectively predicted or the obtained potential risks are lagged; the traditional database verification method only pushes verified contents and results through mails, and the database risk cannot be directly exposed. With the rapid growth of services and the continuous expansion of service planes, the number of instances of MySQL is rapidly increased, and the traditional database verification method cannot meet the requirements.
Therefore, there is a lack in the prior art of a method that can rank alarm database risks.
Disclosure of Invention
In order to solve the above problems, embodiments of the present application provide a database risk warning method, apparatus, device, and storage medium, which can execute a check task on each index at different periods according to the importance degree of the index on the database, and push a warning in different manners according to the influence degree of the risk, so as to facilitate a database administrator to handle the risk in time, and prevent the database from providing an abnormal service to the outside.
The embodiment of the application adopts the following technical scheme:
in a first aspect, a database risk warning method is provided, where the method includes:
establishing and pushing a verification configuration page, and responding to an input result of the verification configuration page to obtain a routing inspection instruction of each verification item included by each module of the database;
monitoring time, and verifying each check item according to the inspection instruction when the time falls into the inspection time of each check item to obtain a verification result;
counting abnormal conditions corresponding to the verification result, and determining the risk level of each module;
and pushing corresponding alarm prompts according to the risk level of each module.
In a second aspect, a database risk warning device is provided, the device including:
the configuration unit is used for creating and pushing a verification configuration page, responding to an input result of the verification configuration page, and acquiring a routing inspection instruction of each verification item included by each module of the database;
the verification unit is used for monitoring time, and verifying each verification item according to the inspection instruction when the time falls into the inspection time of each verification item to obtain a verification result;
the risk determining unit is used for counting the abnormal conditions corresponding to the verification results and determining the risk level of each module;
and the alarm unit is used for pushing corresponding alarm prompts according to the risk levels of the modules.
In a third aspect, a computer device is provided, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the database risk warning method when executing the computer program.
In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program that, when being instructed by a processor, implements the steps of the database risk alert method described above.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects:
according to the database risk warning method, a verification configuration page is created and pushed, and a routing inspection instruction of each verification item included by each module of the database is obtained in response to an input result of the verification configuration page; monitoring time, and verifying each check item according to the inspection instruction when the time falls into the inspection time of each check item to obtain a verification result; counting abnormal conditions corresponding to the verification result, and determining the risk level of each module; and pushing corresponding alarm prompts according to the risk level of each module. According to the database risk warning method, various indexes of the database are patrolled in a user-defined configuration mode of database management personnel; the database manager can configure corresponding inspection time and/or inspection frequency according to the importance degree of the check item to the database; and the verification is executed in different periods according to the influence degree of the verification item on the database, so that the potential risk of the database can be found in time, and the processing pressure of the verification process is reduced. According to the database risk warning method, the check result is analyzed to determine the risk level of each module, corresponding warning reminding is pushed according to different risk levels, a database manager can conveniently carry out fault elimination according to the high-risk module, and the database can be effectively prevented from being abnormal in external service.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram illustrating an application environment of a database risk alert method according to an embodiment of the present application;
FIG. 2 illustrates a flow diagram of a database risk alert method according to one embodiment of the present application;
FIG. 3 is a diagram illustrating an effect of a verification configuration page of a database risk warning method according to an embodiment of the present application;
FIG. 4 illustrates a flow diagram of a database risk alert method according to another embodiment of the present application;
FIG. 5 shows a schematic structural diagram of a database risk alert device according to an embodiment of the present application;
FIG. 6 shows a schematic structural diagram of a computer device according to an embodiment of the present application;
fig. 7 shows a schematic structural diagram of a computer device according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The database risk warning method provided by the embodiment of the application can be applied to the environment shown in fig. 1, wherein the client and the server communicate with each other through a network.
The client may be, but is not limited to, a device having a display screen and an input device, such as a personal computer, a notebook computer, a smart phone, a tablet computer, and a portable wearable device. Because the verification method in the prior art can only perform verification through the background script at a fixed time, the client aims to display the verification configuration page created and pushed by the server, so that database management personnel can enter corresponding verification requirements through the client in a self-defined manner. Because the verification content and the verification result in the prior art are pushed only in the form of mails and the like and are inconvenient to check, the client side and the alarm prompt page which is created and pushed by the server side can be displayed so as to visually display the risk level of each module for database management personnel.
The server can be implemented by an independent server or a service platform consisting of a plurality of servers. The server side firstly creates a verification configuration page and pushes the verification configuration page to the client side for displaying; the server side carries out input result input on a verification configuration page of the client side through database management personnel, and acquires a routing inspection instruction of each verification item included by each module of the database; and monitoring time by the server, and when the current time falls into the inspection time of each check item, the server inspects each check item according to the inspection instruction so as to obtain a check result. And the server side counts the abnormal conditions corresponding to the verification result, and after the risk level of each module is determined, corresponding alarm prompts are pushed to the client side according to the risk level of each module.
The present application is described in detail below with specific examples.
Fig. 2 is a flowchart illustrating a database risk warning method according to an embodiment of the present application. As shown in fig. 2, the method includes steps S210 to S240:
and step S210, creating and pushing a verification configuration page, and responding to the input result of the verification configuration page to obtain routing inspection instructions of all verification items included by all modules of the database.
The database is a warehouse for organizing, storing and managing data according to a data structure, and is an important link for daily maintenance of the database when the database is checked regularly. By checking various operation indexes of the database, the operation risk of the system is evaluated, and corresponding coping processing is carried out, so that the quality of database service can be effectively improved. However, in the prior art, the database verification can only be performed through the background script at a fixed time, and the periodic execution of the verification indexes is not graded, so that the verification indexes with different importance degrees of the database are all verified at the same period. In contrast, according to the method and the system, the verification configuration page is created and pushed to the client through the server, so that a database manager can input corresponding verification requirements on the verification configuration page displayed by the client.
The verification configuration page created by the server side can comprise a module name control, a verification item control, a patrol time control and the like, and can also comprise an auxiliary information entry control such as a verification level control and a remark message control. The patrol time control can also be configured by the first start time sub-control and the execution frequency sub-control. The database can comprise a plurality of modules, each module can comprise a plurality of check items, and therefore, database management personnel enter specific information in corresponding controls of the check configuration page, so that the check indexes of the database are restricted in the routing inspection condition in a custom configuration mode. And the server receives the input result of the verification configuration page from the client, so that the inspection instruction of each verification item is obtained. The inspection instruction of each check item is used for indicating, and different check indexes are checked in different execution cycles according to the importance degree of the database.
And S220, monitoring the time, and verifying each check item according to the inspection instruction when the time falls into the inspection time of each check item to obtain a verification result.
The server side can monitor the time, when the inspection time that the current time belongs to a certain check item is detected, the server side can be connected with the database, and the check item of the database is checked according to the inspection instruction.
When the checking method in the prior art is used for checking, all checking indexes are checked in a fixed flow through a background script at a fixed time. However, the importance degree of each check index to the database is different, the risk influence of the check result of each check index to the database is also different, the potential risk of the database cannot be found in time when the check is performed on each check index in the same period, and the processing pressure in the check process is also larger. Therefore, according to the technical scheme, all indexes of the database are differentiated, and the importance degree of each index to the database is respectively patrolled and examined according to the input result of database management personnel.
For example, the check item a is more important to the database, or the check result of the check item a has a greater risk influence on the database, and the check execution frequency configured by the database administrator in a customized manner is more frequent, so that once the server monitors the check time belonging to the check item a, the check item a is checked according to the check instruction of the check item a; the check item B is not important for the database, or the check result of the check item B has little risk influence on the database, the check execution frequency configured by the database management personnel in a customized manner is sparser, and the check item B can be checked according to the check instruction of the check item B when the server side monitors the check time of the check item B. That is, the service end checks the check item a multiple times, and checks the check item B fewer times than the check item a in the same period of time.
And (4) polling all the check items included in each module of the database by the server according to each polling instruction along with the time to obtain the check results of all the check items. And the verification result is used for indicating a corresponding result obtained after the server side verifies the verification item for the latest time.
Step S230, counting the abnormal conditions corresponding to the verification result, and determining the risk level of each module.
After the server determines the check result, the server analyzes the check result and judges whether the check item is abnormal. If one check item is not abnormal, the server can determine that the check item has no abnormal risk influence on the corresponding module; if a certain check item is abnormal, the server can determine that the check item has abnormal risk influence on the corresponding module. The server side can comprehensively summarize the abnormal risk influence of each check item included in each module, and count the abnormal conditions corresponding to the check result of each check item included in each module, so as to determine the risk level of each module. The server side can comprehensively judge the risk level of each module through the conditions of the abnormal type, the abnormal quantity and the like of each check item included in each module.
And S240, pushing corresponding alarm prompts according to the risk level of each module.
The server side pushes corresponding alarm prompts to database management personnel according to the risk levels of the modules, and the alarm prompts can adopt different forms according to the corresponding risk levels. For example, when the risk level is high, the database manager can know the warning at the first time by sending warning short messages to a specified mobile phone; when the risk level is higher, the database manager can check and receive the warning in the form of sending a warning mail to a designated mailbox and the like; when the risk level is lower, warning and the like can be displayed when the database management personnel check the risk level in the forms of pushing a popup warning page and the like to the client.
In order to enable the database management personnel to know the risk level of each module more intuitively, the server side can also create an alarm prompt page to be pushed to the client side so as to be checked by the database management personnel. On the alarm prompt page, the risk level of each module may be labeled by color, for example, the normal level is labeled by green, the warning level is labeled by yellow, the severity level is labeled by red, and the like. Namely, the alarm prompt page distinguishes the risk severity of each module according to different colors, so that database management personnel can conveniently find the risk items which are urgently needed to be processed and seriously affected.
As can be seen from the method shown in fig. 2, the database risk warning method provided by the application creates and pushes a verification configuration page, and obtains routing inspection instructions of all verification items included in each module of the database in response to the entry result of the verification configuration page; monitoring time, and verifying each check item according to the inspection instruction when the time falls into the inspection time of each check item to obtain a verification result; counting abnormal conditions corresponding to the verification result, and determining the risk level of each module; and pushing corresponding alarm prompts according to the risk level of each module. According to the database risk warning method, various indexes of the database are patrolled in a user-defined configuration mode of database managers; database management personnel can configure corresponding inspection time and/or inspection frequency according to the importance degree of the check items to the database; and the verification is executed in different periods according to the influence degree of the verification item on the database, so that the potential risk of the database can be found in time, and the processing pressure of the verification process is reduced. According to the database risk warning method, the check result is analyzed to determine the risk level of each module, corresponding warning reminding is pushed according to different risk levels, a database manager can conveniently perform fault elimination on high-risk modules, and the database can be effectively prevented from being abnormal in external service.
In some optional embodiments, in the above method, in step S210, creating and pushing a verification configuration page, and in response to an entry result to the verification configuration page, acquiring a patrol instruction of each verification item included in each module of the database, including: creating and pushing a verification configuration page, wherein the verification configuration page at least comprises a module name control, a verification item control and a polling time control; and receiving an input result through the verification configuration page, and determining a routing inspection instruction of each verification item included by each module based on the input result.
Fig. 3 is a diagram illustrating a display effect of a verification configuration page of the database risk warning method according to an embodiment of the present application, and according to fig. 3, a database manager may add, delete, or modify specific information in the verification configuration page.
Referring to fig. 3, the verification configuration page provides a module name control, a check item control, and a patrol time control, wherein the patrol time control is configured by the first start time sub-control and the execution frequency sub-control. Taking the first row of data entered by the database administrator in fig. 3 as an example, the entry result of the module name control is "HOST", the entry result of the check item control is "filehead _ exists", the entry result of the execution frequency sub-control is "30" (used for representing inspection once every 30 minutes), and the entry result of the first start time sub-control is "2022-06-27.
And the database manager inputs the specific information of the check items one by one on the check configuration page. And the service end determines the inspection instruction of each check item based on the input result of the database management personnel so as to perform the next inspection action.
In some optional embodiments, in the above method, receiving an entry result through the verification configuration page, and determining, based on the entry result, a patrol inspection instruction for each verification item included in each module includes: acquiring corresponding inspection sentences in a preset instruction library according to the input results of the module name control and the check item control; and generating a patrol instruction of the corresponding check item according to the input result of the patrol time control and the patrol statement.
The server needs to inspect each check item, and items to be inspected for each check item may have specific differences. Therefore, the routing inspection sentences possibly used by the check items can be cached in the server in advance to form a preset instruction library. After a database manager inputs a module name and a check item result through a check configuration page of the client, the server is matched with a corresponding inspection statement from a preset instruction library on the basis of the module name and the check item, and generates an inspection instruction according to inspection time and the inspection statement.
In the prior art, the process of verifying the database may be as follows: firstly, checking dbinfo, wherein the checking in the step can be but not limited to checking whether group lacks master and/or slave roles, checking whether dbs has db belonging to a plurality of masters, checking whether tables have messy codes, checking whether columns have messy codes, checking whether dbs _ profile has empty application, checking whether dbs _ user has empty password and the like; then, checking connectivity through group information; further checking whether the domain name is consistent with the ip, checking whether the hostname is consistent with the home list information, checking the sec and the like; then, during master-slave detection, for both the master node and the slave node, but not limited to, checking whether role information is correct, checking whether backup is started, checking whether readonly is started, checking whether heartbeat is started, checking whether master-slave library information is complete, checking whether instance information and group information are consistent, and the like; the mha information is finally checked, which may include, but is not limited to, whether mha exists, whether ip and/or port information in cnf is correct, whether master _ domain and/or slave _ domain information in cnf is correct, and the like. According to the technical scheme, the database is disassembled in the whole process of checking, and the inspection is performed on all the checking items of all the modules in different periods. For example, in combination with the first row of data in fig. 3, the purpose of checking the check item "fileback _ exist" is to determine whether fileback is turned on, so that the server only obtains the patrol statement for determining whether fileback is turned on from the preset instruction library, and generates the corresponding patrol instruction by combining the start time and the execution frequency of the check item. That is, for each different check item, the corresponding patrol statement is only a part of the database check whole flow. Therefore, the routing inspection statement corresponding to each check item is formed and cached in the server in advance, and a preset instruction library comprising all routing inspection statement entries which are possibly used by each check item is formed.
In some optional embodiments, in the above method, in step S220, monitoring time, and when the time falls into the inspection time of each check item, performing a check on each check item according to the inspection instruction to obtain a check result, includes: monitoring time; when the time falls into the polling time of each check item, sending the corresponding polling statement to the database so as to enable the database to execute the polling statement; and receiving a check result returned by the database based on the execution polling statement.
And the server monitors whether the time falls into the polling time of the check item. Taking the first row of data shown in fig. 3 as an example, starting from "2022-06-27" 08. When the time falls into the inspection time, the time can be connected with the database. And the server side sends the cached routing inspection statement corresponding to the check item to the database, so that the database executes corresponding operation according to the routing inspection statement and returns a corresponding check result to the server side. To facilitate subsequent interpretation of the verification results, the database may return the verification results in a specified format, such as xml, json, and the like.
In some optional embodiments, in the above method, in step S230, counting abnormal conditions corresponding to the verification result, and determining the risk level of each module includes: matching the verification result with a preset abnormal rule, and determining the abnormal type and/or the abnormal quantity of each verification item; and counting the abnormal types and/or abnormal quantities of the check items included in each module, and determining the risk level of each module according to the counting result.
According to the verification process of the verification index, the abnormal condition may include, but is not limited to: the method comprises the following steps of not opening filebeat, not enabling host information and cmdb information, not enabling openfalcon monitoring, not enabling mha process, wrong mha configuration, wrong xtrabackup backup configuration, not enabling dbmon information collection, not enabling binlog backup, not enabling xtrabackup backup or failure, not enabling domain name resolution and actual ip, incorrect domain name configuration format, master-slave missing and the like. The server side can form the abnormal condition which may occur in the check item into a preset abnormal rule for caching. And after the server receives the check result, matching the check result with a preset abnormal rule to determine the abnormal type of the check item. For example, when the server enters the polling time, the check item "filebolt _ exists" is checked, matching is performed based on the check result and a preset exception rule, and the obtained exception type is "filebolt not opened".
Each module may include a plurality of check terms. And the server comprehensively evaluates the risk level of the module based on the abnormal type and/or the abnormal quantity of each check item belonging to the same module. In a possible situation, a first weight value can be given to each exception type, the greater the risk influence of the exception type on the database, the higher the first weight value, and the smaller the risk influence of the exception type on the database, the lower the first weight value; the abnormal number can be converted into a second weight coefficient, and the larger the abnormal number is, the larger the second weight coefficient is, and the smaller the abnormal number is, the smaller the second weight coefficient is; for a module, multiplying the result of adding the first weight values of different types of the check items included in the module by the second weight coefficient of the abnormal quantity of the check items to obtain the risk coefficient of the module, and evaluating the risk level of the module according to the size interval of the risk coefficient; the risk level of each module can be evaluated by the method, so that the risk level of each module can be determined.
In some optional embodiments, in the above method, in step S240, pushing a corresponding alarm prompt according to the risk level of each module includes: creating an alarm prompt page, wherein the alarm prompt page at least comprises each module display column and a risk level display column of each module; marking the risk grade display columns of the modules by colors, wherein different risk grades correspond to different colors; and pushing the marked alarm prompt page.
In order to enable the database management personnel to know the risk level of each module more intuitively, the server side can create an alarm prompt page and push the alarm prompt page to the client side so as to be checked by the database management personnel. Because the server side is based on time monitoring, the verification of the corresponding verification item is carried out when the time falls into the inspection time, and therefore, the alarm prompt page can be a dynamically-changed page which always shows the risk level analyzed by the latest verification result. And the alarm prompt page at least comprises a module display column and a risk grade display column of each module. And the module display column is used for displaying the names of the modules which are verified, and the risk grade display column of each module is used for displaying the latest evaluated risk grade of each module.
The risk level of each module may be labeled by color, such as normal level in green, warning level in yellow, severity level in red, and so forth. The risk degree of the normal grade is lower than that of the warning grade, the risk degree of the warning grade is lower than that of the severity grade, and the warning prompt page distinguishes the risk severity according to different colors. The server side pushes the marked alarm prompt page to the client side for a database manager to check, and the database manager can focus on the red mark to determine the risk items which are urgently needed to be processed and seriously affected.
In addition, when the database manager processes the risk items, the server side can also push the specific abnormal types and/or abnormal quantities corresponding to the risk levels of the check items based on the selection of the database manager on the color labels, so that the database manager can conveniently carry out fault elimination.
In some optional embodiments, in the above method, after the step of pushing the corresponding alarm prompt according to the risk level of each module in step S240, the method further includes: in response to the neglect processing result of the alarm prompt of the risk level of the module, recording the risk level of the module corresponding to the ignored alarm prompt; and after the check items included by the module are checked again, if the risk level of the module is not increased, the corresponding alarm prompt is not pushed any more.
After an alert prompt for a risk level of a module has been generated, a database manager may manually assess the importance of the alert prompt based on experience. When the database manager artificially evaluates that the alarm prompt is not important and does not need to alarm, the alarm prompt can be ignored. And the server records the risk level of the module corresponding to the ignored alarm prompt. And after the check item contained in the module is checked again, if the risk level is equal to or lower than the neglected risk level, no corresponding alarm prompt is pushed. However, once the check item included in the module is checked again, the risk level is higher than the neglected risk level, and the server still needs to push a corresponding alarm prompt to the database manager.
Under the condition that the server side pushes an alarm prompt page to the client side for alarm prompt, database management personnel can manually evaluate the importance of each yellow label. If the database manager considers that the risk of a certain module with yellow label is not important, the yellow label can be ignored, and the yellow label after the ignoring process is changed into a gray label. After the check items included in the module are checked again, if the risk level is still at the level of yellow marking or is reduced to the level of green marking, the latest alarm prompt page pushed again is marked with gray risk level corresponding to the module. And only after the check item included in the module is checked again, if the risk level is at the level of red marking, the latest alarm prompt page pushed again is provided with red marking corresponding to the module.
In addition, when the database manager is maintaining the database instance, the server side and the database can be offline, so that the server side can not patrol the check items of the database, and unnecessary warning prompts are reduced.
The database risk warning method provided by the application can be practically applied to the fields of digital medical treatment or finance and the like. For example, in the field of digital medical treatment, more and more sections are involved in application systems, and the number of database instances is rapidly increased. By adopting the database risk warning method provided by the application, the check items can be patrolled by adopting different periods according to the influence degree on the database; the risk level can be pushed visually according to the verification result, so that the operation and maintenance personnel can visually and quickly know the potential risk of the database, the operation and maintenance personnel can conveniently carry out troubleshooting on high-risk items, and the problem that the application system provides abnormal service when facing the public and serious consequences are caused is prevented.
Fig. 4 is a flowchart illustrating a database risk warning method according to another embodiment of the present application. As shown in fig. 4, the method may comprise the steps of:
step S401, a verification configuration page is created and pushed, wherein the verification configuration page at least comprises a module name control, a verification item control and a patrol time control.
And S402, acquiring corresponding inspection sentences in a preset instruction library according to the entry results of the user in the module name control and the check item control.
And S403, generating a patrol inspection instruction of the corresponding check item according to the input result of the user in the patrol inspection time control and the patrol inspection statement.
And S404, monitoring the time, and sending the corresponding patrol inspection statement to the database when the time falls into the patrol inspection time of each check item so as to enable the database to execute the patrol inspection statement.
And step S405, receiving a check result returned by the database based on the execution inspection statement.
Step S406, matching the checking result with a preset abnormal rule, and determining the abnormal type and/or the abnormal quantity of each checking item.
Step S407, performing statistics on the abnormal type and/or the abnormal number of each check item included in each module, and determining the risk level of each module according to the statistical result.
Step S408, an alarm prompt page is created, wherein the alarm prompt page at least comprises the display columns of the modules and the risk level display columns of the modules.
Step S409, labeling the risk level display columns of the modules with colors, wherein different risk levels correspond to different colors.
And step S410, pushing the labeled alarm prompt page.
Step S411, responding to the neglect processing result of the alarm prompt of the user to the risk level of the module, and recording the risk level of the module corresponding to the neglected alarm prompt.
Step S412, after the check items included in the module are checked again, if the risk level of the module is not increased, the corresponding alarm prompt is not pushed.
Fig. 5 shows a schematic structural diagram of a database risk warning device according to an embodiment of the present application. As shown in fig. 5, the apparatus 500 comprises:
the configuration unit 501 is configured to create and push a verification configuration page, and obtain, in response to an entry result of the verification configuration page, a patrol instruction of each verification item included in each module of the database;
the verification unit 502 is configured to monitor time, and when the time falls into the inspection time of each verification item, verify each verification item according to the inspection instruction to obtain a verification result;
a risk determining unit 503, configured to count abnormal conditions corresponding to the verification result, and determine a risk level of each module;
and an alarm unit 504, configured to push a corresponding alarm prompt according to the risk level of each module.
In some optional embodiments, in the apparatus 500, the configuration unit 501 is specifically configured to: creating and pushing a verification configuration page, wherein the verification configuration page at least comprises a module name control, a verification item control and a polling time control; and receiving an input result through the verification configuration page, and determining a routing inspection instruction of each verification item included by each module based on the input result.
In some optional embodiments, in the apparatus 500 described above, the configuration unit 501 is further specifically configured to: acquiring corresponding inspection sentences in a preset instruction library according to the input results of the module name control and the check item control; and generating a patrol instruction of the corresponding check item according to the input result of the patrol time control and the patrol statement.
In some optional embodiments, in the apparatus 500, the verification unit 502 is specifically configured to: monitoring time; when the time falls into the polling time of each check item, sending the corresponding polling statement to the database so as to enable the database to execute the polling statement; and receiving a check result returned by the database based on the execution polling statement.
In some optional embodiments, in the apparatus 500, the risk determining unit 503 is specifically configured to: matching the verification result with a preset abnormal rule, and determining the abnormal type and/or the abnormal quantity of each verification item; and counting the abnormal types and/or abnormal quantities of the check items included in each module, and determining the risk level of each module according to the counting result.
In some optional embodiments, in the apparatus 500, the alarm unit 504 is specifically configured to: creating an alarm prompt page, wherein the alarm prompt page at least comprises each module display column and a risk level display column of each module; marking the risk grade display columns of the modules by colors, wherein different risk grades correspond to different colors; and pushing the marked alarm prompt page.
In some optional embodiments, the apparatus 500 further comprises: the neglect processing unit is used for responding to the neglect processing result of the alarm prompt of the risk level of the module and recording the risk level of the module corresponding to the ignored alarm prompt; and after the check items included by the module are checked again, if the risk level of the module is not increased, the corresponding alarm prompt is not pushed any more.
It should be noted that the database risk warning apparatus 500 may implement the database risk warning method one by one, which is not described herein again.
Fig. 6 shows a schematic structural diagram of a computer device according to an embodiment of the present application, which includes a processor, a memory, a network interface, and a database connected by a system bus, according to the schematic structural diagram of fig. 6. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes non-volatile and/or volatile storage media, internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external client through a network connection. The computer program is executed by a processor to implement functions or steps of a service side of a database risk alert method.
In one embodiment, the present application provides a computer device comprising a memory and a processor, the memory storing a database and a computer program executable on the processor, the processor implementing the following steps when executing the computer program:
establishing and pushing a verification configuration page, and responding to an input result of the verification configuration page to obtain a routing inspection instruction of each verification item included by each module of the database;
monitoring time, and verifying each check item according to the inspection instruction when the time falls into the inspection time of each check item to obtain a verification result;
counting abnormal conditions corresponding to the verification result, and determining the risk level of each module;
and pushing corresponding alarm prompts according to the risk level of each module.
The method executed by the database risk warning device according to the embodiment shown in fig. 5 of the present application may be applied to or implemented by a processor. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or instructions in the form of software. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components. The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and a processor reads information in the memory and completes the steps of the method in combination with hardware of the processor.
In one embodiment, a computer device, which may be a client, is also provided, as shown in fig. 7. The computer device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer equipment is used for connecting and communicating with an external server through a network. The computer program is executed by a processor to implement functions or steps at a client side of a database risk alert method.
In one embodiment, there is also provided a computer readable storage medium having a computer program stored thereon, the computer program when executed by a processor implementing the steps of:
establishing and pushing a verification configuration page, and responding to an input result of the verification configuration page to obtain a routing inspection instruction of each verification item included by each module of the database;
monitoring time, and verifying each check item according to the inspection instruction when the time falls into the inspection time of each check item to obtain a verification result;
counting abnormal conditions corresponding to the verification result, and determining the risk level of each module;
and pushing corresponding alarm prompts according to the risk level of each module.
It should be noted that, the functions or steps that can be implemented by the computer device or the computer readable storage medium may be correspondingly described with reference to the foregoing method embodiments, and are not described here one by one to avoid repetition.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A database risk alert method, the method comprising:
establishing and pushing a verification configuration page, and responding to an input result of the verification configuration page to obtain routing inspection instructions of all verification items included by all modules of a database;
monitoring time, and verifying each verification item according to the inspection instruction when the time falls into the inspection time of each verification item to obtain a verification result;
counting abnormal conditions corresponding to the verification result, and determining the risk level of each module;
and pushing corresponding alarm prompts according to the risk level of each module.
2. The database risk warning method according to claim 1, wherein the creating and pushing a verification configuration page, and in response to the entry result to the verification configuration page, acquiring the inspection instruction of each verification item included in each module of the database includes:
creating and pushing a verification configuration page, wherein the verification configuration page at least comprises a module name control, a verification item control and a polling time control;
and receiving an input result through the verification configuration page, and determining a routing inspection instruction of each verification item included by each module based on the input result.
3. The database risk warning method according to claim 2, wherein the receiving, by the verification configuration page, an entry result and determining, based on the entry result, a patrol inspection instruction of each verification item included in each module includes:
acquiring corresponding inspection sentences in a preset instruction library according to the module name control and the input result of the check item control;
and generating a patrol instruction of a corresponding check item according to the input result of the patrol time control and the patrol statement.
4. The database risk warning method according to claim 3, wherein the monitoring time, and when the time falls into the inspection time of each check item, the inspecting each check item according to the inspection instruction to obtain the inspection result comprises:
monitoring time;
when the time falls into the inspection time of each check item, sending the corresponding inspection statement to the database so that the database executes the inspection statement;
and receiving a check result returned by the database based on the execution of the patrol statement.
5. The database risk warning method according to claim 1, wherein the counting the abnormal situations corresponding to the verification results and determining the risk level of each module includes:
matching the verification result with a preset abnormal rule, and determining the abnormal type and/or the abnormal quantity of each verification item;
and counting the abnormal types and/or the abnormal quantities of the check items included in the modules, and determining the risk grade of the modules according to the counting result.
6. The database risk warning method according to claim 1, wherein the pushing of the corresponding warning prompt according to the risk level of each of the modules includes:
creating an alarm prompt page, wherein the alarm prompt page at least comprises the module display columns and the risk level display columns of the modules;
labeling the risk level display columns of the modules with colors, wherein different risk levels correspond to different colors;
and pushing the marked alarm prompt page.
7. The database risk alert method of claim 1, wherein after the step of pushing the corresponding alert prompt according to the risk level of each of the modules, the method further comprises:
responding to an neglect processing result of an alarm prompt of the risk level of the module, and recording the risk level of the module corresponding to the ignored alarm prompt;
and after the check items included by the module are checked again, if the risk level of the module is not increased, no corresponding alarm prompt is pushed.
8. A database risk alert device, the device comprising:
the configuration unit is used for creating and pushing a verification configuration page, responding to an input result of the verification configuration page, and acquiring a routing inspection instruction of each verification item included by each module of the database;
the verification unit is used for monitoring time and verifying each verification item according to the inspection instruction when the time falls into the inspection time of each verification item to obtain a verification result;
the risk determining unit is used for counting the abnormal conditions corresponding to the verification results and determining the risk grade of each module;
and the alarm unit is used for pushing corresponding alarm prompts according to the risk level of each module.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the database risk alert method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being instructed by a processor, carries out the steps of the database risk alert method according to any one of claims 1 to 7.
CN202211425800.9A 2022-11-15 2022-11-15 Database risk warning method, device, equipment and storage medium Pending CN115834172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211425800.9A CN115834172A (en) 2022-11-15 2022-11-15 Database risk warning method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211425800.9A CN115834172A (en) 2022-11-15 2022-11-15 Database risk warning method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115834172A true CN115834172A (en) 2023-03-21

Family

ID=85528136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211425800.9A Pending CN115834172A (en) 2022-11-15 2022-11-15 Database risk warning method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115834172A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472359A (en) * 2023-12-26 2024-01-30 广东太亚科技有限公司 Visual configuration multistage linkage constraint method, device and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117472359A (en) * 2023-12-26 2024-01-30 广东太亚科技有限公司 Visual configuration multistage linkage constraint method, device and computer equipment
CN117472359B (en) * 2023-12-26 2024-03-01 广东太亚科技有限公司 Visual configuration multistage linkage constraint method, device and computer equipment

Similar Documents

Publication Publication Date Title
WO2021174694A1 (en) Operation and maintenance monitoring method and apparatus based on data center, device, and storage medium
CN109684160A (en) Database method for inspecting, device, equipment and computer readable storage medium
CN112631913B (en) Method, device, equipment and storage medium for monitoring operation faults of application program
Jayathilake Towards structured log analysis
CN105868256A (en) Method and system for processing user behavior data
CN111309567A (en) Data processing method and device, database system, electronic equipment and storage medium
CN107302469B (en) Monitoring device and method for data update of distributed service cluster system
CN109272215B (en) Project development quality monitoring method and device, computer equipment and storage medium
US7369967B1 (en) System and method for monitoring and modeling system performance
US9922116B2 (en) Managing big data for services
CN115834172A (en) Database risk warning method, device, equipment and storage medium
CN112256548B (en) Abnormal data monitoring method and device, server and storage medium
CN114443437A (en) Alarm root cause output method, apparatus, device, medium, and program product
CN113656247A (en) Service monitoring method and device, electronic equipment and readable storage medium
CN111563111A (en) Alarm method, alarm device, electronic equipment and storage medium
CN114513334B (en) Risk management method and risk management device
CN113535034B (en) Method, apparatus, system and medium for fault warning
CN115185778A (en) Database monitoring method and device
CN112131090B (en) Service system performance monitoring method, device, equipment and medium
CN110502404B (en) Early warning processing method based on data management platform and related equipment
CN114531338A (en) Monitoring alarm and tracing method and system based on call chain data
CN114064757A (en) Application program optimization method, device, equipment and medium
CN114327988A (en) Visual network fault relation determining method and device
CN113676356A (en) Alarm information processing method and device, electronic equipment and readable storage medium
CN112035315A (en) Webpage data monitoring method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination