Database inspection method and device

文档序号:190215 发布日期:2021-11-02 浏览:28次 中文

阅读说明:本技术 数据库的巡检方法与装置 (Database inspection method and device ) 是由 李波 易金东 于 2021-09-28 设计创作,主要内容包括:本申请提供了一种数据库的巡检方法与装置,该巡检方法包括:接收巡检指令;响应于巡检指令,对数据库的巡检项目进行巡检,得到巡检日志,巡检日志的内容信息包括巡检概述信息和巡检问题信息,巡检概述信息至少包括巡检项目的名称和数量,巡检问题信息为巡检项目的异常信息,巡检项目包括备份容灾类巡检项目、安全与稳定类巡检项目、空间资源类巡检项目和规范类巡检项目;根据巡检日志和历史巡检日志生成巡检报告,巡检报告包括巡检概述模块、巡检问题模块、遗留问题模块和未巡检项模块,遗留问题模块和未巡检项模块的内容为巡检日志和历史巡检日志进行对比确定的,解决了现有技术中数据库的巡检结果没有延续性的问题。(The application provides a database inspection method and a database inspection device, wherein the inspection method comprises the following steps: receiving a polling instruction; responding to a polling instruction, polling the polling items in the database to obtain a polling log, wherein the content information of the polling log comprises polling summary information and polling problem information, the polling summary information at least comprises the name and the number of the polling items, the polling problem information is abnormal information of the polling items, and the polling items comprise backup disaster-tolerant polling items, safety and stability polling items, space resource polling items and standard polling items; the method comprises the steps that a patrol report is generated according to a patrol log and a historical patrol log, the patrol report comprises a patrol summary module, a patrol problem module, a left problem module and a non-patrol item module, and the contents of the left problem module and the non-patrol item module are determined by comparing the patrol log with the historical patrol log, so that the problem that the patrol result of a database in the prior art is not continuous is solved.)

1. A database inspection method is characterized by comprising the following steps:

receiving a polling instruction;

responding to the inspection instruction, inspecting the inspection items of the database to obtain an inspection log, wherein the content information of the inspection log comprises inspection general information and inspection problem information, the inspection general information at least comprises the name and the number of the inspection items, the inspection problem information is abnormal information of the inspection items, and the inspection items comprise backup disaster-tolerant inspection items, safety and stability inspection items, space resource inspection items and standard inspection items;

and generating a patrol inspection report according to the patrol inspection log and the historical patrol inspection log, wherein the patrol inspection report comprises a patrol inspection summary module, a patrol inspection problem module, a left problem module and a non-patrol inspection item module, and the contents of the left problem module and the non-patrol inspection item module are determined by comparing the patrol inspection log with the historical patrol inspection log.

2. The method of claim 1, wherein the database is a plurality of databases, and after generating routing inspection reports from the routing inspection logs and historical routing inspection logs, the method further comprises:

calculating the corresponding score of the database according to the routing inspection report;

and determining the display sequence of the corresponding routing inspection report according to the score of the database.

3. The method of claim 2, wherein calculating the corresponding score of the database from the routing inspection report comprises:

determining the weight of the polling item;

determining the scores of the inspection items according to the weights of the inspection items and the inspection problem module;

and calculating the scores of the database according to the scores of the routing inspection items.

4. The method of claim 3, wherein after calculating the corresponding score for the database from the routing inspection report, the method further comprises:

determining the importance level of the inspection item according to the score of the inspection item;

and determining the display form of the routing inspection item according to the importance level, wherein the display form is font color or font size.

5. The method according to claim 1, wherein the content information of the patrol inspection log further comprises database information and instance list information, the patrol inspection report further comprises a database information module and an instance list module, the database information module is used for displaying the database information, the instance list module is used for displaying the instance list information, the database information comprises database name information, cluster information, version information, operating system type information and standby library information, and the instance list information comprises instance name information, instance running state information, IP address information, operating system version information, CPU core number information and memory size information.

