CN110874311A - Database detection method and device, computer equipment and storage medium - Google Patents

Database detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110874311A
CN110874311A CN201910962354.7A CN201910962354A CN110874311A CN 110874311 A CN110874311 A CN 110874311A CN 201910962354 A CN201910962354 A CN 201910962354A CN 110874311 A CN110874311 A CN 110874311A
Authority
CN
China
Prior art keywords
database
detection
standby
identification
main
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
CN201910962354.7A
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.)
NetsUnion Clearing Corp
Original Assignee
NetsUnion Clearing Corp
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 NetsUnion Clearing Corp filed Critical NetsUnion Clearing Corp
Priority to CN201910962354.7A priority Critical patent/CN110874311A/en
Publication of CN110874311A publication Critical patent/CN110874311A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3466Performance evaluation by tracing or monitoring
    • G06F11/3495Performance evaluation by tracing or monitoring for systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a database detection method, a database detection device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring all database IP identifications according to a preset period after the database is online; acquiring a main database and a standby database corresponding to each database IP identification; acquiring a current service processing state, and determining a target detection item according to the current service processing state; and detecting the target detection items in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result. Therefore, the technical problems that the online service is influenced by a database detection mode and the efficiency is low in the prior art are solved, when the database is in an online running state, the checking item which cannot cause the influence of the real-time service can be checked according to the preset period, the database detection efficiency is improved, and the condition that the service processing is wrong is avoided.

Description

