WO2018214320A1 - Database service logic monitoring method and system, and storage medium - Google Patents

Database service logic monitoring method and system, and storage medium Download PDF

Info

Publication number
WO2018214320A1
WO2018214320A1 PCT/CN2017/099334 CN2017099334W WO2018214320A1 WO 2018214320 A1 WO2018214320 A1 WO 2018214320A1 CN 2017099334 W CN2017099334 W CN 2017099334W WO 2018214320 A1 WO2018214320 A1 WO 2018214320A1
Authority
WO
WIPO (PCT)
Prior art keywords
monitoring
item
alarm
database
preset
Prior art date
Application number
PCT/CN2017/099334
Other languages
French (fr)
Chinese (zh)
Inventor
陈莹
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018214320A1 publication Critical patent/WO2018214320A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data

Definitions

  • the present invention relates to the field of database monitoring technologies, and in particular, to a database service logic monitoring method, system, and storage medium.
  • the monitoring of the database is to monitor the running performance of the database.
  • the major database vendors provide relevant performance management views and troubleshooting commands to the database operation and maintenance personnel.
  • U.S. personnel manage and check database business logic problems.
  • O&M personnel it is often difficult for O&M personnel to detect and generate data anomalies and timely alarms in the database when managing and checking database business logic problems. Stability.
  • the main purpose of the present invention is to provide a database service logic monitoring method, system, and storage medium, which aims to solve the technical problem that it is difficult to timely discover data abnormalities and timely alarms generated by the database in the prior art, thereby affecting database stability.
  • the present invention provides a database service logic monitoring method, and the database business logic monitoring method includes:
  • the monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
  • the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
  • the present invention further provides a database business logic monitoring system, the database business logic monitoring system comprising: a memory, a processor, and a database stored on the memory and operable on the processor
  • the business logic monitor program when the database business logic monitor program is executed by the processor, implements the following steps:
  • the monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
  • the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
  • the present invention further provides a storage medium, where the database business logic monitoring program is stored, and the database business logic monitoring program is executed by the processor to implement the following steps:
  • the monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
  • the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
  • the database business logic monitoring method, system and storage medium provided by the invention can realize: performing business logic monitoring on the monitoring items written in the monitoring task table within a set time, and writing the business logic monitoring result
  • the monitoring data table is entered, and the monitoring data table is scanned at a certain time to obtain abnormal data.
  • the alarm is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data.
  • the present invention can automatically monitor the abnormal data generated in the database and perform alarm processing, which solves the technical problem that it is difficult to timely discover the data abnormality and timely alarm generated by the database in the prior art. Improve the stability of the database.
  • FIG. 1 is a schematic flowchart of a first embodiment of a database service logic monitoring method according to the present invention
  • FIG. 2 is a schematic diagram of a system structure of a software running environment involved in a database service logic monitoring system according to the present invention.
  • the invention provides a database business logic monitoring method, in which a business logic monitoring is performed on a monitoring item written in a monitoring task table within a set time, and a business logic monitoring result is written into a monitoring data table, and The monitoring data table is scanned at a certain time to obtain abnormal data.
  • the abnormal data matches the preset alarm condition, the configuration information required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data.
  • the alarm processing is performed, that is, the invention can automatically monitor the abnormal data generated in the database, and perform alarm processing, without requiring personnel to participate, saving time and effort.
  • the database service logic monitoring method includes:
  • step S10 a monitoring item that needs to be monitored is generated every first set time, and is written into the monitoring item task table.
  • the monitoring platform needs to add a new monitoring item.
  • the dml (DatamanIpulationLanguage, data manipulation language) scripting language is added to the monitor item base table monitor_tbl.
  • the monitoring item base table monitor_tbl is mainly used to record the execution time of the monitoring item, the monitoring frequency, and the configuration information required by the monitoring platform for subsequent monitoring and processing, such as the monitoring item name, detailed description information, effective time, expiration time, monitoring keyword, Alarm mode, alarm, frequency, running time period, non-running time period, monitoring type, alarm level, etc.
  • the above monitoring platform may preferably be an Elis monitoring platform.
  • the database JOB function is started every first set time (for example, at 22 o'clock every day), and the monitoring items that need to be monitored are uniformly generated, and the monitoring item task table is written.
  • Step S20 Start the monitoring item, and determine whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, perform business logic monitoring on the monitoring item.
  • the monitoring item is started periodically, and it is determined whether the monitoring item is currently in the ready state. If the monitoring item is currently in the ready state, the monitoring item is monitored by the service logic.
  • the process of determining whether the monitoring item is currently in the ready state is: first determining whether the current monitoring platform is in an open state. If the current monitoring platform is in an open state, determining whether the monitoring module corresponding to the monitoring platform and the monitoring function corresponding to the monitoring module are Normally, if the monitoring module corresponding to the monitoring platform and the monitoring function corresponding to the monitoring module can work normally, it is determined that the monitoring item is currently in the ready state; otherwise, the monitoring item is considered to be not ready, and the monitoring item monitoring task is directly ended. .
  • the step of starting the foregoing monitoring item includes:
  • the monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
  • the monitoring item can be started to be activated at any time point or time period to monitor the business logic of the database. For example, it is set to start the above monitoring items at 23 o'clock every night, monitor the business logic of the database, and then set the monitoring duration. For example, after the time of starting the above monitoring items reaches half an hour, the monitoring items are closed.
  • the monitoring item may be started at regular intervals, for example, the monitoring item is started every hour, and the monitoring item is turned off after the monitoring item is started for half an hour.
  • the startup time period may also be set.
  • the monitoring item is started.
  • the startup time period is set to be from 8:00 am to 6:00 pm, during the startup time period. Start the above monitoring items.
  • the business logic monitoring task of the monitoring item in the monitoring item task table is uniformly scheduled by the database JOB function.
  • Step S30 the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period.
  • the service logic monitoring result is written into the monitoring data table by calling the corresponding interface of the monitoring platform, and the monitoring data table is scanned every second set time (for example, every 2 minutes) to obtain the setting.
  • Abnormal data within a time period eg, within the current time to 2 minutes before the current time).
  • step S40 it is determined whether the abnormal data matches the preset alarm condition.
  • the alarm processing station is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data.
  • the required configuration information is used to perform alarm processing according to the configuration information.
  • the abnormal data after the abnormal data is obtained, it is determined whether the abnormal data matches the preset alarm condition. If the abnormal data is matched, the configuration required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data. The information is processed and alarmed; otherwise, the monitoring item monitoring task is directly ended.
  • the database service logic monitoring method described in this embodiment performs business logic monitoring on the monitoring items written in the monitoring task table within a set time, and writes the business logic monitoring result into the monitoring data table, and at a certain time The time is scanned for the monitoring data table to obtain the abnormal data.
  • the abnormal data matches the preset alarm condition, the configuration information required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data, and the alarm is generated.
  • the invention can automatically monitor the abnormal data generated in the database and perform alarm processing, which solves the technical problem that it is difficult to timely discover the data abnormality and timely alarm generated by the database in the prior art, and improves the stability of the database.
  • the service logic monitoring result is written in the monitoring data table as described in step S30 of FIG.
  • the steps also include:
  • the business logic monitoring result is written into a pre-established monitoring detail data table.
  • the monitoring detail data table is mainly used to record detailed information corresponding to the abnormal data, such as the serial number, the error information, the execution user, the execution time, the SID of the running database JOB, the monitoring item ID, and the like.
  • the method further includes:
  • the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
  • the monitoring data table and/or the monitoring detail data table may be derived.
  • the monitoring data table includes at least one of a startup time, a monitoring frequency, and a monitoring state of the monitoring item.
  • the monitoring data table further includes a serial number, a monitoring item ID, a batch execution identifier, and a batch processing start time. , batch processing end time, business processing start time, business processing end time, number of pieces, amount, execution user, execution time, exception identifier, SID of running database JOB, execution result summary information, processing status, and so on.
  • the database service logic monitoring method in this embodiment also writes the service logic monitoring result into the pre-established monitoring detail data table, and after performing the alarm processing, may select to export the monitoring data table and/or the monitoring details.
  • the data table facilitates the database operation and maintenance technician information to understand the database abnormal data, which greatly improves the operation and maintenance work efficiency and saves labor costs.
  • the abnormal data and the preset alarm condition are determined in step S40 shown in FIG.
  • the steps to match are:
  • the second threshold value when the quantity value corresponding to the abnormal data is greater than a preset first threshold, and the data item specified in the abnormal data is greater than a preset second threshold, determining the abnormal data and the preset alarm condition Or matching, or determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, or determining whether the data item specified in the abnormal data is greater than a preset second threshold, when the abnormal data corresponds to When the quantity value is greater than the preset first threshold, or the data item specified in the abnormal data is greater than the preset second threshold, it is determined that the abnormal data matches the preset alarm condition.
  • the proc_count and proc_premium fields in the database can be used to control the threshold, wherein proc_count is used to control the quantity value corresponding to the abnormal data, and proc_premium is used to control the data item (such as the sales amount) specified in the abnormal data.
  • the configuration format of the configuration item is: proc_count>n or proc_premium>nm. For example, if a monitoring item is for monitoring the non-distributed file, you need to set the alarm to "proc_count>5". .
  • the threshold value corresponding to the quantity value corresponding to the abnormal data and the data item specified in the abnormal data may be simultaneously monitored. For example, if a monitoring item is used to monitor the situation of non-distribution, it needs to be alarmed if the number of undistributed disks exceeds 5 and the amount exceeds 1000.0, then configure ("proc_count>5 And Proc_premium>1000.0)"; In addition, it is also possible to perform threshold monitoring on the quantity value corresponding to the abnormal data or the data item specified in the abnormal data. For example, if the number of undistributed disks exceeds 5 or the amount exceeds 1000.0, the alarm is configured. for "(proc_count>5 or proc_premium>1000.0)".
  • the database service logic monitoring method in this embodiment determines the abnormality when the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or the data item specified in the abnormal data is greater than a preset second threshold.
  • the data is matched with the preset alarm condition, wherein the first threshold and the second threshold are set by the operation and maintenance personnel according to actual needs, thereby arbitrarily adjusting the accuracy of the database service logic monitoring.
  • the alarm level of the monitoring platform can be configured in advance from high to low as CRITICAL, MAJOR, MINOR, WARNING, and INFO.
  • step of performing alarm processing according to the alarm level includes:
  • the alarm processing with a high alarm level is prioritized.
  • the alarm manner corresponding to the alarm processing includes one or more of an email alarm, a call alarm, and an automatic transfer IT service management system alarm.
  • the alarm mode corresponding to the alarm processing includes: 1-mail, 2-call (telephone), 3-automatic transfer ITSM (IT) ServiceManagement, IT Service Management) system. You can choose one of the alarm modes, or you can select one of the two alarm modes, or select the three alarm modes to select at the same time.
  • the alarm manner corresponding to the foregoing alarm processing further includes: 4-message subscription, and 5-custom script alarm mode.
  • the database service logic monitoring method in this embodiment needs to determine the alarm level corresponding to the alarm processing before performing alarm processing, and then perform alarm processing according to the alarm level, wherein the alarm processing is queued at any time point.
  • the alarm processing with a high alarm level is preferentially performed.
  • the alarm processing corresponding to the alarm processing includes one or more of email alarm, call alarm, and automatic transfer of IT service management system alarms. That is, in this embodiment, when a large number of alarm processes are generated, the alarm processing with a higher alarm level can be preferentially performed, thereby minimizing the loss caused by the database abnormal data and ensuring the stability of the database operation.
  • the present invention also provides a database business logic monitoring system, the system comprising: a memory, a processor, and a database business logic monitoring program stored on the memory and operable on the processor; the system can implement: Within a certain period of time, the business logic of the monitoring items written in the monitoring task table is monitored, and the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned at regular intervals to obtain abnormal data. When the abnormal data matches the preset alarm condition, the configuration information required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data, and the alarm processing is performed, that is, the present invention can automatically monitor the abnormal data generated in the database. And the alarm processing solves the technical problem that it is difficult to timely discover the data abnormality and timely alarm generated by the database in the prior art, and improves the stability of the database.
  • the monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
  • the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
  • step of starting the monitoring item includes:
  • the monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
  • step of writing the service logic monitoring result to the monitoring data table further includes:
  • the business logic monitoring result is written into a pre-established monitoring detail data table.
  • the step of determining whether the abnormal data matches a preset alarm condition comprises:
  • the step of performing alarm processing according to the configuration information includes:
  • the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
  • step of performing alarm processing according to the alarm level includes:
  • the alarm processing with a high alarm level is prioritized.
  • the alarm manner corresponding to the alarm processing includes one or more of an email alarm, a call alarm, and an automatic transfer IT service management system alarm.
  • FIG. 2 is a schematic diagram of a system structure of a software running environment involved in a database service logic monitoring system according to the present invention.
  • the database service logic monitoring system may include: a processor 1001, For example, CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.
  • the communication bus 1002 is configured to implement connection communication between the components;
  • the user interface 1003 may include a display, an input unit such as a keyboard, and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile) Memory, such as a disk storage; the memory 1005 may alternatively be a storage device independent of the processor 1001 described above.
  • a wireless interface such as a WI-FI interface
  • the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile) Memory, such as a disk storage; the memory 1005 may alternatively be a storage device independent of the processor 1001 described above.
  • FIG. 2 does not constitute a limitation to the above described system, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements.
  • a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a database service logic monitor program.
  • the network interface 1004 is mainly used to connect to a background server for data communication with a background server;
  • the user interface 1003 is mainly used to connect a client (user end) to perform data communication with the client; and the processor 1001 can use
  • the database business logic monitor program stored in the memory 1005 is called and the corresponding operation is performed.
  • the embodiments of the database service logic monitoring system are basically the same as the corresponding embodiments of the database service logic monitoring method, and therefore are not described here.
  • the present invention further provides a storage medium, wherein the storage medium stores a database service logic monitoring program, and the storage medium can implement: performing service logic monitoring on the monitoring items written in the monitoring task table within a set time, And the service logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned at a certain time to obtain abnormal data.
  • the abnormal data matches the preset alarm condition, the monitoring item is corresponding according to the abnormal data.
  • the serial number ID obtains the configuration information required for the alarm processing and performs alarm processing. That is, the present invention can automatically monitor the abnormal data generated in the database and perform alarm processing, which solves the problem that it is difficult to timely discover the data generated by the database in the prior art. And the technical problems of timely warnings improve the stability of the database.
  • the monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
  • the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
  • step of starting the monitoring item includes:
  • the monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
  • step of writing the service logic monitoring result to the monitoring data table further includes:
  • the business logic monitoring result is written into a pre-established monitoring detail data table.
  • the step of determining whether the abnormal data matches a preset alarm condition comprises:
  • the step of performing alarm processing according to the configuration information includes:
  • the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
  • step of performing alarm processing according to the alarm level includes:
  • the alarm processing with a high alarm level is prioritized.
  • the alarm manner corresponding to the alarm processing includes one or more of an email alarm, a call alarm, and an automatic transfer IT service management system alarm.
  • the embodiments corresponding to the storage medium are basically the same as the corresponding embodiments of the foregoing database service logic monitoring method, and therefore are not described herein again.