6. The method of claim 1, wherein the plurality of inspection items are used for inspecting the database in response to the inspection instruction, and the inspection method comprises the following steps:

and responding to the inspection instruction, calling an inspection script to inspect the corresponding inspection items to obtain inspection logs, wherein the inspection script corresponds to the inspection items one to one.

7. The method of claim 1, wherein the plurality of inspection items are used for performing inspection on the database in response to the inspection instruction, and further comprising:

and under the condition that the polling time of the polling item is greater than the preset time, stopping polling the polling item and polling the next polling item.

8. The utility model provides an inspection device of database which characterized in that includes:

the receiving unit is used for receiving the inspection instruction;

the inspection unit is used for responding to the inspection instruction and inspecting the inspection items of the database to obtain an inspection log, wherein the content information of the inspection log comprises inspection general information and inspection problem information, the inspection general information at least comprises the names and the number of the inspection items, the inspection problem information is abnormal information of the inspection items, and the inspection items comprise backup disaster-tolerant inspection items, safety and stability inspection items, space resource inspection items and standard inspection items;

and the generating unit is used for generating an inspection report according to the inspection log and the historical inspection log, wherein the inspection report comprises an inspection summary module, an inspection problem module, a left problem module and a non-inspection item module, and the contents of the left problem module and the non-inspection item module are determined by comparing the inspection log with the historical inspection log.

9. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 7.

10. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of any of claims 1 to 7.

Technical Field

The application relates to the field of database inspection, in particular to a database inspection method, a database inspection device, a computer readable storage medium and a processor.

Background

In order to guarantee the normal operation of the database in the production environment, the database needs to be checked regularly, and problems or potential problems existing in the database currently are found in this way, so that the regular check of the database becomes a necessary means for maintaining the database. At present, a plurality of manual inspection modes are adopted, and the sql script and the shell script are written and executed one by one to obtain an inspection result. Some of the inspection scripts are written, the inspection scripts are executed regularly through a host computer or manually, execution results are printed into files in a unified mode, and finally inspection results are formed into inspection documents manually. This process is labor intensive, requires several days to complete the inspection, and is prone to error.

The automatic inspection mode realized at present cannot quickly reflect a database with problems after inspection is finished.

It is also impossible to quickly find out which changes have occurred in the latest database by comparing the same database according to different times, such as comparing the results of the previous inspection or the inspection several days or months ago, comparing the results twice or more, and accurately positioning the database.

According to the requirement, if the inspection items of the inspection do not contain all the inspection items of the previous inspection, and some inspection items are abnormal in the previous inspection, under the condition, the inspection items with the abnormal inspection items of the previous inspection cannot be inspected, and the condition that the inspection items cannot be found in time due to the existing problems cannot be recorded in the inspection; the inspection items which are inspected last time are not inspected in the inspection, the comparison can not be carried out, the inspection items which are not inspected at this time are recorded, and the condition that the inspection items cannot be found in time due to problems can be caused to the database.

The prior inspection technology is characterized in that a comparison table is arranged, the comparison table is mainly used for setting a threshold value of all inspection items, when an inspection output result is not within the threshold value range, the inspection output result is used as a problem item to be output to form an inspection report, and the inspection items without problems cannot display the result. In some cases, all the inspection results need to be displayed, which is very inconvenient. Moreover, in the case of a huge database, the problem is more prominent.

The inspection mode can not compare the inspection results of the same set of database at different times, and the change conditions of the same set of database at different times can not be visually inspected. The whole work is complicated by looking at the changes of the same library.

Under the existing inspection technology, when the inspection items of the previous inspection configuration and the inspection items of the current inspection configuration are changed, for example, the inspection items are less, the existing technology can not record the reduced inspection items, and if the reduced inspection items are abnormal in the previous inspection, the abnormal inspection items can not be recorded. This results in no continuity of the inspection results and may affect the database.