Database detection method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of storage technologies, and in particular, to a database detection method and apparatus, a computer device, and a storage medium.
Background
At present, data of real-time services of a clearing platform are stored in a MySQL database, and the real-time services are required to be guaranteed to be always stably operated, the number of database instances of the clearing platform is large, partial user payment is damaged if the operation is abnormal, and the health state of the operation of the database cannot be sensed if the operation is not checked, so that the abnormality of the database is possibly caused, and the services are also damaged.
In the related art, the database is generally not checked, or the database is checked manually only by node-checking partial items of the database at a special time, however, the check may affect the online service, and the general database architecture has diversity, many examples, manual check, many check items, high labor cost, long time consumption, and easy omission of partial check items, thereby resulting in service failure.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
The application provides a database detection method, a database detection device, computer equipment and a storage medium, which are used for solving the technical problems that the online service is influenced and has low efficiency and the service fails due to a database detection mode in the prior art.
An embodiment of a first aspect of the present application provides a database detection method, where the method includes the following steps:
acquiring all database IP identifications according to a preset period after the database is online;
acquiring a main database and a standby database corresponding to each database IP identification;
acquiring a current service processing state, and determining a target detection item according to the current service processing state;
and detecting the target detection item in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result.
As a first possible implementation manner in this embodiment of the present application, the method further includes:
acquiring all database IP identifications before the database is online;
acquiring a main database and a standby database corresponding to each database IP identification;
detecting the pre-detection items in parallel for the main database and the standby database corresponding to each database IP identification;
detecting the consistency between the main database and the standby database corresponding to each database IP identification;
and determining that the databases are normal and the main database and the standby database corresponding to the IP identification of each database are consistent according to the detection result of the pre-detection item, and controlling the databases to be online.
As a second possible implementation manner in this embodiment of the present application, the target detection item includes:
whether the monitoring item of each node is deployed, whether an abnormal monitoring item is processed, whether the monitoring item is not normally started, whether the parameter configuration of a bottom operating system is standardized, whether a whole set of database high-availability cluster is configured, whether the database parameter accords with standardization, whether a database parameter file accords with standardization, whether the synchronization state of a standby database is normal, whether a whole set of database log cleaning tasks are correctly deployed, whether a whole set of database global unique identification accords, and whether a whole set of database is correctly deployed for backup.
As a third possible implementation manner in this embodiment of the application, after the detecting the target detection item in parallel for the primary database and the standby database corresponding to each IP identifier of the database, the method further includes:
generating a detection report, and sending the detection report to a target terminal for display in a preset mode; wherein the detection comprises a detection result and comprises abnormal reason information when the detection result is abnormal.
As a fourth possible implementation manner in this embodiment of the application, after determining whether the primary database and the standby database corresponding to each database IP identifier are normal according to the detection result, the method further includes:
if the main database and the standby database corresponding to the database IP identification are determined to be abnormal according to the detection result, acquiring an abnormal grade;
and if the abnormal grade is a preset offline database grade, controlling the offline processing of the main database and the standby database corresponding to the IP identification of the database.
According to the database detection method, all database IP identifications are acquired according to a preset period after the database is online; acquiring a main database and a standby database corresponding to each database IP identification; acquiring a current service processing state, and determining a target detection item according to the current service processing state; and detecting the target detection items in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result. Therefore, the technical problems that the database detection mode influences the online service and is low in efficiency and the service fails in the prior art are solved, the detection item which cannot cause the influence of the real-time service can be detected according to the preset period when the database is in the online running state, the detection efficiency of the database is improved, and the condition that the service processing is wrong is avoided.
An embodiment of a second aspect of the present application provides a database detection apparatus, including:
the first acquisition module is used for acquiring all database IP identifications according to a preset period after the database is online;
the second acquisition module is used for acquiring the main database and the standby database corresponding to each database IP identification;
the determining module is used for acquiring the current service processing state and determining a target detection item according to the current service processing state;
the first detection module is used for detecting the target detection item in parallel for the main database and the standby database corresponding to each database IP identification;
and the processing module is used for determining whether the main database and the standby database corresponding to each database IP identification are normal or not according to the detection result.
As a first possible implementation manner in this embodiment of the application, the apparatus further includes:
the first obtaining module is further configured to obtain all the database IP identifiers before the database is online;
the second obtaining module is further configured to obtain a main database and a standby database corresponding to each database IP identifier;
the first detection module is further configured to perform parallel detection of a pre-detection item on the primary database and the standby database corresponding to each database IP identifier;
the second detection module is used for detecting the consistency between the main database and the standby database corresponding to each database IP identification;
and the first control module is used for determining that the databases are normal and the main database and the standby database corresponding to the IP identification of each database are consistent according to the detection result of the pre-detection item, and controlling the databases to be on-line.
As a third possible implementation manner in this embodiment of the application, the target detection item includes:
whether the monitoring item of each node is deployed, whether an abnormal monitoring item is processed, whether the monitoring item is not normally started, whether the parameter configuration of a bottom operating system is standardized, whether a whole set of database high-availability cluster is configured, whether the database parameter accords with standardization, whether a database parameter file accords with standardization, whether the synchronization state of a standby database is normal, whether a whole set of database log cleaning tasks are correctly deployed, whether a whole set of database global unique identification accords, and whether a whole set of database is correctly deployed for backup.
As a fourth possible implementation manner in this embodiment of the present application, the apparatus further includes:
the generation display module is used for generating a detection report and sending the detection report to a target terminal for display in a preset mode; wherein the detection comprises a detection result and comprises abnormal reason information when the detection result is abnormal.
As a sixth possible implementation manner in this embodiment of the present application, the apparatus further includes:
the determining and obtaining module is used for obtaining the abnormal grade if the main database and the standby database corresponding to the database IP identification are determined to be abnormal according to the detection result;
and the second control module is used for controlling the main database and the standby database corresponding to the IP identification of the database to be offline for processing if the abnormal grade is a preset offline database grade.
According to the database detection device, all database IP identifications are acquired according to a preset period after the database is online; acquiring a main database and a standby database corresponding to each database IP identification; acquiring a current service processing state, and determining a target detection item according to the current service processing state; and detecting the target detection items in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result. Therefore, the technical problems that the database detection mode influences the online service and is low in efficiency and the service fails in the prior art are solved, the detection item which cannot cause the influence of the real-time service can be detected according to the preset period when the database is in the online running state, the detection efficiency of the database is improved, and the condition that the service processing is wrong is avoided.
An embodiment of the third aspect of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the database detection method described in the foregoing embodiment is implemented.
A fourth aspect of the present application is directed to a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the database detection method as described in the foregoing embodiments.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
Fig. 1 is a schematic flow chart of a database detection method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of a database detection method according to another embodiment of the present application;
FIG. 3 is a schematic flow chart of a database detection method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a database detection apparatus according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a database detection apparatus according to another embodiment of the present application;
FIG. 6 is a schematic diagram of a database detection apparatus according to another embodiment of the present application;
FIG. 7 is a schematic diagram of a database detection apparatus according to yet another embodiment of the present application;
FIG. 8 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
A database detection method, an apparatus, a computer device, and a storage medium according to embodiments of the present application are described below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a database detection method according to an embodiment of the present application.
As shown in fig. 1, the database detection method includes the following steps:
step 101, acquiring all database IP identifications according to a preset period after a database is online.
And 102, acquiring a main database and a standby database corresponding to each database IP identification.
In practical application, the liquidation platform needs to process real-time services, and data for implementing the services are stored in each database, so that all database IP identifiers can be acquired according to a preset period, such as every several hours or every day, when each database is online, i.e., in an operating state, and it can be understood that each database identifier can search a whole set of databases (including a main database and a standby database). The preset period can be selected and set according to actual requirements for the application requirements of the database.
Further, after acquiring all the database IP identifiers, the primary database and the standby database corresponding to the database IP identifiers may be automatically acquired according to the database IP identifiers, it is understood that the primary database and the standby database may be both local or both in different places, or both local and different places, and one or more standby databases may be provided.
And 103, acquiring the current service processing state, and determining a target detection item according to the current service processing state.
Specifically, different business processing states may occupy the current processing resources and different databases, and therefore, the target detection item is determined according to the current business processing state, such as deduction of balance of a payment bank, increase of amount of money of a prepaid system, and the like.
Wherein, the target detection item comprises: whether the monitoring item of each node is deployed, whether an abnormal monitoring item is processed, whether the monitoring item is not normally started, whether the parameter configuration of a bottom operating system is standardized, whether a whole set of database high-availability cluster is configured, whether the database parameter accords with standardization, whether a database parameter file accords with standardization, whether the synchronization state of a standby database is normal, whether a whole set of database log cleaning tasks are correctly deployed, whether a whole set of database global unique identification accords, and whether a whole set of database is correctly deployed for backup.
Specifically, the monitoring item may be a CPU processing state, a thread, or the like, so that whether the database is abnormal or not can be known in time through monitoring of the monitoring item, and whether processing is performed in time when the monitoring item is abnormal or not is detected, whether the configuration of the parameters of the bottom operating system meets a preset operating system parameter configuration standard or not, whether the high-availability cluster of the whole set of database is configured or not, whether the parameters of the database meet the configuration standard of the parameters of the database or not, whether the parameter files of the database meet the configuration standard of the parameter files of the database or not, whether the standby database and the main database are synchronous and in a normal state or not, whether the log cleaning task of the whole set of database is deployed correctly, whether the global unique identifier of the whole set of database is consistent or not, whether.
Further, determining a target detection item according to the current service processing state, that is, determining a target detection item that does not affect the real-time service in the database, for example, when the current service processing state is 1, determining the target detection item as follows: the method comprises the following steps of monitoring availability check, monitoring unprocessed alarm, monitoring maintenance mode state, operating system configuration state, high-availability cluster state, database parameter file state, standby database synchronization state, log cleaning script state, gtid state and backup state.
And step 104, detecting the target detection items in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result.
Specifically, after the target detection items are determined, the detection of the target detection items is performed in parallel on the primary database and the standby database corresponding to each database IP identifier, and it can be understood that different target detection items correspond to different detection results.
And finally, analyzing and determining whether the main database and the standby database corresponding to each database IP identification are normal or not according to the detection result, for example, determining that the main database and the standby database corresponding to the database IP identification A are abnormal according to the monitoring of the monitoring item CPU in the database IP identification A.
According to the database detection method, all database IP identifications are acquired according to a preset period after the database is online; acquiring a main database and a standby database corresponding to each database IP identification; acquiring a current service processing state, and determining a target detection item according to the current service processing state; and detecting the target detection items in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result. Therefore, the technical problems that the database detection mode influences the online service and is low in efficiency and the service fails in the prior art are solved, the detection item which cannot cause the influence of the real-time service can be detected according to the preset period when the database is in the online running state, the detection efficiency of the database is improved, and the condition that the service processing is wrong is avoided.
Based on the description of the above embodiment, it can be understood that the detection is performed on the database after online, and in order to further improve the capability of the database to correctly process real-time services, the detection may be performed on the database before online, and the online of the database is controlled after the detection result meets the requirement, which is described in detail with reference to fig. 2.
Fig. 2 is a schematic flow chart of a database detection method according to another embodiment of the present application.
As shown in fig. 2, the database detection method includes the following steps:
step 201, acquiring all database IP identifications before online of the database.
Step 202, acquiring a primary database and a standby database corresponding to each database IP identification.
And step 203, detecting the pre-detection items in parallel for the main database and the standby database corresponding to each database IP identification.
In practical application, the liquidation platform needs to process real-time services, and data for implementing the services are stored in each database, so that all database IP identifiers can be acquired according to a preset period, such as every several hours or every day, when each database is online, i.e., in an operating state, and it can be understood that each database identifier can search a whole set of databases (including a main database and a standby database). The preset period can be selected and set according to actual requirements for the application requirements of the database.
Further, after acquiring all the database IP identifiers, the primary database and the standby database corresponding to the database IP identifiers may be automatically acquired according to the database IP identifiers, it is understood that the primary database and the standby database may be both local or both in different places, or both local and different places, and one or more standby databases may be provided.
Further, the primary database and the standby database corresponding to each database IP identifier are concurrently subjected to detection of a pre-detection item, where the pre-detection item may be a detection item that knows the state of the database to the greatest extent possible, and may be selected as needed, such as monitoring availability check, monitoring unprocessed alarm, monitoring maintenance mode state, operating system configuration state, high-availability cluster state, database parameter file state, standby database synchronization state, cleaning log script state, gtid state, backup state, and the like.
Step 204, detecting the consistency between the primary database and the standby database corresponding to each database IP identification.
And step 205, determining that the databases are normal and the main database and the standby database corresponding to each database IP identification are consistent according to the detection result of the pre-detection item, and controlling the databases to be online.
Specifically, consistency between the main database and the standby database corresponding to each database IP identifier needs to be detected, so as to ensure accuracy of service processing, and finally, it is determined that the databases are normal and consistent between the main database and the standby database corresponding to each database IP identifier according to a detection result of a pre-detection item, so as to control the databases to be online.
Therefore, the database detection efficiency is further improved, and the condition that errors occur in service processing is avoided.
Fig. 3 is a schematic flow chart of a database detection method according to another embodiment of the present application.
As shown in fig. 3, after the parallel detection of the target detection item is performed on the primary database and the standby database corresponding to each database IP identifier, the database detection method further includes:
step 301, generating a detection report, and sending the detection report to a target terminal for display in a preset manner; the detection comprises a detection result and comprises abnormal reason information when the detection result is abnormal.
Specifically, after the detection, a detection report may be generated, and the detection report is sent to a target terminal, such as a display device of a mobile phone, for display in a preset manner, such as a mail, a message, and the like; the detection comprises a detection result and comprises abnormal reason information when the detection result is abnormal, so that the abnormal reason information can be quickly known and relevant processing can be carried out when the abnormality exists, the service processing efficiency is ensured, for example, the inspection result is printed and sent to a mail, if the "OK" is normally displayed, if the "ERROR" is abnormally displayed, and the abnormal reason information is displayed.
And step 302, determining whether the main database and the standby database corresponding to each database IP identification are normal or not according to the detection result.
Step 303, if it is determined that there is an abnormality in the primary database and the backup database corresponding to the database IP identifier according to the detection result, obtaining an abnormality level.
And step 304, if the abnormal grade is the preset offline database grade, controlling the offline processing of the main database and the standby database corresponding to the IP identification of the database.
Specifically, the method comprises the steps of determining that a main database and a standby database corresponding to a database IP identification are abnormal, determining an abnormal grade, and controlling the main database and the standby database corresponding to the database IP identification to be offline for processing if the abnormal grade is a preset offline database grade. The preset offline database level can be set according to the database operation requirement, the current environment and the like, so that the safety of service processing is further improved.
From this, to online real-time service, through automatic inspection item procedure, regularly inspect the inspection item that can not cause real-time service to be influenced every day, can the maximize know the state of database, really realize database health check automation, it is high to solve the human cost, it is long consuming time, the problem that the inspection error leads to the business to be influenced, hidden danger appears in the database promptly, can know in advance, very big improvement data security and stability grade, also avoided the inspection incomplete, the influence that inspection error etc. caused to online service.
In order to implement the above embodiments, the present application further provides a database detection apparatus.
As shown in fig. 4, the database detection apparatus includes: a first acquisition module 401, a second acquisition module 402, a determination module 403, a first detection module 404 and a processing module 405.
The first obtaining module 401 is configured to obtain all database IP identifiers according to a preset period after the database is online.
A second obtaining module 402, configured to obtain a primary database and a standby database corresponding to each database IP identifier.
The determining module 403 is configured to obtain a current service processing state, and determine a target detection item according to the current service processing state.
A first detection module 404, configured to perform detection on the target detection item in parallel for the primary database and the standby database corresponding to each database IP identifier.
And the processing module 405 is configured to determine whether the primary database and the standby database corresponding to each database IP identifier are normal according to the detection result.
As a possible implementation manner, as shown in fig. 5, on the basis of fig. 4, the database detection apparatus further includes: a second detection module 406 and a first control module 407.
The first obtaining module 401 is further configured to obtain all the database IP identifiers before the database is online;
the second obtaining module 402 is further configured to obtain a primary database and a standby database corresponding to each database IP identifier;
the first detection module 404 is further configured to perform detection of a pre-detection item in parallel on the primary database and the standby database corresponding to each database IP identifier;
a second detecting module 406, configured to detect consistency between the primary database and the standby database corresponding to each database IP identifier;
and the first control module 407 is configured to determine that the databases are normal and the primary database and the standby database corresponding to the IP identifier of each database are consistent according to the detection result of the pre-detection item, and control the databases to be online.
As a possible implementation manner, the target detection item includes: whether the monitoring item of each node is deployed, whether an abnormal monitoring item is processed, whether the monitoring item is not normally started, whether the parameter configuration of a bottom operating system is standardized, whether a whole set of database high-availability cluster is configured, whether the database parameter accords with standardization, whether a database parameter file accords with standardization, whether the synchronization state of a standby database is normal, whether a whole set of database log cleaning tasks are correctly deployed, whether a whole set of database global unique identification accords, and whether a whole set of database is correctly deployed for backup.
As a possible implementation manner, as shown in fig. 6, on the basis of fig. 4, the database detection apparatus further includes: a display module 408 is generated.
The generation and display module 408 is configured to generate a detection report, and send the detection report to a target terminal in a preset manner for display; wherein the detection comprises a detection result and comprises abnormal reason information when the detection result is abnormal.
As another possible implementation manner, as shown in fig. 7, on the basis of fig. 4, the method further includes: a determination acquisition module 409 and a second control module 410.
And a determining and obtaining module 409, configured to obtain an exception level if it is determined according to the detection result that the primary database and the standby database corresponding to the database IP identifier are abnormal.
And a second control module 410, configured to control the main database and the standby database corresponding to the IP identifier of the database to be offline for processing if the abnormal level is a preset offline database level.
It should be noted that the explanation of the embodiment of the database detection method is also applicable to the apparatus of the embodiment, and is not repeated herein.
According to the database detection device, all database IP identifications are acquired according to a preset period after the database is online; acquiring a main database and a standby database corresponding to each database IP identification; acquiring a current service processing state, and determining a target detection item according to the current service processing state; and detecting the target detection items in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result. Therefore, the technical problems that the database detection mode influences the online service and is low in efficiency and the service fails in the prior art are solved, the detection item which cannot cause the influence of the real-time service can be detected according to the preset period when the database is in the online running state, the detection efficiency of the database is improved, and the condition that the service processing is wrong is avoided.
In order to implement the foregoing embodiments, the present application also proposes a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the database detection method as described in the foregoing embodiments is implemented.
In order to implement the above embodiments, the present application also proposes a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the database detection method as described in the above embodiments.
FIG. 8 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application. The computer device 12 shown in fig. 8 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present application.
As shown in FIG. 8, computer device 12 is in the form of a general purpose computing device. The components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. These architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus, to name a few.
Computer device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. Computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk Read Only memory (CD-ROM), a Digital versatile disk Read Only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally perform the functions and/or methodologies of the embodiments described herein.
Computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with computer device 12, and/or with any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via Network adapter 20. As shown, network adapter 20 communicates with the other modules of computer device 12 via bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing the database detection method mentioned in the foregoing embodiments.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A database detection method is characterized by comprising the following steps:
acquiring all database IP identifications according to a preset period after the database is online;
acquiring a main database and a standby database corresponding to each database IP identification;
acquiring a current service processing state, and determining a target detection item according to the current service processing state;
and detecting the target detection item in parallel for the main database and the standby database corresponding to each database IP identification, and determining whether the main database and the standby database corresponding to each database IP identification are normal according to the detection result.
2. The method of claim 1, further comprising:
acquiring all database IP identifications before the database is online;
acquiring a main database and a standby database corresponding to each database IP identification;
detecting the pre-detection items in parallel for the main database and the standby database corresponding to each database IP identification;
detecting the consistency between the main database and the standby database corresponding to each database IP identification;
and determining that the databases are normal and the main database and the standby database corresponding to the IP identification of each database are consistent according to the detection result of the pre-detection item, and controlling the databases to be online.
3. The method of claim 1, wherein the target detection items comprise:
whether the monitoring item of each node is deployed, whether an abnormal monitoring item is processed, whether the monitoring item is not normally started, whether the parameter configuration of a bottom operating system is standardized, whether a whole set of database high-availability cluster is configured, whether the database parameter accords with standardization, whether a database parameter file accords with standardization, whether the synchronization state of a standby database is normal, whether a whole set of database log cleaning tasks are correctly deployed, whether a whole set of database global unique identification accords, and whether a whole set of database is correctly deployed for backup.
4. The method of claim 1, wherein after the parallel detection of the target detection item for the primary database and the backup database corresponding to each database IP identifier, the method further comprises:
generating a detection report, and sending the detection report to a target terminal for display in a preset mode; wherein the detection comprises a detection result and comprises abnormal reason information when the detection result is abnormal.
5. The method of claim 1, wherein after determining whether the primary database and the backup database corresponding to each database IP identifier are normal according to the detection result, the method further comprises:
if the main database and the standby database corresponding to the database IP identification are determined to be abnormal according to the detection result, acquiring an abnormal grade;
and if the abnormal grade is a preset offline database grade, controlling the offline processing of the main database and the standby database corresponding to the IP identification of the database.
6. A database inspection apparatus, comprising:
the first acquisition module is used for acquiring all database IP identifications according to a preset period after the database is online;
the second acquisition module is used for acquiring the main database and the standby database corresponding to each database IP identification;
the determining module is used for acquiring the current service processing state and determining a target detection item according to the current service processing state;
the first detection module is used for detecting the target detection item in parallel for the main database and the standby database corresponding to each database IP identification;
and the processing module is used for determining whether the main database and the standby database corresponding to each database IP identification are normal or not according to the detection result.
7. The apparatus of claim 6, further comprising:
the first obtaining module is further configured to obtain all the database IP identifiers before the database is online;
the second obtaining module is further configured to obtain a main database and a standby database corresponding to each database IP identifier;
the first detection module is further configured to perform parallel detection of a pre-detection item on the primary database and the standby database corresponding to each database IP identifier;
the second detection module is used for detecting the consistency between the main database and the standby database corresponding to each database IP identification;
and the first control module is used for determining that the databases are normal and the main database and the standby database corresponding to the IP identification of each database are consistent according to the detection result of the pre-detection item, and controlling the databases to be on-line.
8. The apparatus of claim 6, further comprising:
the generation display module is used for generating a detection report and sending the detection report to a target terminal for display in a preset mode; wherein the detection comprises a detection result and comprises abnormal reason information when the detection result is abnormal.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the database detection method as claimed in any one of claims 1 to 5 when executing the program.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the program, when executed by a processor, implements the database detection method according to any one of claims 1 to 5.
CN201910962354.7A 2019-10-11 2019-10-11 Database detection method and device, computer equipment and storage medium Pending CN110874311A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910962354.7A CN110874311A (en) 2019-10-11 2019-10-11 Database detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910962354.7A CN110874311A (en) 2019-10-11 2019-10-11 Database detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110874311A true CN110874311A (en) 2020-03-10