Abstract

Disclosed is a database service logic monitoring method, comprising: performing service logic monitoring on monitoring items written in a monitoring task table in a set time; writing the service logic monitoring result in a monitoring data table; scanning the monitoring data table every specific time to obtain abnormal data; and if the abnormal data matches with a preset warning condition, obtaining, according to the serial number ID of the monitoring item corresponding to the abnormal data, configuration information required for warning processing and performing the warning processing. Also disclosed are a database service logic monitoring system and a storage medium. According to the present invention, the abnormal data generated in a database can be automatically monitored and the warning processing is performed, so that the technical problem in the prior art that it is difficulty in timely discovery of data exception generated in the database and timely warning is solved, and the database stability is improved.

Description

数据库业务逻辑监控方法、系统、及存储介质  Database business logic monitoring method, system, and storage medium
本申请要求于2017年5月22日提交中国专利局、申请号为201710367166.0、发明名称为“数据库业务逻辑监控方法、系统、及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of the Chinese Patent Application filed on May 22, 2017, the Chinese Patent Office, the application number is 201710367166.0, and the invention is entitled "Database Business Logic Monitoring Method, System, and Storage Medium", the entire contents of which are incorporated by reference. In the application.
技术领域Technical field
本发明涉及数据库监控技术领域,尤其涉及一种数据库业务逻辑监控方法、系统、及存储介质。The present invention relates to the field of database monitoring technologies, and in particular, to a database service logic monitoring method, system, and storage medium.
背景技术Background technique
对一个实时数据库系统而言,进行系统运行状态的监控是非常有必要的,建立一套数据库实时自动的监控系统,不但能减轻运维人员的工作压力,提高管理水平,同时也可增强数据库的稳定性。For a real-time database system, it is very necessary to monitor the running status of the system. Establishing a real-time automatic monitoring system for the database can not only reduce the work pressure of the operation and maintenance personnel, improve the management level, but also enhance the database. stability.
现阶段,对数据库的监控都是对于数据库运行性能的监控,而对于数据库业务逻辑的监控,各大数据库厂商都是通过向数据库运维人员提供相关的性能管理视图、以及故障排查命令,由运维人员管理、检查数据库业务逻辑问题,但随着数据库中数据量的不断增多,运维人员在管理、检查数据库业务逻辑问题时,往往难以及时发现数据库产生的数据异常和及时告警,从而影响数据库的稳定性。At this stage, the monitoring of the database is to monitor the running performance of the database. For the monitoring of the database business logic, the major database vendors provide relevant performance management views and troubleshooting commands to the database operation and maintenance personnel. U.S. personnel manage and check database business logic problems. However, as the amount of data in the database increases, it is often difficult for O&M personnel to detect and generate data anomalies and timely alarms in the database when managing and checking database business logic problems. Stability.
发明内容Summary of the invention
本发明的主要目的在于提出一种数据库业务逻辑监控方法、系统、及存储介质,旨在解决现有技术中难以及时发现数据库产生的数据异常和及时告警,从而影响数据库稳定性的技术问题。The main purpose of the present invention is to provide a database service logic monitoring method, system, and storage medium, which aims to solve the technical problem that it is difficult to timely discover data abnormalities and timely alarms generated by the database in the prior art, thereby affecting database stability.
为实现上述目的,本发明提供一种数据库业务逻辑监控方法,所述数据库业务逻辑监控方法包括:To achieve the above objective, the present invention provides a database service logic monitoring method, and the database business logic monitoring method includes:
每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information. .
此外,为实现上述目的,本发明还提供一种数据库业务逻辑监控系统,所述数据库业务逻辑监控系统包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据库业务逻辑监控程序,所述数据库业务逻辑监控程序被所述处理器执行时实现如下步骤:In addition, in order to achieve the above object, the present invention further provides a database business logic monitoring system, the database business logic monitoring system comprising: a memory, a processor, and a database stored on the memory and operable on the processor The business logic monitor program, when the database business logic monitor program is executed by the processor, implements the following steps:
每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information.
此外,为实现上述目的,本发明还提供一种存储介质,所述存储介质上存储有数据库业务逻辑监控程序,所述数据库业务逻辑监控程序被处理器执行时实现如下步骤:In addition, in order to achieve the above object, the present invention further provides a storage medium, where the database business logic monitoring program is stored, and the database business logic monitoring program is executed by the processor to implement the following steps:
每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information.
本发明提供的一种数据库业务逻辑监控方法、系统、及存储介质,可实现:在设定的时间内,对监控任务表中写入的监控项进行业务逻辑监控,并将业务逻辑监控结果写入监控数据表,并每隔一定的时间扫描该监控数据表,获取异常数据,当该异常数据与预设的告警条件相匹配时,则根据该异常数据对应监控项的序列号ID,获取告警处理所需的配置信息并进行告警处理,即本发明可以自动监控数据库中产生的异常数据,并进行告警处理,解决了现有技术中难以及时发现数据库产生的数据异常和及时告警的技术问题,提升了数据库的稳定性。The database business logic monitoring method, system and storage medium provided by the invention can realize: performing business logic monitoring on the monitoring items written in the monitoring task table within a set time, and writing the business logic monitoring result The monitoring data table is entered, and the monitoring data table is scanned at a certain time to obtain abnormal data. When the abnormal data matches the preset alarm condition, the alarm is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data. The present invention can automatically monitor the abnormal data generated in the database and perform alarm processing, which solves the technical problem that it is difficult to timely discover the data abnormality and timely alarm generated by the database in the prior art. Improve the stability of the database.
附图说明DRAWINGS
图1为本发明数据库业务逻辑监控方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a database service logic monitoring method according to the present invention;
图2为本发明数据库业务逻辑监控系统涉及的软件运行环境的系统结构示意图。2 is a schematic diagram of a system structure of a software running environment involved in a database service logic monitoring system according to the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
具体实施方式detailed description
以下结合说明书附图对本发明的优选实施例进行说明,应当理解,此处所描述的优选实施例仅用于说明和解释本发明,并不用于限定本发明,并且在不冲突的情况下,本发明中的实施例及实施例中的特征可以相互组合。The preferred embodiments of the present invention are described in conjunction with the accompanying drawings, and the preferred embodiments described herein are intended to illustrate and explain the invention, and not to limit the invention, and The embodiments and the features in the embodiments can be combined with each other.
本发明提供一种数据库业务逻辑监控方法,该方法中,在设定的时间内,对监控任务表中写入的监控项进行业务逻辑监控,并将业务逻辑监控结果写入监控数据表,并每隔一定的时间扫描该监控数据表,获取异常数据,当该异常数据与预设的告警条件相匹配时,则根据该异常数据对应监控项的序列号ID,获取告警处理所需的配置信息并进行告警处理,即本发明可以自动监控数据库中产生的异常数据,并进行告警处理,不需要人员参与,省时省力。The invention provides a database business logic monitoring method, in which a business logic monitoring is performed on a monitoring item written in a monitoring task table within a set time, and a business logic monitoring result is written into a monitoring data table, and The monitoring data table is scanned at a certain time to obtain abnormal data. When the abnormal data matches the preset alarm condition, the configuration information required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data. And the alarm processing is performed, that is, the invention can automatically monitor the abnormal data generated in the database, and perform alarm processing, without requiring personnel to participate, saving time and effort.
参照图1,图1为本发明数据库业务逻辑监控方法第一实施例的流程示意图,本实施例中,所述数据库业务逻辑监控方法包括:1 is a schematic flowchart of a first embodiment of a database service logic monitoring method according to the present invention. In this embodiment, the database service logic monitoring method includes:
步骤S10,每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表。In step S10, a monitoring item that needs to be monitored is generated every first set time, and is written into the monitoring item task table.
其中,在监控项变更开始之后,监控平台需要新增监控项,具体的,通过dml(DatamanIpulationLanguage,数据操纵语言)脚本语言新增到监控项基表monitor_tbl中。监控项基表monitor_tbl主要用于记录监控项的执行时间、监控频率,以及监控平台进行后续监控处理所需要的配置信息,例如监控项名称、详细描述信息、生效时间、失效时间、监控关键字、告警方式、告警、频率、运行时间段、不运行时间段、监控类型、告警级别等。After the monitoring item change starts, the monitoring platform needs to add a new monitoring item. Specifically, the dml (DatamanIpulationLanguage, data manipulation language) scripting language is added to the monitor item base table monitor_tbl. The monitoring item base table monitor_tbl is mainly used to record the execution time of the monitoring item, the monitoring frequency, and the configuration information required by the monitoring platform for subsequent monitoring and processing, such as the monitoring item name, detailed description information, effective time, expiration time, monitoring keyword, Alarm mode, alarm, frequency, running time period, non-running time period, monitoring type, alarm level, etc.
其中,上述监控平台可优选为Elis监控平台。The above monitoring platform may preferably be an Elis monitoring platform.
其中,每隔第一设定时间(例如在每天的22点)启动数据库JOB功能,统一产生需要进行监控的监控项,写入监控项任务表。The database JOB function is started every first set time (for example, at 22 o'clock every day), and the monitoring items that need to be monitored are uniformly generated, and the monitoring item task table is written.
步骤S20,启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控。Step S20: Start the monitoring item, and determine whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, perform business logic monitoring on the monitoring item.
本实施例中,定时启动上述监控项,并判断该监控项当前是否为就绪状态,若该监控项当前为就绪状态,则对该监控项进行业务逻辑监控。In this embodiment, the monitoring item is started periodically, and it is determined whether the monitoring item is currently in the ready state. If the monitoring item is currently in the ready state, the monitoring item is monitored by the service logic.
其中,判断该监控项当前是否为就绪状态的过程为:首先判断当前监控平台是否处于开启状态,若当前监控平台处于开启状态,则判断监控平台对应的监控模块以及该监控模块对应的监控功能是否正常工作,若监控平台对应的监控模块以及该监控模块对应的监控功均能正常工作,则确定该监控项当前为就绪状态;否则认为该监控项当前为未就绪状态,直接结束监控项监控任务。The process of determining whether the monitoring item is currently in the ready state is: first determining whether the current monitoring platform is in an open state. If the current monitoring platform is in an open state, determining whether the monitoring module corresponding to the monitoring platform and the monitoring function corresponding to the monitoring module are Normally, if the monitoring module corresponding to the monitoring platform and the monitoring function corresponding to the monitoring module can work normally, it is determined that the monitoring item is currently in the ready state; otherwise, the monitoring item is considered to be not ready, and the monitoring item monitoring task is directly ended. .
进一步地,本实施例中,启动上述监控项的步骤包括:Further, in this embodiment, the step of starting the foregoing monitoring item includes:
根据预先配置的启动条件启动所述监控项,其中,所述启动条件包括当数据库对应的时间与预置的启动时间相同时,或数据库对应的时间与预置的启动时间段相匹配时,则启动所述监控项。The monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
即本实施例中,可以随意设定在任意时间点或时间段内启动上述监控项,对数据库的业务逻辑进行监控。例如,设定在每天晚上的23点整启动上述监控项,对数据库的业务逻辑进行监控,然后设定监控时长,如在启动上述监控项的时长达到半小时之后,关闭上述监控项。That is, in this embodiment, the monitoring item can be started to be activated at any time point or time period to monitor the business logic of the database. For example, it is set to start the above monitoring items at 23 o'clock every night, monitor the business logic of the database, and then set the monitoring duration. For example, after the time of starting the above monitoring items reaches half an hour, the monitoring items are closed.
其中,还可以设置每隔一定的时间间隔便启动上述监控项,如每隔一个小时便启动上述监控项,并在启动上述监控项的时长达到半小时之后,关闭上述监控项。The monitoring item may be started at regular intervals, for example, the monitoring item is started every hour, and the monitoring item is turned off after the monitoring item is started for half an hour.
其中,还可以设置启动时间段,在数据库对应的时间处于该启动时间段时,则启动所述监控项,例如,设置上述启动时间段为每天上午八点至下午六点,在该启动时间段内启动上述监控项。The startup time period may also be set. When the time corresponding to the database is in the startup time period, the monitoring item is started. For example, the startup time period is set to be from 8:00 am to 6:00 pm, during the startup time period. Start the above monitoring items.
其中,由数据库JOB功能统一调度执行监控项任务表中监控项的业务逻辑监控任务。The business logic monitoring task of the monitoring item in the monitoring item task table is uniformly scheduled by the database JOB function.
步骤S30,将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据。Step S30, the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period.
本实施例中,通过调用监控平台相应的接口,将业务逻辑监控结果写入监控数据表中,并每隔第二设定时间(例如每隔2分钟)扫描所述监控数据表,获取设定时间段内(例如当前时刻至当前时刻前2分钟之内)的异常数据。In this embodiment, the service logic monitoring result is written into the monitoring data table by calling the corresponding interface of the monitoring platform, and the monitoring data table is scanned every second set time (for example, every 2 minutes) to obtain the setting. Abnormal data within a time period (eg, within the current time to 2 minutes before the current time).
步骤S40,判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。In step S40, it is determined whether the abnormal data matches the preset alarm condition. When the abnormal data matches the preset alarm condition, the alarm processing station is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data. The required configuration information is used to perform alarm processing according to the configuration information.
本实施例中,在获取到上述异常数据之后,需要判断该异常数据与预设的告警条件是否匹配,若匹配,则根据该异常数据对应监控项的序列号ID,获取告警处理所需的配置信息并进行告警处理;否则,直接结束监控项监控任务。In this embodiment, after the abnormal data is obtained, it is determined whether the abnormal data matches the preset alarm condition. If the abnormal data is matched, the configuration required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data. The information is processed and alarmed; otherwise, the monitoring item monitoring task is directly ended.
本实施例所述的数据库业务逻辑监控方法,在设定的时间内,对监控任务表中写入的监控项进行业务逻辑监控,并将业务逻辑监控结果写入监控数据表,并每隔一定的时间扫描该监控数据表,获取异常数据,当该异常数据与预设的告警条件相匹配时,则根据该异常数据对应监控项的序列号ID,获取告警处理所需的配置信息并进行告警处理,即本发明可以自动监控数据库中产生的异常数据,并进行告警处理,解决了现有技术中难以及时发现数据库产生的数据异常和及时告警的技术问题,提升了数据库的稳定性。The database service logic monitoring method described in this embodiment performs business logic monitoring on the monitoring items written in the monitoring task table within a set time, and writes the business logic monitoring result into the monitoring data table, and at a certain time The time is scanned for the monitoring data table to obtain the abnormal data. When the abnormal data matches the preset alarm condition, the configuration information required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data, and the alarm is generated. The invention can automatically monitor the abnormal data generated in the database and perform alarm processing, which solves the technical problem that it is difficult to timely discover the data abnormality and timely alarm generated by the database in the prior art, and improves the stability of the database.
进一步地,基于上述图1所述的第一实施例,本发明数据库业务逻辑监控方法第二实施例中,上述图1所示步骤S30中所述的将业务逻辑监控结果写入监控数据表的步骤还包括:Further, based on the first embodiment described in FIG. 1 above, in the second embodiment of the database service logic monitoring method of the present invention, the service logic monitoring result is written in the monitoring data table as described in step S30 of FIG. The steps also include:
将所述业务逻辑监控结果写入预先建立的监控明细数据表。The business logic monitoring result is written into a pre-established monitoring detail data table.
其中,监控明细数据表主要用于记录异常数据对应的明细信息,例如流水号、出错信息、执行用户、执行时间、运行数据库JOB的SID、监控项ID等等。The monitoring detail data table is mainly used to record detailed information corresponding to the abnormal data, such as the serial number, the error information, the execution user, the execution time, the SID of the running database JOB, the monitoring item ID, and the like.
进一步地,上述图1所示步骤S40中所述的根据所述配置信息进行告警处理的步骤之后还包括:Further, after the step of performing alarm processing according to the configuration information in step S40 shown in FIG. 1 , the method further includes:
导出所述监控数据表和/或所述监控明细数据表,其中,所述监控数据表包括监控项的启动时间、监控频率、以及监控状态中的至少一项,所述监控明细数据表中包括所述异常数据对应的明细信息。Deriving the monitoring data table and/or the monitoring detail data table, wherein the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
其中,根据所述配置信息进行告警处理的步骤之后,若需要查看上述监控数据表和/或监控明细数据表,则可以导出该监控数据表和/或监控明细数据表。After the step of performing alarm processing according to the configuration information, if the monitoring data table and/or the monitoring detail data table need to be viewed, the monitoring data table and/or the monitoring detail data table may be derived.
其中,在导出上述监控数据表和/或监控明显数据表时,可以利用抓取SQLAmong them, when exporting the above monitoring data table and/or monitoring the obvious data table, you can use the fetching SQL.
(StructuredQueryLanguage,结构化查询语言)来导出。可以仅导出监控数据表,或者仅导出监控明细数据表,或者同时导出监控数据表和所述监控明细数据表。(StructuredQueryLanguage, Structured Query Language) to export. It is possible to export only the monitoring data table, or only the monitoring detail data table, or both the monitoring data table and the monitoring detail data table.
具体的,上述监控数据表包括监控项的启动时间、监控频率、以及监控状态中的至少一项,另外,上述监控数据表还包括流水号、监控项ID、批处理执行标识、批处理开始时间、批处理结束时间、业务处理起始时间、业务处理结束时间、件数、金额、执行用户、执行时间、异常标识、运行数据库JOB的SID、执行结果摘要信息、处理状态等。Specifically, the monitoring data table includes at least one of a startup time, a monitoring frequency, and a monitoring state of the monitoring item. In addition, the monitoring data table further includes a serial number, a monitoring item ID, a batch execution identifier, and a batch processing start time. , batch processing end time, business processing start time, business processing end time, number of pieces, amount, execution user, execution time, exception identifier, SID of running database JOB, execution result summary information, processing status, and so on.
本实施例所述的数据库业务逻辑监控方法,还将业务逻辑监控结果写入预先建立的监控明细数据表,并在进行告警处理之后,可以选择导出所述监控数据表和/或所述监控明细数据表,便于数据库运维技术人员信息了解数据库异常数据,极大地提高了运维工作效率,以及节省人力成本。The database service logic monitoring method in this embodiment also writes the service logic monitoring result into the pre-established monitoring detail data table, and after performing the alarm processing, may select to export the monitoring data table and/or the monitoring details. The data table facilitates the database operation and maintenance technician information to understand the database abnormal data, which greatly improves the operation and maintenance work efficiency and saves labor costs.
进一步地,基于上述图1所述的第一实施例,本发明数据库业务逻辑监控方法第三实施例中,上述图1所示步骤S40中所述的判断所述异常数据与预设的告警条件是否匹配的步骤包括:Further, based on the first embodiment described in FIG. 1 above, in the third embodiment of the database service logic monitoring method of the present invention, the abnormal data and the preset alarm condition are determined in step S40 shown in FIG. The steps to match are:
判断上述异常数据对应的数量值是否大于预设的第一阈值,和/或判断上述异常数据中指定的数据项是否大于预设的第二阈值;Determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or determining whether the data item specified in the abnormal data is greater than a preset second threshold;
当所述数量值大于第一阈值,和/或所述数据项大于第二阈值时,则确定所述异常数据与预设的告警条件相匹配。When the quantity value is greater than the first threshold, and/or the data item is greater than the second threshold, determining that the abnormal data matches the preset alarm condition.
具体的,在判断上述异常数据与预设的告警条件是否匹配时,可同时判断上述异常数据对应的数量值是否大于预设的第一阈值,以及上述异常数据中指定的数据项是否大于预设的第二阈值,当上述异常数据对应的数量值大于预设的第一阈值,且上述异常数据中指定的数据项大于预设的第二阈值时,则确定上述异常数据与预设的告警条件相匹配;或者,也可以仅判断上述异常数据对应的数量值是否大于预设的第一阈值,或仅判断上述异常数据中指定的数据项是否大于预设的第二阈值,当上述异常数据对应的数量值大于预设的第一阈值,或上述异常数据中指定的数据项大于预设的第二阈值时,则确定上述异常数据与预设的告警条件相匹配。Specifically, when determining whether the abnormal data matches the preset alarm condition, whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, and whether the specified data item in the abnormal data is greater than a preset may be simultaneously determined. And the second threshold value, when the quantity value corresponding to the abnormal data is greater than a preset first threshold, and the data item specified in the abnormal data is greater than a preset second threshold, determining the abnormal data and the preset alarm condition Or matching, or determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, or determining whether the data item specified in the abnormal data is greater than a preset second threshold, when the abnormal data corresponds to When the quantity value is greater than the preset first threshold, or the data item specified in the abnormal data is greater than the preset second threshold, it is determined that the abnormal data matches the preset alarm condition.
其中,可以利用数据库中proc_count及proc_premium这两个字段来控制阀值,其中proc_count用来控制异常数据对应的数量值,proc_premium用来控制异常数据中指定的数据项(例如销售金额)。该配置项的设置格式为:proc_count>n或者proc_premium>n.m,例如如果某监控项为监控未生盘抽档情况,需要在未生盘数超过5单才告警,则配置为“proc_count>5”。Among them, the proc_count and proc_premium fields in the database can be used to control the threshold, wherein proc_count is used to control the quantity value corresponding to the abnormal data, and proc_premium is used to control the data item (such as the sales amount) specified in the abnormal data. The configuration format of the configuration item is: proc_count>n or proc_premium>nm. For example, if a monitoring item is for monitoring the non-distributed file, you need to set the alarm to "proc_count>5". .
其中,可以同时对异常数据对应的数量值和异常数据中指定的数据项进行阈值监控。例如某监控项为监控未生盘抽档情况时,需要在未生盘数超过5单和金额超过1000.0元才告警,则配置“(proc_count>5 and proc_premium>1000.0)”;另外,也可以对异常数据对应的数量值或异常数据中指定的数据项的进行阈值监控,例如需要在未生盘数超过5单或金额超过1000.0元才告警,则配置为 “(proc_count>5 or proc_premium>1000.0)”。The threshold value corresponding to the quantity value corresponding to the abnormal data and the data item specified in the abnormal data may be simultaneously monitored. For example, if a monitoring item is used to monitor the situation of non-distribution, it needs to be alarmed if the number of undistributed disks exceeds 5 and the amount exceeds 1000.0, then configure ("proc_count>5 And Proc_premium>1000.0)"; In addition, it is also possible to perform threshold monitoring on the quantity value corresponding to the abnormal data or the data item specified in the abnormal data. For example, if the number of undistributed disks exceeds 5 or the amount exceeds 1000.0, the alarm is configured. for "(proc_count>5 or proc_premium>1000.0)".
本实施例所述的数据库业务逻辑监控方法,当异常数据对应的数量值大于预设的第一阈值,和/或异常数据中指定的数据项大于预设的第二阈值时,则确定该异常数据与预设的告警条件相匹配,其中,该第一阈值与第二阈值可由运维人员根据实际需要自行设置,从而来任意调节数据库业务逻辑监控的精确度。The database service logic monitoring method in this embodiment determines the abnormality when the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or the data item specified in the abnormal data is greater than a preset second threshold. The data is matched with the preset alarm condition, wherein the first threshold and the second threshold are set by the operation and maintenance personnel according to actual needs, thereby arbitrarily adjusting the accuracy of the database service logic monitoring.
进一步地,基于上述本发明数据库业务逻辑监控方法第一、第二、第三实施例,本发明数据库业务逻辑监控方法第四实施例中,上述图1所示步骤S40中所述的根据所述配置信息进行告警处理的步骤包括:Further, based on the first, second, and third embodiments of the database service logic monitoring method of the present invention, in the fourth embodiment of the database service logic monitoring method of the present invention, according to the foregoing step S40 shown in FIG. The steps for configuring alarm processing are as follows:
判断所述告警处理对应的告警级别,并根据所述告警级别进行告警处理。Determining an alarm level corresponding to the alarm processing, and performing alarm processing according to the alarm level.
其中,根据运营的监控平台规范,可预先将监控平台的告警级别由高到低配置为CRITICAL(非常重要)、MAJOR(重要)、MINOR(一般)、WARNING(警告)、INFO(提醒)。Among them, according to the operational monitoring platform specification, the alarm level of the monitoring platform can be configured in advance from high to low as CRITICAL, MAJOR, MINOR, WARNING, and INFO.
进一步地,根据所述告警级别进行告警处理的步骤包括:Further, the step of performing alarm processing according to the alarm level includes:
当任意时间点排队等待的告警处理的数量大于预设的最大并发阈值时,优先进行告警级别高的告警处理。When the number of alarms that are queued at any time is greater than the preset maximum concurrency threshold, the alarm processing with a high alarm level is prioritized.
进一步地,所述告警处理对应的告警方式包括邮件告警、呼叫告警、自动转报IT服务管理系统告警中的一种或多种。Further, the alarm manner corresponding to the alarm processing includes one or more of an email alarm, a call alarm, and an automatic transfer IT service management system alarm.
其中,根据监控平台规范,告警处理对应的告警方式包含:1-邮件、2-呼叫(电话)、3-自动转报ITSM(IT ServiceManagement,IT服务管理)系统。可以选择其中一种告警方式,也可以选择其中两种告警方式,或者选择三中告警方式同时选择。According to the monitoring platform specification, the alarm mode corresponding to the alarm processing includes: 1-mail, 2-call (telephone), 3-automatic transfer ITSM (IT) ServiceManagement, IT Service Management) system. You can choose one of the alarm modes, or you can select one of the two alarm modes, or select the three alarm modes to select at the same time.
此外,上述告警处理对应的告警方式还包括:4-消息订阅、5-自定义脚本告警方式。In addition, the alarm manner corresponding to the foregoing alarm processing further includes: 4-message subscription, and 5-custom script alarm mode.
本实施例所述的数据库业务逻辑监控方法,在进行告警处理之前,需要先判断该告警处理对应的告警级别,然后再根据该告警级别进行告警处理,其中,当任意时间点排队等待的告警处理的数量大于预设的最大并发阈值时,优先进行告警级别高的告警处理,该告警处理对应的告警方式包括邮件告警、呼叫告警、自动转报IT服务管理系统告警中的一种或多种,即本实施例中,当产生较多告警处理时,能够优先进行告警级别较高的告警处理,从而最大限度地减少数据库异常数据带来的损失,保障数据库运行的稳定性。The database service logic monitoring method in this embodiment needs to determine the alarm level corresponding to the alarm processing before performing alarm processing, and then perform alarm processing according to the alarm level, wherein the alarm processing is queued at any time point. When the number of alarms is greater than the preset maximum concurrency threshold, the alarm processing with a high alarm level is preferentially performed. The alarm processing corresponding to the alarm processing includes one or more of email alarm, call alarm, and automatic transfer of IT service management system alarms. That is, in this embodiment, when a large number of alarm processes are generated, the alarm processing with a higher alarm level can be preferentially performed, thereby minimizing the loss caused by the database abnormal data and ensuring the stability of the database operation.
本发明还提供一种数据库业务逻辑监控系统,该系统包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据库业务逻辑监控程序;该系统能够实现:在设定的时间内,对监控任务表中写入的监控项进行业务逻辑监控,并将业务逻辑监控结果写入监控数据表,并每隔一定的时间扫描该监控数据表,获取异常数据,当该异常数据与预设的告警条件相匹配时,则根据该异常数据对应监控项的序列号ID,获取告警处理所需的配置信息并进行告警处理,即本发明可以自动监控数据库中产生的异常数据,并进行告警处理,解决了现有技术中难以及时发现数据库产生的数据异常和及时告警的技术问题,提升了数据库的稳定性。The present invention also provides a database business logic monitoring system, the system comprising: a memory, a processor, and a database business logic monitoring program stored on the memory and operable on the processor; the system can implement: Within a certain period of time, the business logic of the monitoring items written in the monitoring task table is monitored, and the business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned at regular intervals to obtain abnormal data. When the abnormal data matches the preset alarm condition, the configuration information required for the alarm processing is obtained according to the serial number ID of the monitoring item corresponding to the abnormal data, and the alarm processing is performed, that is, the present invention can automatically monitor the abnormal data generated in the database. And the alarm processing solves the technical problem that it is difficult to timely discover the data abnormality and timely alarm generated by the database in the prior art, and improves the stability of the database.
具体的,上述数据库业务逻辑监控程序被所述处理器执行时实现如下步骤:Specifically, when the foregoing database service logic monitoring program is executed by the processor, the following steps are implemented:
每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information.
进一步地,所述启动所述监控项的步骤包括:Further, the step of starting the monitoring item includes:
根据预先配置的启动条件启动所述监控项,其中,所述启动条件包括当数据库对应的时间与预置的启动时间相同时,或数据库对应的时间与预置的启动时间段相匹配时,则启动所述监控项。The monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
进一步地,所述将业务逻辑监控结果写入监控数据表的步骤还包括:Further, the step of writing the service logic monitoring result to the monitoring data table further includes:
将所述业务逻辑监控结果写入预先建立的监控明细数据表。The business logic monitoring result is written into a pre-established monitoring detail data table.
进一步地,所述判断所述异常数据与预设的告警条件是否匹配的步骤包括:Further, the step of determining whether the abnormal data matches a preset alarm condition comprises:
判断所述异常数据对应的数量值是否大于预设的第一阈值,和/或判断所述异常数据中指定的数据项是否大于预设的第二阈值;Determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or determining whether the data item specified in the abnormal data is greater than a preset second threshold;
当所述数量值大于第一阈值,和/或所述数据项大于第二阈值时,则确定所述异常数据与预设的告警条件相匹配。When the quantity value is greater than the first threshold, and/or the data item is greater than the second threshold, determining that the abnormal data matches the preset alarm condition.
进一步地,所述根据所述配置信息进行告警处理的步骤包括:Further, the step of performing alarm processing according to the configuration information includes:
判断所述告警处理对应的告警级别,并根据所述告警级别进行告警处理。Determining an alarm level corresponding to the alarm processing, and performing alarm processing according to the alarm level.
进一步地,所述数据库业务逻辑监控程序被所述处理器执行时,还实现以下步骤:Further, when the database service logic monitoring program is executed by the processor, the following steps are also implemented:
导出所述监控数据表和/或所述监控明细数据表,其中,所述监控数据表包括监控项的启动时间、监控频率、以及监控状态中的至少一项,所述监控明细数据表中包括所述异常数据对应的明细信息。Deriving the monitoring data table and/or the monitoring detail data table, wherein the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
进一步地,所述根据所述告警级别进行告警处理的步骤包括:Further, the step of performing alarm processing according to the alarm level includes:
当任意时间点排队等待的告警处理的数量大于预设的最大并发阈值时,优先进行告警级别高的告警处理。When the number of alarms that are queued at any time is greater than the preset maximum concurrency threshold, the alarm processing with a high alarm level is prioritized.
进一步地,所述告警处理对应的告警方式包括邮件告警、呼叫告警、自动转报IT服务管理系统告警中的一种或多种。Further, the alarm manner corresponding to the alarm processing includes one or more of an email alarm, a call alarm, and an automatic transfer IT service management system alarm.
为了更好的理解本发明,参照图2,图2为本发明数据库业务逻辑监控系统涉及的软件运行环境的系统结构示意图,本实施例中,上述数据库业务逻辑监控系统可包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信;用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口;网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口);存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器;存储器1005可选的还可以是独立于前述处理器1001的存储装置。For a better understanding of the present invention, referring to FIG. 2, FIG. 2 is a schematic diagram of a system structure of a software running environment involved in a database service logic monitoring system according to the present invention. In this embodiment, the database service logic monitoring system may include: a processor 1001, For example, CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002. The communication bus 1002 is configured to implement connection communication between the components; the user interface 1003 may include a display, an input unit such as a keyboard, and the optional user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile) Memory, such as a disk storage; the memory 1005 may alternatively be a storage device independent of the processor 1001 described above.
本领域技术人员可以理解,图2中示出的系统结构并不构成对上述系统的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art will appreciate that the system structure illustrated in FIG. 2 does not constitute a limitation to the above described system, and may include more or fewer components than those illustrated, or some components may be combined, or different component arrangements.
如图2所示,作为一种计算机存储介质的存储器1005中,可以包括操作系统、网络通信模块、用户接口模块以及数据库业务逻辑监控程序。As shown in FIG. 2, a memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a database service logic monitor program.
如图2所示,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;用户接口1003主要用于连接客户端(用户端),与客户端进行数据通信;而处理器1001可以用于调用存储器1005中存储的数据库业务逻辑监控程序,并执行相应的操作。As shown in FIG. 2, the network interface 1004 is mainly used to connect to a background server for data communication with a background server; the user interface 1003 is mainly used to connect a client (user end) to perform data communication with the client; and the processor 1001 can use The database business logic monitor program stored in the memory 1005 is called and the corresponding operation is performed.
其中,该数据库业务逻辑监控系统对应的实施例与上述数据库业务逻辑监控方法对应的各个实施例基本相同,故在此不再赘述。The embodiments of the database service logic monitoring system are basically the same as the corresponding embodiments of the database service logic monitoring method, and therefore are not described here.
本发明还提供一种存储介质,所述存储介质上存储有数据库业务逻辑监控程序,该存储介质能够实现:在设定的时间内,对监控任务表中写入的监控项进行业务逻辑监控,并将业务逻辑监控结果写入监控数据表,并每隔一定的时间扫描该监控数据表,获取异常数据,当该异常数据与预设的告警条件相匹配时,则根据该异常数据对应监控项的序列号ID,获取告警处理所需的配置信息并进行告警处理,即本发明可以自动监控数据库中产生的异常数据,并进行告警处理,解决了现有技术中难以及时发现数据库产生的数据异常和及时告警的技术问题,提升了数据库的稳定性。The present invention further provides a storage medium, wherein the storage medium stores a database service logic monitoring program, and the storage medium can implement: performing service logic monitoring on the monitoring items written in the monitoring task table within a set time, And the service logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned at a certain time to obtain abnormal data. When the abnormal data matches the preset alarm condition, the monitoring item is corresponding according to the abnormal data. The serial number ID obtains the configuration information required for the alarm processing and performs alarm processing. That is, the present invention can automatically monitor the abnormal data generated in the database and perform alarm processing, which solves the problem that it is difficult to timely discover the data generated by the database in the prior art. And the technical problems of timely warnings improve the stability of the database.
具体的,上述数据库业务逻辑监控程序被处理器执行时实现如下步骤:Specifically, when the foregoing database service logic monitoring program is executed by the processor, the following steps are implemented:
每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information.
进一步地,所述启动所述监控项的步骤包括:Further, the step of starting the monitoring item includes:
根据预先配置的启动条件启动所述监控项,其中,所述启动条件包括当数据库对应的时间与预置的启动时间相同时,或数据库对应的时间与预置的启动时间段相匹配时,则启动所述监控项。The monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
进一步地,所述将业务逻辑监控结果写入监控数据表的步骤还包括:Further, the step of writing the service logic monitoring result to the monitoring data table further includes:
将所述业务逻辑监控结果写入预先建立的监控明细数据表。The business logic monitoring result is written into a pre-established monitoring detail data table.
进一步地,所述判断所述异常数据与预设的告警条件是否匹配的步骤包括:Further, the step of determining whether the abnormal data matches a preset alarm condition comprises:
判断所述异常数据对应的数量值是否大于预设的第一阈值,和/或判断所述异常数据中指定的数据项是否大于预设的第二阈值;Determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or determining whether the data item specified in the abnormal data is greater than a preset second threshold;
当所述数量值大于第一阈值,和/或所述数据项大于第二阈值时,则确定所述异常数据与预设的告警条件相匹配。When the quantity value is greater than the first threshold, and/or the data item is greater than the second threshold, determining that the abnormal data matches the preset alarm condition.
进一步地,所述根据所述配置信息进行告警处理的步骤包括:Further, the step of performing alarm processing according to the configuration information includes:
判断所述告警处理对应的告警级别,并根据所述告警级别进行告警处理。Determining an alarm level corresponding to the alarm processing, and performing alarm processing according to the alarm level.
进一步地,所述数据库业务逻辑监控程序被处理器执行时,还实现以下步骤:Further, when the database business logic monitor program is executed by the processor, the following steps are also implemented:
导出所述监控数据表和/或所述监控明细数据表,其中,所述监控数据表包括监控项的启动时间、监控频率、以及监控状态中的至少一项,所述监控明细数据表中包括所述异常数据对应的明细信息。Deriving the monitoring data table and/or the monitoring detail data table, wherein the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
进一步地,所述根据所述告警级别进行告警处理的步骤包括:Further, the step of performing alarm processing according to the alarm level includes:
当任意时间点排队等待的告警处理的数量大于预设的最大并发阈值时,优先进行告警级别高的告警处理。When the number of alarms that are queued at any time is greater than the preset maximum concurrency threshold, the alarm processing with a high alarm level is prioritized.
进一步地,所述告警处理对应的告警方式包括邮件告警、呼叫告警、自动转报IT服务管理系统告警中的一种或多种。Further, the alarm manner corresponding to the alarm processing includes one or more of an email alarm, a call alarm, and an automatic transfer IT service management system alarm.
其中,该存储介质对应的实施例与上述数据库业务逻辑监控方法对应的各个实施例基本相同,故在此不再赘述。The embodiments corresponding to the storage medium are basically the same as the corresponding embodiments of the foregoing database service logic monitoring method, and therefore are not described herein again.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It is to be understood that the term "comprises", "comprising", or any other variants thereof, is intended to encompass a non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes those elements. It also includes other elements that are not explicitly listed, or elements that are inherent to such a process, method, article, or device. An element that is defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in the process, method, item, or device that comprises the element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, portions of the technical solution of the present invention that contribute substantially or to the prior art may be embodied in the form of a software product stored in a storage medium (such as a ROM/RAM as described above). , a disk, an optical disk, including a number of instructions for causing a terminal device to perform the method described in various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the drawings are directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (24)

  1. 一种数据库业务逻辑监控方法,其特征在于,所述数据库业务逻辑监控方法包括: A database business logic monitoring method, wherein the database business logic monitoring method comprises:
    每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
    启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
    将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
    判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information.
  2. 如权利要求1所述的数据库业务逻辑监控方法,其特征在于,所述启动所述监控项的步骤包括:The method for monitoring a database service logic according to claim 1, wherein the step of starting the monitoring item comprises:
    根据预先配置的启动条件启动所述监控项,其中,所述启动条件包括当数据库对应的时间与预置的启动时间相同时,或数据库对应的时间与预置的启动时间段相匹配时,则启动所述监控项。The monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
  3. 如权利要求1所述的数据库业务逻辑监控方法,其特征在于,所述将业务逻辑监控结果写入监控数据表的步骤还包括:The method of monitoring the database service logic according to claim 1, wherein the step of writing the service logic monitoring result to the monitoring data table further comprises:
    将所述业务逻辑监控结果写入预先建立的监控明细数据表。The business logic monitoring result is written into a pre-established monitoring detail data table.
  4. 如权利要求1所述的数据库业务逻辑监控方法,其特征在于,所述判断所述异常数据与预设的告警条件是否匹配的步骤包括:The method for monitoring a database service logic according to claim 1, wherein the step of determining whether the abnormal data matches a preset alarm condition comprises:
    判断所述异常数据对应的数量值是否大于预设的第一阈值,和/或判断所述异常数据中指定的数据项是否大于预设的第二阈值;Determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or determining whether the data item specified in the abnormal data is greater than a preset second threshold;
    当所述数量值大于第一阈值,和/或所述数据项大于第二阈值时,则确定所述异常数据与预设的告警条件相匹配。When the quantity value is greater than the first threshold, and/or the data item is greater than the second threshold, determining that the abnormal data matches the preset alarm condition.
  5. 如权利要求1所述的数据库业务逻辑监控方法,其特征在于,所述根据所述配置信息进行告警处理的步骤包括:The method of monitoring the database service logic according to claim 1, wherein the step of performing alarm processing according to the configuration information comprises:
    判断所述告警处理对应的告警级别,并根据所述告警级别进行告警处理。Determining an alarm level corresponding to the alarm processing, and performing alarm processing according to the alarm level.
  6. 如权利要求5所述的数据库业务逻辑监控方法,其特征在于,所述根据所述配置信息进行告警处理的步骤之后还包括:The method of monitoring the database service logic according to claim 5, wherein the step of performing alarm processing according to the configuration information further comprises:
    导出所述监控数据表和/或所述监控明细数据表,其中,所述监控数据表包括监控项的启动时间、监控频率、以及监控状态中的至少一项,所述监控明细数据表中包括所述异常数据对应的明细信息。Deriving the monitoring data table and/or the monitoring detail data table, wherein the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
  7. 如权利要求5所述的数据库业务逻辑监控方法,其特征在于,所述根据所述告警级别进行告警处理的步骤包括:The method of monitoring the database service logic according to claim 5, wherein the step of performing alarm processing according to the alarm level comprises:
    当任意时间点排队等待的告警处理的数量大于预设的最大并发阈值时,优先进行告警级别高的告警处理。When the number of alarms that are queued at any time is greater than the preset maximum concurrency threshold, the alarm processing with a high alarm level is prioritized.
  8. 如权利要求5所述的数据库业务逻辑监控方法,其特征在于,所述告警处理对应的告警方式包括邮件告警、呼叫告警、自动转报IT服务管理系统告警中的一种或多种。The database service logic monitoring method according to claim 5, wherein the alarm mode corresponding to the alarm processing comprises one or more of an email alert, a call alert, and an automatic transfer IT service management system alert.
  9. 一种数据库业务逻辑监控系统,其特征在于,所述数据库业务逻辑监控系统包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的数据库业务逻辑监控程序,所述数据库业务逻辑监控程序被所述处理器执行时实现以下步骤:A database business logic monitoring system, comprising: a memory, a processor, and a database business logic monitoring program stored on the memory and operable on the processor, The database business logic monitor is implemented by the processor to implement the following steps:
    每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
    启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
    将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
    判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information.
  10. 如权利要求9所述的数据库业务逻辑监控系统,其特征在于,所述启动所述监控项的步骤包括:The database business logic monitoring system according to claim 9, wherein the step of starting the monitoring item comprises:
    根据预先配置的启动条件启动所述监控项,其中,所述启动条件包括当数据库对应的时间与预置的启动时间相同时,或数据库对应的时间与预置的启动时间段相匹配时,则启动所述监控项。The monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
  11. 如权利要求9所述的数据库业务逻辑监控系统,其特征在于,所述将业务逻辑监控结果写入监控数据表的步骤还包括:The database business logic monitoring system of claim 9, wherein the step of writing the business logic monitoring result to the monitoring data table further comprises:
    将所述业务逻辑监控结果写入预先建立的监控明细数据表。The business logic monitoring result is written into a pre-established monitoring detail data table.
  12. 如权利要求9所述的数据库业务逻辑监控系统,其特征在于,所述判断所述异常数据与预设的告警条件是否匹配的步骤包括:The database service logic monitoring system according to claim 9, wherein the step of determining whether the abnormal data matches a preset alarm condition comprises:
    判断所述异常数据对应的数量值是否大于预设的第一阈值,和/或判断所述异常数据中指定的数据项是否大于预设的第二阈值;Determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or determining whether the data item specified in the abnormal data is greater than a preset second threshold;
    当所述数量值大于第一阈值,和/或所述数据项大于第二阈值时,则确定所述异常数据与预设的告警条件相匹配。When the quantity value is greater than the first threshold, and/or the data item is greater than the second threshold, determining that the abnormal data matches the preset alarm condition.
  13. 如权利要求9所述的数据库业务逻辑监控系统,其特征在于,所述根据所述配置信息进行告警处理的步骤包括:The database service logic monitoring system according to claim 9, wherein the step of performing alarm processing according to the configuration information comprises:
    判断所述告警处理对应的告警级别,并根据所述告警级别进行告警处理。Determining an alarm level corresponding to the alarm processing, and performing alarm processing according to the alarm level.
  14. 如权利要求13所述的数据库业务逻辑监控系统,其特征在于,所述数据库业务逻辑监控程序被所述处理器执行时,还实现以下步骤:The database business logic monitoring system according to claim 13, wherein when the database business logic monitoring program is executed by the processor, the following steps are further implemented:
    导出所述监控数据表和/或所述监控明细数据表,其中,所述监控数据表包括监控项的启动时间、监控频率、以及监控状态中的至少一项,所述监控明细数据表中包括所述异常数据对应的明细信息。Deriving the monitoring data table and/or the monitoring detail data table, wherein the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
  15. 如权利要求13所述的数据库业务逻辑监控系统,其特征在于,所述根据所述告警级别进行告警处理的步骤包括:The database service logic monitoring system according to claim 13, wherein the step of performing alarm processing according to the alarm level comprises:
    当任意时间点排队等待的告警处理的数量大于预设的最大并发阈值时,优先进行告警级别高的告警处理。When the number of alarms that are queued at any time is greater than the preset maximum concurrency threshold, the alarm processing with a high alarm level is prioritized.
  16. 如权利要求13所述的数据库业务逻辑监控系统,其特征在于,所述告警处理对应的告警方式包括邮件告警、呼叫告警、自动转报IT服务管理系统告警中的一种或多种。The database service logic monitoring system according to claim 13, wherein the alarm mode corresponding to the alarm processing comprises one or more of an email alert, a call alert, and an automatic transfer IT service management system alert.
  17. 一种存储介质,其特征在于,所述存储介质上存储有数据库业务逻辑监控程序,所述数据库业务逻辑监控程序被处理器执行时实现以下步骤:A storage medium is characterized in that: a database business logic monitoring program is stored on the storage medium, and the database business logic monitoring program is executed by the processor to implement the following steps:
    每隔第一设定时间,生成需要进行监控的监控项,并写入监控项任务表;Generate monitoring items that need to be monitored every first set time, and write the monitoring item task table;
    启动所述监控项,并判断所述监控项当前是否为就绪状态,若所述监控项当前为就绪状态,则对所述监控项进行业务逻辑监控;The monitoring item is started, and it is determined whether the monitoring item is currently in a ready state. If the monitoring item is currently in a ready state, performing service logic monitoring on the monitoring item;
    将业务逻辑监控结果写入监控数据表,并每隔第二设定时间扫描所述监控数据表,获取设定时间段内的异常数据;The business logic monitoring result is written into the monitoring data table, and the monitoring data table is scanned every second set time to obtain abnormal data in the set time period;
    判断所述异常数据与预设的告警条件是否匹配,当所述异常数据与预设的告警条件相匹配时,则根据所述异常数据对应监控项的序列号ID,获取告警处理所需的配置信息,并根据所述配置信息进行告警处理。Determining whether the abnormal data matches the preset alarm condition, and when the abnormal data matches the preset alarm condition, obtaining the configuration required for the alarm processing according to the serial number ID of the monitoring item corresponding to the abnormal data Information, and perform alarm processing according to the configuration information.
  18. 如权利要求17所述的存储介质,其特征在于,所述启动所述监控项的步骤包括:The storage medium of claim 17, wherein the step of initiating the monitoring item comprises:
    根据预先配置的启动条件启动所述监控项,其中,所述启动条件包括当数据库对应的时间与预置的启动时间相同时,或数据库对应的时间与预置的启动时间段相匹配时,则启动所述监控项。The monitoring item is started according to a pre-configured startup condition, where the startup condition includes when the time corresponding to the database is the same as the preset startup time, or when the time corresponding to the database matches the preset startup time period, Start the monitoring item.
  19. 如权利要求17所述的存储介质,其特征在于,所述将业务逻辑监控结果写入监控数据表的步骤还包括:The storage medium of claim 17, wherein the step of writing the business logic monitoring result to the monitoring data table further comprises:
    将所述业务逻辑监控结果写入预先建立的监控明细数据表。The business logic monitoring result is written into a pre-established monitoring detail data table.
  20. 如权利要求17所述的存储介质,其特征在于,所述判断所述异常数据与预设的告警条件是否匹配的步骤包括:The storage medium according to claim 17, wherein the step of determining whether the abnormal data matches a preset alarm condition comprises:
    判断所述异常数据对应的数量值是否大于预设的第一阈值,和/或判断所述异常数据中指定的数据项是否大于预设的第二阈值;Determining whether the quantity value corresponding to the abnormal data is greater than a preset first threshold, and/or determining whether the data item specified in the abnormal data is greater than a preset second threshold;
    当所述数量值大于第一阈值,和/或所述数据项大于第二阈值时,则确定所述异常数据与预设的告警条件相匹配。When the quantity value is greater than the first threshold, and/or the data item is greater than the second threshold, determining that the abnormal data matches the preset alarm condition.
  21. 如权利要求17所述的存储介质,其特征在于,所述根据所述配置信息进行告警处理的步骤包括:The storage medium according to claim 17, wherein the step of performing alarm processing according to the configuration information comprises:
    判断所述告警处理对应的告警级别,并根据所述告警级别进行告警处理。Determining an alarm level corresponding to the alarm processing, and performing alarm processing according to the alarm level.
  22. 如权利要求21所述的存储介质,其特征在于,所述数据库业务逻辑监控程序被处理器执行时,还实现以下步骤:The storage medium of claim 21, wherein when the database business logic monitor is executed by the processor, the following steps are further implemented:
    导出所述监控数据表和/或所述监控明细数据表,其中,所述监控数据表包括监控项的启动时间、监控频率、以及监控状态中的至少一项,所述监控明细数据表中包括所述异常数据对应的明细信息。Deriving the monitoring data table and/or the monitoring detail data table, wherein the monitoring data table includes at least one of a startup time of a monitoring item, a monitoring frequency, and a monitoring status, where the monitoring detail data table includes Detailed information corresponding to the abnormal data.
  23. 如权利要求21所述的存储介质,其特征在于,所述根据所述告警级别进行告警处理的步骤包括:The storage medium according to claim 21, wherein the step of performing alarm processing according to the alarm level comprises:
    当任意时间点排队等待的告警处理的数量大于预设的最大并发阈值时,优先进行告警级别高的告警处理。When the number of alarms that are queued at any time is greater than the preset maximum concurrency threshold, the alarm processing with a high alarm level is prioritized.
  24. 如权利要求21所述的存储介质,其特征在于,所述告警处理对应的告警方式包括邮件告警、呼叫告警、自动转报IT服务管理系统告警中的一种或多种。 The storage medium according to claim 21, wherein the alarm mode corresponding to the alarm processing comprises one or more of an email alert, a call alert, and an automatic transfer IT service management system alert.