The above information disclosed in this background section is only for enhancement of understanding of the background of the technology described herein and, therefore, certain information may be included in the background that does not form the prior art that is already known in this country to a person of ordinary skill in the art.

Disclosure of Invention

The application mainly aims to provide a database inspection method, a database inspection device, a computer readable storage medium and a processor, so as to solve the problem that the inspection result of a database in the prior art has no continuity.

According to an aspect of the embodiments of the present invention, there is provided a method for polling a database, including: receiving a polling instruction; responding to the inspection instruction, inspecting the inspection items of the database to obtain an inspection log, wherein the content information of the inspection log comprises inspection general information and inspection problem information, the inspection general information at least comprises the name and the number of the inspection items, the inspection problem information is abnormal information of the inspection items, and the inspection items comprise backup disaster-tolerant inspection items, safety and stability inspection items, space resource inspection items and standard inspection items; and generating a patrol inspection report according to the patrol inspection log and the historical patrol inspection log, wherein the patrol inspection report comprises a patrol inspection summary module, a patrol inspection problem module, a left problem module and a non-patrol inspection item module, and the contents of the left problem module and the non-patrol inspection item module are determined by comparing the patrol inspection log with the historical patrol inspection log.

Optionally, after generating the inspection report according to the inspection log and the historical inspection log, the method further includes: calculating the corresponding score of the database according to the routing inspection report; and determining the display sequence of the corresponding routing inspection report according to the score of the database.

Optionally, calculating a corresponding score of the database according to the inspection report includes: determining the weight of the polling item; determining the scores of the inspection items according to the weights of the inspection items and the inspection problem module; and calculating the scores of the database according to the scores of the routing inspection items.

Optionally, after calculating the score of the corresponding database according to the patrol report, the method further comprises: determining the importance level of the inspection item according to the score of the inspection item; and determining the display form of the routing inspection item according to the importance level, wherein the display form is font color or font size.

Optionally, the content information of the inspection log further includes database information and instance list information, the inspection report further includes a database information module and an instance list module, the database information module is used for displaying the database information, the instance list module is used for displaying the instance list information, the database information includes database name information, cluster information, version information, operating system type information and standby library information, and the instance list information includes instance name information, instance running state information, IP address information, operating system version information, CPU core number information and memory size information.

Optionally, the polling item has a plurality of items, and polling the database in response to the polling instruction includes: and responding to the inspection instruction, calling an inspection script to inspect the corresponding inspection items to obtain inspection logs, wherein the inspection script corresponds to the inspection items one to one.

Optionally, the polling item has a plurality of items, and in response to the polling instruction, polling the database further includes: and under the condition that the polling time of the polling item is greater than the preset time, stopping polling the polling item and polling the next polling item.

According to another aspect of the embodiments of the present invention, there is also provided a database inspection apparatus, including: the receiving unit is used for receiving the inspection instruction; the inspection unit is used for responding to the inspection instruction and inspecting the inspection items of the database to obtain an inspection log, wherein the content information of the inspection log comprises inspection general information and inspection problem information, the inspection general information at least comprises the names and the number of the inspection items, the inspection problem information is abnormal information of the inspection items, and the inspection items comprise backup disaster-tolerant inspection items, safety and stability inspection items, space resource inspection items and standard inspection items; and the generating unit is used for generating an inspection report according to the inspection log and the historical inspection log, wherein the inspection report comprises an inspection summary module, an inspection problem module, a left problem module and a non-inspection item module, and the contents of the left problem module and the non-inspection item module are determined by comparing the inspection log with the historical inspection log.

According to still another aspect of embodiments of the present invention, there is also provided a computer-readable storage medium including a stored program, wherein the program executes any one of the methods.

According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes any one of the methods.