Family

ID=69717798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910962354.7A Pending CN110874311A (en) 2019-10-11 2019-10-11 Database detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110874311A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112231694A (en) * 2020-10-27 2021-01-15 北京人大金仓信息技术股份有限公司 Database detection method, device, equipment and medium
CN113765687A (en) * 2020-06-05 2021-12-07 网联清算有限公司 Fault alarm method, device, equipment and storage medium of server
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491422A (en) * 2018-02-07 2018-09-04 平安健康互联网股份有限公司 Data base automatic operation management method, server and storage medium
CN108833131A (en) * 2018-04-25 2018-11-16 北京百度网讯科技有限公司 System, method, equipment and the computer storage medium of distributed data base cloud service
CN109032824A (en) * 2018-05-31 2018-12-18 康键信息技术(深圳)有限公司 Database method of calibration, device, computer equipment and storage medium
CN109508277A (en) * 2018-11-13 2019-03-22 郑州云海信息技术有限公司 A kind of monitoring system and method for database all-in-one machine
CN109739831A (en) * 2018-11-23 2019-05-10 网联清算有限公司 Data verification method and device between database

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108491422A (en) * 2018-02-07 2018-09-04 平安健康互联网股份有限公司 Data base automatic operation management method, server and storage medium
CN108833131A (en) * 2018-04-25 2018-11-16 北京百度网讯科技有限公司 System, method, equipment and the computer storage medium of distributed data base cloud service
CN109032824A (en) * 2018-05-31 2018-12-18 康键信息技术(深圳)有限公司 Database method of calibration, device, computer equipment and storage medium
CN109508277A (en) * 2018-11-13 2019-03-22 郑州云海信息技术有限公司 A kind of monitoring system and method for database all-in-one machine
CN109739831A (en) * 2018-11-23 2019-05-10 网联清算有限公司 Data verification method and device between database

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113765687A (en) * 2020-06-05 2021-12-07 网联清算有限公司 Fault alarm method, device, equipment and storage medium of server
CN113765687B (en) * 2020-06-05 2023-08-01 网联清算有限公司 Fault alarm method, device and equipment of server and storage medium
CN112231694A (en) * 2020-10-27 2021-01-15 北京人大金仓信息技术股份有限公司 Database detection method, device, equipment and medium
CN114531492A (en) * 2020-11-05 2022-05-24 网联清算有限公司 Service calling method and device, storage medium and computer equipment
CN114531492B (en) * 2020-11-05 2024-05-10 网联清算有限公司 Service calling method, device, storage medium and computer equipment