PCT/CN2017/099334 2017-05-22 2017-08-28 Database service logic monitoring method and system, and storage medium WO2018214320A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710367166.0A CN107678907B (en) 2017-05-22 2017-05-22 Database service logic monitoring method, system and storage medium
CN201710367166.0 2017-05-22

Publications (1)

Publication Number Publication Date
WO2018214320A1 true WO2018214320A1 (en) 2018-11-29

Family

ID=61133637

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099334 WO2018214320A1 (en) 2017-05-22 2017-08-28 Database service logic monitoring method and system, and storage medium

Country Status (2)

Country Link
CN (1) CN107678907B (en)
WO (1) WO2018214320A1 (en)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415811B (en) * 2018-03-23 2021-08-27 广发证券股份有限公司 Method and device for monitoring business logic
CN108847977B (en) * 2018-06-14 2021-06-25 平安科技(深圳)有限公司 Service data monitoring method, storage medium and server
CN110851316A (en) * 2018-08-20 2020-02-28 北京京东尚科信息技术有限公司 Abnormity early warning method, abnormity early warning device, abnormity early warning system, electronic equipment and storage medium
CN109669836B (en) * 2018-09-25 2023-04-28 平安普惠企业管理有限公司 Intelligent IT operation and maintenance analysis method, device, equipment and readable storage medium
CN109284216A (en) * 2018-09-27 2019-01-29 深圳市佰仟金融服务有限公司 The method and terminal device of system monitoring
CN109491873B (en) * 2018-11-05 2022-08-02 阿里巴巴(中国)有限公司 Cache monitoring method, medium, device and computing equipment
CN109582547A (en) * 2018-12-11 2019-04-05 平安科技(深圳)有限公司 Electronic device, monitoring data alarm method and storage medium
CN110046071B (en) * 2019-03-13 2023-05-30 中国平安人寿保险股份有限公司 Database monitoring method, device, computing equipment and storage medium
CN110147405A (en) * 2019-04-15 2019-08-20 平安普惠企业管理有限公司 A kind of monitoring method based on pedestal O&M, device, equipment and storage medium
CN112311617A (en) * 2019-08-02 2021-02-02 中国移动通信有限公司政企客户分公司 Configured data monitoring and alarming method and system
CN110795414B (en) * 2019-11-01 2023-04-14 北京北方华创微电子装备有限公司 Alarm analysis method and device for semiconductor equipment
CN111026642A (en) * 2019-11-14 2020-04-17 山东中创软件商用中间件股份有限公司 Database operation detection system, method and device and computer readable storage medium
CN111090635B (en) * 2019-11-29 2023-11-07 北京明略软件系统有限公司 Configuration method and device of early warning scheme and computer readable storage medium
CN111078507A (en) * 2019-12-27 2020-04-28 广州三七互娱科技有限公司 Data monitoring method, system, computer equipment and storage medium
CN111274094B (en) * 2020-02-04 2023-09-26 上海携程商务有限公司 Interface early warning method, system, equipment and storage medium
CN111324514A (en) * 2020-03-18 2020-06-23 深圳市卡牛信息科技有限公司 System abnormity monitoring method, device, equipment and storage medium
CN111581064A (en) * 2020-03-31 2020-08-25 中国建设银行股份有限公司 Index processing method, system, equipment and storage medium based on ORACLE database
CN111444067A (en) * 2020-05-18 2020-07-24 湖南御家科技有限公司 Rule engine-based configuration system monitoring method, device and equipment
CN113448801A (en) * 2021-06-15 2021-09-28 新浪网技术(中国)有限公司 Database monitoring method and system
CN113553235A (en) * 2021-07-19 2021-10-26 猪八戒股份有限公司 Business scene monitoring method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070112607A1 (en) * 2005-11-16 2007-05-17 Microsoft Corporation Score-based alerting in business logic
CN103295155A (en) * 2012-11-30 2013-09-11 国泰君安证券股份有限公司 Security core service system monitoring method
CN106385328A (en) * 2016-08-31 2017-02-08 沈阳行天科技有限公司 Monitoring method for managing kernel equipment of enterprise on the basis of embedded system
CN106487585A (en) * 2016-10-09 2017-03-08 深圳市思博创科技有限公司 Equipment complex monitoring system framework

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101625686B (en) * 2008-07-08 2016-04-06 阿里巴巴集团控股有限公司 A kind of method and system of monitoring data consistency between plurality of databases
CN103532739B (en) * 2013-09-25 2017-09-29 上海斐讯数据通信技术有限公司 A kind of monitoring analysis system based on network service with application
CN105843904B (en) * 2016-03-23 2019-04-05 江苏太湖云计算信息技术股份有限公司 For the monitoring warning system of database runnability
CN106202444A (en) * 2016-07-14 2016-12-07 浪潮软件股份有限公司 A kind of implementation method of data base's O&M monitoring

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070112607A1 (en) * 2005-11-16 2007-05-17 Microsoft Corporation Score-based alerting in business logic
CN103295155A (en) * 2012-11-30 2013-09-11 国泰君安证券股份有限公司 Security core service system monitoring method
CN106385328A (en) * 2016-08-31 2017-02-08 沈阳行天科技有限公司 Monitoring method for managing kernel equipment of enterprise on the basis of embedded system
CN106487585A (en) * 2016-10-09 2017-03-08 深圳市思博创科技有限公司 Equipment complex monitoring system framework