In the embodiment of the invention, in the inspection method of the database, firstly, an inspection instruction is received; then, in response to the polling instruction, polling the polling items in the database to obtain a polling log, wherein the content information of the polling log comprises polling summary information and polling problem information, the polling summary information at least comprises the name and the number of the polling items, the polling problem information is abnormal information of the polling items, and the polling items comprise backup disaster-tolerant polling items, safety and stability polling items, space resource polling items and standard polling items; and finally, generating a patrol inspection report according to the patrol inspection log and the historical patrol inspection log, wherein the patrol inspection report comprises a patrol inspection summary module, a patrol inspection problem module, a left problem module and a non-patrol inspection item module, and the contents of the left problem module and the non-patrol inspection item module are determined by comparing the patrol inspection log with the historical patrol inspection log. According to the inspection method, the current inspection log and the historical inspection log are compared, and compared with the corresponding inspection of the historical inspection log, the inspection items which are not inspected in the inspection at this time are determined, the content of an inspection item module which is not inspected is obtained, the inspection problems corresponding to the inspection items which are not inspected in the inspection at this time are determined, the content of a left problem module is obtained, the left problems are conveniently tracked, the inspection items which are not inspected are conveniently checked, and the problem that the inspection result of a database in the prior art is not continuous is solved.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:

FIG. 1 is a flow chart of a database inspection method according to an embodiment of the application;

fig. 2 shows a schematic diagram of an inspection device of a database according to an embodiment of the application.

Detailed Description

It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.

In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

It will be understood that when an element such as a layer, film, region, or substrate is referred to as being "on" another element, it can be directly on the other element or intervening elements may also be present. Also, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element or "connected" to the other element through a third element.

As mentioned in the background, the inspection result of the database in the prior art has no continuity, and in order to solve the above problems, in an exemplary embodiment of the present application, a method, an apparatus, a computer-readable storage medium, and a processor for inspecting a database are provided.

According to the embodiment of the application, a method for patrolling the database is provided.

Fig. 1 is a flowchart of a database inspection method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:

step S101, receiving a patrol inspection instruction;

step S102, in response to the polling instruction, polling items in a database to obtain a polling log, wherein content information of the polling log comprises polling summary information and polling problem information, the polling summary information at least comprises names and numbers of the polling items, the polling problem information is abnormal information of the polling items, and the polling items comprise backup disaster-tolerant polling items, safety and stability polling items, space resource polling items and standard polling items;

and step S103, generating a patrol report according to the patrol log and the historical patrol log, wherein the patrol report comprises a patrol summary module, a patrol problem module, a left problem module and a non-patrol item module, and the contents of the left problem module and the non-patrol item module are determined by comparing the patrol log and the historical patrol log.

In the inspection method of the database, firstly, an inspection instruction is received; then, in response to the polling instruction, polling the polling items in the database to obtain a polling log, wherein the content information of the polling log comprises polling summary information and polling problem information, the polling summary information at least comprises the name and the number of the polling items, the polling problem information is abnormal information of the polling items, and the polling items comprise backup disaster-tolerant polling items, safety and stability polling items, space resource polling items and standard polling items; and finally, generating a patrol inspection report according to the patrol inspection log and the historical patrol inspection log, wherein the patrol inspection report comprises a patrol inspection summary module, a patrol inspection problem module, a left problem module and a non-patrol inspection item module, and the contents of the left problem module and the non-patrol inspection item module are determined by comparing the patrol inspection log with the historical patrol inspection log. According to the inspection method, the current inspection log and the historical inspection log are compared, and compared with the corresponding inspection of the historical inspection log, the inspection items which are not inspected in the inspection at this time are determined, the content of an inspection item module which is not inspected is obtained, the inspection problems corresponding to the inspection items which are not inspected in the inspection at this time are determined, the content of a left problem module is obtained, the left problems are conveniently tracked, the inspection items which are not inspected are conveniently checked, and the problem that the inspection result of a database in the prior art is not continuous is solved.

It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.