Similar Documents

Publication Publication Date Title
CN110874311A (en) Database detection method and device, computer equipment and storage medium
US7814369B2 (en) System and method for detecting combinations of perfomance indicators associated with a root cause
CN112486629B (en) Micro-service state detection method, micro-service state detection device, electronic equipment and storage medium
CN110888776A (en) Database health state detection method, device and equipment
CN110324207B (en) Detection method and device for data acquisition terminal
CN107632909B (en) Method and system for automatically testing device functions
US20100251029A1 (en) Implementing self-optimizing ipl diagnostic mode
EP3022625A1 (en) Determine malfunction state of power supply module
CN110069382B (en) Software monitoring method, server, terminal device, computer device and medium
CN109144874B (en) Method and device for monitoring test environment
CN115525568A (en) Code coverage rate inspection method and device, computer equipment and storage medium
CN110909378A (en) Automatic detection method and device, storage medium and electronic equipment
CN115934453A (en) Troubleshooting method, troubleshooting device and storage medium
CN110752950A (en) Update detection method and device for cloud resource pool and terminal equipment
CN111737132B (en) Method, system, electronic device and storage medium for issuing project code data
CN115454954B (en) Data processing method, system and device and electronic equipment
CN117055718B (en) System, method, device, equipment and storage medium for detecting power consumption of server
CN114124897B (en) CDN node control method and device, electronic equipment and readable storage medium
CN117453567A (en) Chaos testing method, device and equipment
CN117149492A (en) Server fault detection method, device, equipment and computer storage medium
CN118012702A (en) Temperature monitoring method and device
CN118012698A (en) Application data acquisition method, application monitoring method, electronic equipment and medium
JP2024015673A (en) Monitoring support device, monitoring support method, and program
CN117687853A (en) Firmware detection method, device, equipment and medium
CN115657633A (en) Electronic control unit electric detection method and device, storage medium and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200310

RJ01 Rejection of invention patent application after publication