Also Published As

Publication number Publication date
CN107678907A (en) 2018-02-09
CN107678907B (en) 2020-04-10

Similar Documents

Publication Publication Date Title
WO2018214320A1 (en) Database service logic monitoring method and system, and storage medium
WO2018120681A1 (en) Data synchronization method, device and system, data processing server, and storage medium
WO2018103315A1 (en) Monitoring data processing method, apparatus, server and storage equipment
WO2020224246A1 (en) Block chain-based data management method and apparatus, device and storage medium
WO2020253034A1 (en) Client buried point test method, apparatus and device, and storage medium
WO2019174090A1 (en) Screenshot file sharing control method, apparatus and device, and computer storage medium
WO2016095551A1 (en) Method and apparatus for implementing mysql database monitoring option script
WO2016141667A1 (en) Network connection control method and system for mobile terminal
WO2020119369A1 (en) Intelligent it operation and maintenance fault positioning method, apparatus and device, and readable storage medium
WO2020253125A1 (en) Log management method, apparatus, and device, and storage medium
WO2014044130A1 (en) Service polling method and system, and computer storage medium
WO2020147385A1 (en) Data entry method and apparatus, terminal and computer-readable storage medium
WO2021012481A1 (en) System performance monitoring method and apparatus, device, and storage medium
WO2021003923A1 (en) Freeswitch monitoring method, device, storage medium, and apparatus
WO2020119115A1 (en) Data verification method, device, apparatus, and storage medium
WO2012100607A1 (en) Terminal desktop processing system, terminal, server and method
WO2018201774A1 (en) Data approval method, apparatus, device, and computer readable storage medium
WO2018010507A1 (en) Awakening monitoring method of terminal system, storage medium, terminal, and electronic device
WO2020019405A1 (en) Database monitoring method, device and apparatus, and computer storage medium
WO2021003956A1 (en) Product information management method, apparatus and device, and storage medium
WO2020253135A1 (en) Automated analysis method and device, user equipment, and storage medium
WO2019024485A1 (en) Data sharing method and device and computer readable storage medium
WO2009136740A2 (en) Method and apparatus for managing binding information about a bundle installed remotely in an osgi service platform
WO2020062658A1 (en) Contract generation method and apparatus, and device and storage medium
WO2020077832A1 (en) Cloud desktop access method, apparatus and device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17910830

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11.03.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 17910830

Country of ref document: EP

Kind code of ref document: A1