In an embodiment of the application, the database includes a plurality of databases, and after generating the patrol inspection report according to the patrol inspection log and the historical patrol inspection log, the method further includes: calculating the corresponding score of the database according to the routing inspection report; and determining the display sequence of the corresponding inspection report according to the scores of the databases, specifically, sorting the databases according to the score conditions of the databases, wherein the sorting comprises two sorting modes of ascending and descending. The database with high score can be arranged at the top in a descending mode, the database with low score can be arranged at the top in an ascending mode, and the score is calculated through a score algorithm formula: the total score/total score of the inspection items, namely the total score = the final score, for example, there are 100 inspection items, the inspection score is 200, and the total score is 300, then, the final score of this inspection is 200/300 × 100=66.67, a score mechanism is introduced, scores are printed after the inspection of the inspection items, the total score is calculated, then, the ranking is performed according to the score, the higher the score is, the higher the running quality of the database is, the lower the score is, the worse the information quality of the database is.

It should be noted that the polling item is also applicable to other databases including: oracle, MySQL, Sql Server, PostgreSQL, etc.

In an embodiment of the present application, calculating a score of the corresponding database according to the inspection report includes: determining the weight of the polling item; determining the scores of the polling items according to the weights of the polling items and the polling problem module; and calculating the scores of the databases according to the scores of the inspection items, specifically, the weights of the inspection items can be filled in the weight values according to the service types of the databases, for example, the ORACLE database shared memory is used, and if the scores are 5 scores within a reasonable range, the checked version information is 1 score. The weight of the shared memory is higher than that of the version information in the polling process, and the importance of the polling result can be reflected better. After the inspection result is obtained, the inspection item with the highest weight ratio can be displayed preferentially, and whether the most important inspection item has a problem or not can be found more quickly.

In an embodiment of the application, after calculating the score of the corresponding database according to the inspection report, the method further includes: determining the importance level of the inspection item according to the score of the inspection item; determining the display form of the inspection item according to the importance level, wherein the display form is font color or font size, specifically, the level can be classified into alarm and severity, and the display form of the inspection item according to the importance level is font color or font size, for example, red indicates that the inspection item belongs to the severity level, orange indicates that the inspection item belongs to the importance level, and at this time, attention is paid to the inspection item with the score of red font, so as to clearly see the inspection item with the importance.

In an embodiment of the application, the content information of the inspection log further includes database information and instance list information, the inspection report further includes a database information module and an instance list module, the database information module is used for displaying the database information, the instance list module is used for displaying the instance list information, the database information includes database name information, cluster information, version information, operating system type information and standby library information, and the instance list information includes instance name information, instance running state information, IP address information, operating system version information, CPU core number information and memory size information.

In an embodiment of the present application, the above-mentioned items of patrolling and examining have a plurality ofly, respond to the above-mentioned instruction of patrolling and examining, patrol and examine the database, include: and responding to the inspection instruction, calling an inspection script to inspect the corresponding inspection item to obtain an inspection log, wherein the inspection script corresponds to the inspection item one by one, specifically, the inspection script corresponds to the inspection item one by one, one inspection script is configured to be one inspection item, and more inspection items can be configured through the inspection script. According to different requirements, different polling projects are configured by using different scenes, and in addition, the database polling script is a SHELL or SQL script which is written in advance and used for executing specific polling.

In an embodiment of the present application, the above-mentioned item of patrolling and examining has a plurality ofly, responds to the above-mentioned instruction of patrolling and examining, patrols and examines to database, still includes: and stopping polling the polling item and polling the next polling item when the polling time of the polling item is greater than the preset time, specifically, the preset time of the polling item can be configured, and if the preset time is exceeded, the polling item is stopped, so that the problem that the polling result of the database in the prior art is not continuous is solved.

It should be further noted that, an inspection comparison mechanism is introduced, and time can be positioned to the year, month and day by selecting time, wherein the current inspection report date is larger than the historical inspection report date, otherwise, an error prompt is given. And selecting a historical inspection result of a certain day, and generating a current and historical inspection comparison report. The inspection result of a certain day of the same database can be compared with the inspection results of any other day, the difference of the two inspection results is preferentially displayed, and the condition that the inspection result is not changed is displayed behind the inspection report. The display method comprises the following steps: the first row shows for the result of patrolling and examining at present, and the second row shows for history and patrols and examines the result, and each line can show and patrol and examine the condition that the score is the increase and decrease score, can discover twice result difference of patrolling and examining fast like this, conveniently looks over the situation of change of patrolling and examining the result.

The embodiment of the application further provides an inspection device for a database, and it should be noted that the inspection device for the database of the embodiment of the application can be used for executing the inspection method for the database provided by the embodiment of the application. The inspection device for the database provided by the embodiment of the application is introduced below.

Fig. 2 is a schematic diagram of an inspection device of a database according to an embodiment of the application. As shown in fig. 2, the apparatus includes:

the receiving unit 10 is used for receiving the inspection instruction;

the inspection unit 20 is configured to inspect the inspection items in the database in response to the inspection instruction to obtain an inspection log, where content information of the inspection log includes inspection summary information and inspection problem information, the inspection summary information at least includes names and numbers of the inspection items, the inspection problem information is abnormal information of the inspection items, and the inspection items include backup disaster-tolerant inspection items, safety and stability inspection items, space resource inspection items, and normative inspection items;

and a generating unit 30, configured to generate a patrol report according to the patrol log and the historical patrol log, where the patrol report includes a patrol summary module, a patrol problem module, a left problem module, and a non-patrol item module, and contents of the left problem module and the non-patrol item module are determined by comparing the patrol log with the historical patrol log.

In the inspection device of the database, a receiving unit is used for receiving an inspection instruction; the system comprises an inspection unit, a database and a plurality of inspection items, wherein the inspection unit is used for responding to the inspection instruction and inspecting the inspection items in the database to obtain an inspection log, the content information of the inspection log comprises inspection summary information and inspection problem information, the inspection summary information at least comprises the names and the numbers of the inspection items, the inspection problem information is abnormal information of the inspection items, and the inspection items comprise backup disaster-tolerant inspection items, safety and stability inspection items, space resource inspection items and standard inspection items; and the generating unit is used for generating an inspection report according to the inspection log and the historical inspection log, wherein the inspection report comprises an inspection summary module, an inspection problem module, a left problem module and a non-inspection item module, and the contents of the left problem module and the non-inspection item module are determined by comparing the inspection log and the historical inspection log. According to the inspection method, the current inspection log and the historical inspection log are compared, and compared with the corresponding inspection of the historical inspection log, the inspection items which are not inspected in the inspection at this time are determined, the content of an inspection item module which is not inspected is obtained, the inspection problems corresponding to the inspection items which are not inspected in the inspection at this time are determined, the content of a left problem module is obtained, the left problems are conveniently tracked, the inspection items which are not inspected are conveniently checked, and the problem that the inspection result of a database in the prior art is not continuous is solved.

In an embodiment of the present application, there are a plurality of databases, and after the generating unit, the apparatus further includes a calculating unit and a first determining unit, wherein the calculating unit is configured to calculate a score of the corresponding database according to the inspection report; the first determining unit is configured to determine a display order of the inspection report according to the score of the database, and specifically, may sort the database according to the score of the database, where the sorting includes two sorting manners, an ascending sorting and a descending sorting. The database with high score can be arranged at the top in a descending mode, the database with low score can be arranged at the top in an ascending mode, and the score is calculated through a score algorithm formula: the total score/total score of the inspection items, namely the total score = the final score, for example, there are 100 inspection items, the inspection score is 200, and the total score is 300, then, the final score of this inspection is 200/300 × 100=66.67, a score mechanism is introduced, scores are printed after the inspection of the inspection items, the total score is calculated, then, the ranking is performed according to the score, the higher the score is, the higher the running quality of the database is, the lower the score is, the worse the information quality of the database is.

In an embodiment of the present application, the computing unit includes a first determining module, a second determining module, and a computing module, where the first determining module is configured to determine a weight of the inspection item; the second determining module is used for determining the scores of the polling items according to the weights of the polling items and the polling problem module; the calculating module is used for calculating the scores of the databases according to the scores of the inspection items, specifically, the weights of the inspection items can be filled with weight values according to the service types of the databases, for example, an ORACLE database shared memory, and if the scores are 5 points within a reasonable range, the checked version information is 1 point. The weight of the shared memory is higher than that of the version information in the polling process, and the importance of the polling result can be reflected better. After the inspection result is obtained, the inspection item with the highest weight ratio can be displayed preferentially, and whether the most important inspection item has a problem or not can be found more quickly.

In an embodiment of the application, after the calculating unit, the apparatus further includes a second determining unit and a third determining unit, wherein the second determining unit is configured to determine an importance level of the patrol item according to a score of the patrol item; the third determining unit is configured to determine a display form of the inspection item according to the importance level, where the display form is a font color or a font size, specifically, the level may be classified into an alarm and a severity, and the display form of the inspection item according to the importance level is the font color or the font size, for example, red indicates that the inspection item belongs to the severity level, and orange indicates that the inspection item belongs to the importance level, and at this time, attention is focused on the inspection item whose score is the red font, so that the inspection item of the importance is clearly seen.

In an embodiment of the application, the content information of the inspection log further includes database information and instance list information, the inspection report further includes a database information module and an instance list module, the database information module is used for displaying the database information, the instance list module is used for displaying the instance list information, the database information includes database name information, cluster information, version information, operating system type information and standby library information, and the instance list information includes instance name information, instance running state information, IP address information, operating system version information, CPU core number information and memory size information.

In an embodiment of this application, the aforesaid is patrolled and examined the project and is had a plurality ofly, patrols and examines the unit and include first module of patrolling and examining, and the module of patrolling and examining is responded to the aforesaid and is patrolled and examined the instruction, and the script of patrolling and examining is patrolled and examined the project to the aforesaid that corresponds and patrol and examine, obtains the log of patrolling and examining, and the aforesaid is patrolled and examined the script and is patrolled and examined the project one-to-one with the aforesaid, specifically, the aforesaid is patrolled and examined the script and is patrolled and examined the project one-to-one with the aforesaid, and the script configuration is patrolled and examined more items to the accessible. According to different requirements, different polling projects are configured by using different scenes, and in addition, the database polling script is a SHELL or SQL script which is written in advance and used for executing specific polling.

In an embodiment of the application, the above-mentioned items of patrolling and examining have a plurality ofly, and the unit of patrolling and examining still includes the second module of patrolling and examining, and the second is patrolled and examined the module and is used for stopping patrolling and examining the above-mentioned item of patrolling and examining under the condition that the time of patrolling and examining of the above-mentioned item is greater than predetermined time, patrols and examines next above-mentioned item of patrolling and examining, specifically, can dispose the predetermined time of patrolling and examining the item, surpasses this predetermined time, then stops patrolling and examining the above-mentioned item of patrolling and examining, avoids the problem that the result of patrolling and examining of database does not have the continuity among the prior art.

The inspection device of the database comprises a processor and a memory, wherein the receiving unit, the inspection unit, the generating unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.

The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problem that the inspection result of the database in the prior art has no continuity is solved by adjusting the kernel parameters.

The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.

An embodiment of the present invention provides a computer-readable storage medium, on which a program is stored, which, when executed by a processor, implements the above-described database inspection method.

The embodiment of the invention provides a processor, which is used for running a program, wherein the inspection method of the database is executed when the program runs.

The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein when the processor executes the program, at least the following steps are realized:

step S101, receiving a patrol inspection instruction;

step S102, in response to the polling instruction, polling items in a database to obtain a polling log, wherein content information of the polling log comprises polling summary information and polling problem information, the polling summary information at least comprises names and numbers of the polling items, the polling problem information is abnormal information of the polling items, and the polling items comprise backup disaster-tolerant polling items, safety and stability polling items, space resource polling items and standard polling items;

and step S103, generating a patrol report according to the patrol log and the historical patrol log, wherein the patrol report comprises a patrol summary module, a patrol problem module, a left problem module and a non-patrol item module, and the contents of the left problem module and the non-patrol item module are determined by comparing the patrol log and the historical patrol log.

The device herein may be a server, a PC, a PAD, a mobile phone, etc.

The present application further provides a computer program product adapted to perform a program of initializing at least the following method steps when executed on a data processing device:

step S101, receiving a patrol inspection instruction;

step S102, in response to the polling instruction, polling items in a database to obtain a polling log, wherein content information of the polling log comprises polling summary information and polling problem information, the polling summary information at least comprises names and numbers of the polling items, the polling problem information is abnormal information of the polling items, and the polling items comprise backup disaster-tolerant polling items, safety and stability polling items, space resource polling items and standard polling items;

and step S103, generating a patrol report according to the patrol log and the historical patrol log, wherein the patrol report comprises a patrol summary module, a patrol problem module, a left problem module and a non-patrol item module, and the contents of the left problem module and the non-patrol item module are determined by comparing the patrol log and the historical patrol log.

In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.

In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned computer-readable storage media comprise: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.

From the above description, it can be seen that the above-described embodiments of the present application achieve the following technical effects:

1) in the database inspection method, firstly, an inspection instruction is received; then, in response to the polling instruction, polling the polling items in the database to obtain a polling log, wherein the content information of the polling log comprises polling summary information and polling problem information, the polling summary information at least comprises the name and the number of the polling items, the polling problem information is abnormal information of the polling items, and the polling items comprise backup disaster-tolerant polling items, safety and stability polling items, space resource polling items and standard polling items; and finally, generating a patrol inspection report according to the patrol inspection log and the historical patrol inspection log, wherein the patrol inspection report comprises a patrol inspection summary module, a patrol inspection problem module, a left problem module and a non-patrol inspection item module, and the contents of the left problem module and the non-patrol inspection item module are determined by comparing the patrol inspection log with the historical patrol inspection log. According to the inspection method, the current inspection log and the historical inspection log are compared, and compared with the corresponding inspection of the historical inspection log, the inspection items which are not inspected in the inspection at this time are determined, the content of an inspection item module which is not inspected is obtained, the inspection problems corresponding to the inspection items which are not inspected in the inspection at this time are determined, the content of a left problem module is obtained, the left problems are conveniently tracked, the inspection items which are not inspected are conveniently checked, and the problem that the inspection result of a database in the prior art is not continuous is solved.

2) In the inspection device of the database, the receiving unit is used for receiving an inspection instruction; the system comprises an inspection unit, a database and a plurality of inspection items, wherein the inspection unit is used for responding to the inspection instruction and inspecting the inspection items in the database to obtain an inspection log, the content information of the inspection log comprises inspection summary information and inspection problem information, the inspection summary information at least comprises the names and the numbers of the inspection items, the inspection problem information is abnormal information of the inspection items, and the inspection items comprise backup disaster-tolerant inspection items, safety and stability inspection items, space resource inspection items and standard inspection items; and the generating unit is used for generating an inspection report according to the inspection log and the historical inspection log, wherein the inspection report comprises an inspection summary module, an inspection problem module, a left problem module and a non-inspection item module, and the contents of the left problem module and the non-inspection item module are determined by comparing the inspection log and the historical inspection log. According to the inspection method, the current inspection log and the historical inspection log are compared, and compared with the corresponding inspection of the historical inspection log, the inspection items which are not inspected in the inspection at this time are determined, the content of an inspection item module which is not inspected is obtained, the inspection problems corresponding to the inspection items which are not inspected in the inspection at this time are determined, the content of a left problem module is obtained, the left problems are conveniently tracked, the inspection items which are not inspected are conveniently checked, and the problem that the inspection result of a database in the prior art is not continuous is solved.

The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:数据管理方法、数据管理系统和计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!