CN115080336A - Timed task monitoring method and device, server and readable storage medium - Google Patents

Timed task monitoring method and device, server and readable storage medium Download PDF

Info

Publication number
CN115080336A
CN115080336A CN202110281928.1A CN202110281928A CN115080336A CN 115080336 A CN115080336 A CN 115080336A CN 202110281928 A CN202110281928 A CN 202110281928A CN 115080336 A CN115080336 A CN 115080336A
Authority
CN
China
Prior art keywords
data
expected
timing task
task
monitoring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110281928.1A
Other languages
Chinese (zh)
Inventor
刘海龙
董俊峰
强群力
刘超千
赵彤
沈村敬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NetsUnion Clearing Corp
Original Assignee
NetsUnion Clearing Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NetsUnion Clearing Corp filed Critical NetsUnion Clearing Corp
Priority to CN202110281928.1A priority Critical patent/CN115080336A/en
Publication of CN115080336A publication Critical patent/CN115080336A/en
Pending legal-status Critical Current

Links

Images

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/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of data monitoring, in particular to a method and a device for monitoring a timing task, a server and a readable storage medium. Wherein, the method comprises the following steps: acquiring expected data and actual monitoring data of a timing task; judging whether the expected data is matched with the actual monitoring data; and when the expected data is not matched with the actual monitoring data, judging that the timing task is not triggered, and exposing the index data corresponding to the expected data and the actual monitoring data. By implementing the method and the device, the problem that the triggering and execution of the timing task are difficult to monitor due to the fact that actual monitoring data cannot be detected is solved, the triggering and execution of the timing task are monitored in real time, and therefore index data corresponding to the timing task can be pushed in time, and the execution problem of the timing task can be found in time.

Description

Monitoring method and device for timing task, server and readable storage medium
Technical Field
The invention relates to the technical field of data monitoring, in particular to a method and a device for monitoring a timing task, a server and a readable storage medium.
Background
The timing task of the system needs to be monitored in real time to ensure that the timing task of the system can be executed timely and correctly. In the conventional timed task monitoring, a "timed task detection engine" is used to acquire a trigger batch and an execution state of a system timed task, and then the trigger batch and the execution state are pushed to an "index exposure" component, so as to expose monitoring data of the timed task. However, when the "timing task detection engine" itself fails, since the triggering and executing conditions of the timing task cannot be detected, the update information of the timing task cannot be pushed to the "index exposure" component, and further, the data in the "index exposure" component remains unchanged, so that it is difficult for the service monitoring system Prometheus to pull the latest data, and it is difficult to find the execution problem of the timing task in time and trigger an alarm.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a server, and a readable storage medium for monitoring a timing task, so as to solve the problem that it is difficult for the existing monitoring method to find the execution problem of the timing task in time and trigger an alarm.
According to a first aspect, an embodiment of the present invention provides a method for monitoring a timing task, including the following steps: acquiring expected data and actual monitoring data of a timed task, wherein the expected data is used for reflecting the expected data for executing the timed task, and the actual monitoring data is used for reflecting the actual data for executing the timed task; judging whether the expected data is matched with the actual monitoring data; and under the condition that the expected data are not matched with the actual monitoring data, determining that a timing task is not triggered, and exposing index data corresponding to the expected data and the actual monitoring data.
According to the monitoring method of the timing task, the expected data and the actual monitoring data of the timing task are obtained and compared, and whether the expected data are matched with the actual monitoring data or not is determined. And when the expected data is determined not to be matched with the actual monitoring data, judging that the timing task is not triggered, and exposing the expected data and the index data corresponding to the actual monitoring data. According to the method, the expected data and the actual monitoring data of the timing task are obtained, the problem that the actual monitoring data cannot be detected and the triggering and executing of the timing task are difficult to monitor is solved, the triggering and executing of the timing task are monitored in real time, and therefore index data corresponding to the timing task can be pushed in time, so that a monitoring program can pull the latest monitoring data and discover the executing problem of the timing task in time.
With reference to the first aspect, in a first implementation manner of the first aspect, acquiring expected data of a timed task includes: acquiring an expected trigger time point and an expected running state corresponding to the timing task; based on the desired trigger time point and the desired operating state, desired data corresponding to the desired trigger time point and the desired operating state is determined.
According to the monitoring method for the timing task, the expected triggering time point and the expected running state corresponding to the timing task are obtained, and the expected data corresponding to the expected triggering time point and the expected running state are determined based on the expected triggering time point and the expected running state, so that whether the timing task is triggered regularly or not is accurately determined, and the timing task can be correctly executed.
With reference to the first implementation manner of the first aspect, in a second implementation manner of the first aspect, the expected data includes: a desired trigger time and a desired execution success time.
With reference to the first aspect, in a third implementation manner of the first aspect, the actual monitoring data includes: the triggering time of the timing task and the execution success time of the timing task.
With reference to the first aspect or the first embodiment to the second embodiment or the third embodiment of the first aspect, in a fourth embodiment of the first aspect, the method for monitoring a timed task further includes: and when the expected data is matched with the actual monitoring data, updating the actual monitoring data, and exposing the index data corresponding to the expected data and the updated actual monitoring data.
According to the monitoring method for the timing task, provided by the embodiment of the invention, when the expected data is matched with the actual monitoring data, the actual monitoring data is updated, and the expected data and the index data corresponding to the updated actual monitoring data are exposed, so that the timing task is accurately determined to be triggered at regular time, and the actual monitoring data of the timing task can be updated in real time and accurately pulled.
According to a second aspect, an embodiment of the present invention provides a monitoring apparatus for a timed task, including: the timing engine module is used for acquiring expected data of a timing task, and the expected data is used for reflecting the expected data for executing the timing task; the timing task detection engine module is used for acquiring actual monitoring data of a timing task, and the actual monitoring data is used for reflecting the actual data for executing the timing task; the judging module is used for judging whether the expected data is matched with the actual monitoring data; and the judging module is used for determining that the timing task is not triggered and exposing the index data corresponding to the expected data and the actual monitoring data under the condition that the expected data is not matched with the actual monitoring data.
According to the monitoring device for the timed task, provided by the embodiment of the invention, expected data and actual monitoring data of the timed task are obtained and compared, and whether the expected data is matched with the actual monitoring data is determined. And when the expected data is determined not to be matched with the actual monitoring data, judging that the timing task is not triggered, and exposing the expected data and the index data corresponding to the actual monitoring data. The device avoids the problem that the actual monitoring data cannot be detected and the triggering and execution problems of the timing task are difficult to monitor by acquiring the expected data and the actual monitoring data of the timing task, and realizes the real-time monitoring of the triggering and execution of the timing task, so that the index data corresponding to the timing task can be pushed in time, and the monitoring program can pull the latest monitoring data and discover the execution problems of the timing task in time.
With reference to the second aspect, in a first implementation manner of the second aspect, the timing engine module includes: the acquisition submodule is used for acquiring an expected trigger time point and an expected running state corresponding to the timing task; a determination submodule configured to determine, based on the expected trigger time point and the expected operating state, expected data corresponding to the expected trigger time point and the expected operating state.
The monitoring device for the timing task, provided by the embodiment of the invention, can accurately determine whether the timing task is triggered at fixed time or not by acquiring the expected triggering time point and the expected running state corresponding to the timing task and determining the expected data corresponding to the expected triggering time point and the expected running state, thereby ensuring that the timing task can be correctly executed.
According to a third aspect, an embodiment of the present invention provides a monitoring system for a timed task, including: a triggering alarm service module and a monitoring device for the timed task according to the second aspect or the first embodiment of the second aspect, wherein the monitoring device for the timed task is configured to determine whether the timed task is triggered; and the triggering alarm service module is used for sending out the Nodata alarm when the timing task is not triggered.
According to the monitoring system for the timing task, provided by the embodiment of the invention, by acquiring the expected data and the actual monitoring data of the timing task, the problem that the actual monitoring data cannot be detected and the triggering and execution of the timing task are difficult to monitor is solved, the triggering and execution of the timing task are monitored in real time, and therefore, index data corresponding to the timing task can be pushed in time, so that a monitoring program can pull the latest monitoring data and discover the execution problem of the timing task in time. When the timing task is not triggered, the Nodata alarm is sent out by the triggering alarm service module so as to find the execution problem of the timing task in time.
According to a fourth aspect, an embodiment of the present invention provides a server, including: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the method for monitoring a timed task according to the first aspect or any embodiment of the first aspect.
According to a fifth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer instructions are stored, and the computer instructions are configured to cause a computer to execute the monitoring method for a timed task according to the first aspect or any implementation manner of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method of monitoring timed tasks according to an embodiment of the present invention;
FIG. 2 is another flow chart of a method of monitoring a timed task according to an embodiment of the present invention;
FIG. 3 is a block diagram of a monitoring device for timed tasks according to an embodiment of the present invention;
FIG. 4 is another block diagram of a monitoring device for timed tasks according to an embodiment of the present invention;
FIG. 5 is a block diagram of a monitoring system for timing tasks according to an embodiment of the invention;
fig. 6 is a schematic diagram of a hardware structure of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the conventional timed task monitoring, a "timed task detection engine" is used to obtain a trigger batch and an execution state of a system timed task, and then the trigger batch and the execution state are pushed to an "index exposure" component to expose monitoring data of the timed task. However, when the "timing task detection engine" itself fails, since the triggering and executing conditions of the timing task cannot be detected, the update information of the timing task cannot be pushed to the "index exposure" component, and further, the data in the "index exposure" component remains unchanged, so that it is difficult for the service monitoring system Prometheus to pull the latest data, and it is difficult to find the execution problem of the timing task in time and trigger an alarm.
Based on the technical scheme, the method and the device for monitoring the timing task have the advantages that the expected data and the actual monitoring data of the timing task are obtained, the problem that the actual monitoring data cannot be detected to cause difficulty in monitoring triggering and execution of the timing task is solved, and real-time monitoring on triggering and execution of the timing task is realized.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for monitoring timed tasks, wherein the steps illustrated in the flowcharts of the figures may be carried out in a computer system such as a set of computer-executable instructions, and wherein, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be carried out in an order different than the order presented herein.
In this embodiment, a method for monitoring a timed task is provided, which may be used in a server, such as a monitoring system or a monitoring platform formed by a computer server, and fig. 1 is a flowchart of the method for monitoring the timed task according to the embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
and S11, acquiring expected data and actual monitoring data of the timed task, wherein the expected data is used for reflecting the expected data for executing the timed task, and the actual monitoring data is used for reflecting the actual data for executing the timed task.
The timing task is a task executed by the computer system at regular time. For example, 2:00 sends the previous day report. And storing task data corresponding to the timing task in a time sequence database, wherein each piece of data in the time sequence database has a timestamp. The time-series database is a database that generates data according to a time sequence and provides a query function, such as Prometheus, OpenTSDB, and the like, which is not specifically limited in this application.
The expected data is expected data generated by executing the timing task, namely data which is normally triggered to be executed by the corresponding time task. The desired data may include one or more of log entries resulting from performing the timed task, database data corresponding to the timed task, and mail data. For example, 2:00, sending the report of the previous day, wherein the expected report data is the expected data corresponding to the timing task. The acquisition of the probe program may be performed automatically by the desired data. Specifically, the expected data may be a log of the output of the scanning timing task, may be a query as to whether there is corresponding data in the database, or may be a request for receiving mail data through a designated mailbox.
The actual monitoring data is data actually generated by executing the timing task. The actual monitoring data comprises the triggering time of the timing task and the execution success time of the timing task. For example, 2:00, sending the previous report, wherein the actual monitoring data includes the trigger time for sending the previous report and the time for completing the sending of the report, and also includes the actually sent report data.
S12, it is determined whether the expected data matches the actual monitored data.
Comparing the expected data with the actual monitoring data, determining whether the expected data and the actual monitoring data match, executing step S13 when the expected data and the actual monitoring data do not match, otherwise, executing other operations. The other operations may be to store the actual monitoring data, or to continuously acquire the actual monitoring data to determine the expected data and the actual monitoring data, which is not specifically limited herein.
And S13, judging that the timing task is not triggered, and exposing index data corresponding to the expected data and the actual monitoring data.
When the expected data does not match with the actual monitoring data, the timing task is not triggered, and the expected data and the index data corresponding to the actual monitoring data are exposed. The index data is monitoring data generated by executing the timing task.
Specifically, the server may obtain the trigger batch of the timing task and the execution state of the timing task, then push the trigger batch of the timing task and the execution state of the timing task to the index data exposure program, and expose the monitoring data corresponding to the trigger batch of the timing task and the execution state of the timing task by the exposure program. For example, the timing task is triggered every 10 minutes, and the expected monitoring value corresponding to the execution of the timing task is 1, which indicates that the execution state of the timing task is normal. If the actual monitoring value corresponding to the execution of the timing task is 0, the expected data of the timing task is not matched with the actual monitoring data, and the timing task is not triggered, namely the execution state of the timing task is abnormal. At this time, the index data corresponding to the expected data and the actual monitoring data is pushed to the index data exposure program, and the index data exposure program exposes the index data corresponding to the expected data and the actual monitoring data.
According to the monitoring method for the timed task, provided by the embodiment of the invention, expected data and actual monitoring data of the timed task are obtained and compared, and whether the expected data is matched with the actual monitoring data is determined. And when the expected data is determined not to be matched with the actual monitoring data, judging that the timing task is not triggered, and exposing the expected data and the index data corresponding to the actual monitoring data. According to the method, the expected data and the actual monitoring data of the timing task are obtained, the problem that the actual monitoring data cannot be detected and the triggering and executing of the timing task are difficult to monitor is solved, the triggering and executing of the timing task are monitored in real time, and therefore index data corresponding to the timing task can be pushed in time, so that a monitoring program can pull the latest monitoring data and discover the executing problem of the timing task in time.
In this embodiment, a method for monitoring a timed task is provided, which may be used in a server, such as a monitoring system or a monitoring platform formed by a computer server, and fig. 2 is a flowchart of the method for monitoring a timed task according to an embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
and S21, acquiring expected data of the timing task and actual monitoring data.
Specifically, the step S21 may include the following steps:
and S211, acquiring an expected trigger time point and an expected running state corresponding to the timing task.
The expected trigger time point is the trigger time corresponding to the timing task. The expected running state is running information after the timing task is triggered. For example, if the timing task is triggered every 10 minutes, the desired trigger time points may be 12:00, 12:10, 12:20, 12:30, etc. For the detailed description of the timing task, refer to the corresponding related description of the above embodiments, and are not described herein again.
S212, based on the desired trigger time point and the desired operating state, desired data corresponding to the desired trigger time point and the desired operating state is determined.
And obtaining an expected running state corresponding to the execution of each timing task after the timing task is triggered at the expected trigger time point corresponding to the expected trigger time point of the timing task. For the detailed description of the desired data, refer to the corresponding related description of the above embodiments, and are not repeated herein. For example, if the execution of the timing task requires 1 minute, after the timing task is triggered at 12:00, the expected running state of the timing task, which is executed between 12:00 and 12:01, can be obtained.
And S213, acquiring actual monitoring data of the timing task. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
S22, it is determined whether the expected data matches the actual monitored data.
Comparing the expected data with the actual monitoring data, determining whether the expected data and the actual monitoring data match, executing step S13 when the expected data and the actual monitoring data do not match, otherwise executing step S14.
And S23, judging that the timing task is not triggered, and exposing index data corresponding to expected data and actual monitoring data. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And S24, updating the actual monitoring data and exposing the expected data and the index data corresponding to the updated actual monitoring data.
When the expected data is matched with the actual monitoring data, the timing task is triggered and is in a normal execution state, at this time, the actual monitoring data corresponding to the timing task in the time sequence database can be updated, and the updated actual monitoring data is pushed to the index data exposure program, so that the index data exposure program exposes the expected data corresponding to the timing task and the updated actual monitoring data.
Specifically, if the timing task is triggered every 10 minutes, the monitoring value is 1, which indicates that the execution state of the timing task is normal. When the timing task is not executed normally, the format of the monitoring index data pushed to the index data exposure program is as follows:
sched_gfs_task_status{time=”2020-11-12.12:00”}=1
sched_gfs_task_status{time=”2020-11-12.12:20”}=1
sched_gfs_task_status{time=”2020-11-12.12:30”}=1
when the timing task is not normally executed, the format of the monitoring index data pushed to the index data exposure program is as follows:
sched_gfs_task_status{time=”2020-11-12.12:10”}=0
at this time, an alarm may be triggered to enable the technician to take appropriate resolution in time.
According to the monitoring method for the timing task, provided by the embodiment of the invention, whether the timing task is triggered at fixed time or not can be accurately determined by acquiring the expected data and the actual monitoring data of the timing task, so that the timing task can be correctly executed. The expected data and the actual monitoring data are compared, when the expected data are determined to be not matched with the actual monitoring data, the timing task is judged not to be triggered, and the index data corresponding to the expected data and the actual monitoring data are exposed, so that the problem that the actual monitoring data cannot be detected to difficultly monitor triggering and execution of the timing task is avoided, the real-time monitoring on triggering and execution of the timing task is realized, the index data corresponding to the timing task can be pushed in time, and a monitoring program can pull the latest monitoring data and discover the execution problem of the timing task; when the expected data are matched with the actual monitoring data, the actual monitoring data are updated, and the index data corresponding to the expected data and the updated actual monitoring data are exposed, so that the timed task is accurately determined to be triggered at regular time, and the fact that the actual monitoring data of the timed task can be updated in real time and accurately pulled is guaranteed.
In this embodiment, a monitoring device for a timing task is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and the description of the device that has been already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The present embodiment provides a monitoring device for a timed task, as shown in fig. 3, including:
and the timing engine module 31 is used for acquiring expected data of the timing task, and the expected data is used for reflecting the expected data for executing the timing task. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And the timed task detection engine module 32 is configured to obtain actual monitoring data of the timed task, where the actual monitoring data is used to reflect actual data for executing the timed task. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And a judging module 33, configured to judge whether the expected data matches the actual monitored data. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And the judging module 34 is configured to determine that the timing task is not triggered and expose index data corresponding to the expected data and the actual monitoring data when the expected data is not matched with the actual monitoring data. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
According to the monitoring device for the timing task, provided by the embodiment of the invention, by acquiring the expected data and the actual monitoring data of the timing task, the problem that the actual monitoring data cannot be detected and the triggering and execution of the timing task are difficult to monitor is solved, the triggering and execution of the timing task are monitored in real time, and therefore, index data corresponding to the timing task can be pushed in time, so that a monitoring program can pull the latest monitoring data and discover the execution problem of the timing task in time.
The present embodiment provides a monitoring device for a timed task, as shown in fig. 4, including:
and a timing engine module 41 for acquiring the expected data of the timing task.
Specifically, the timing engine module 41 includes:
the first obtaining submodule 411 is configured to obtain an expected trigger time point corresponding to the timing task. For detailed description, reference is made to the corresponding related description of the above embodiments, and details are not repeated herein.
A determination sub-module 412 for determining the desired data corresponding to the desired trigger time point based on the desired trigger time point. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And a second obtaining submodule 413, configured to obtain actual monitoring data of the timing task. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And the timed task detection engine module 42 is used for acquiring actual monitoring data of the timed task. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And a judging module 43, configured to judge whether the expected data matches the actual monitored data. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
And the judging module 44 is configured to judge that the timing task is not triggered when the expected data is not matched with the actual monitoring data, and expose index data corresponding to the expected data and the actual monitoring data. For a detailed description, refer to the corresponding related description of the above embodiments, which is not repeated herein.
According to the monitoring device for the timing task, the expected triggering time point corresponding to the timing task is obtained, and the expected data corresponding to the expected triggering time point is determined based on the expected triggering time point, so that whether the timing task is triggered regularly or not can be accurately determined, and the timing task can be correctly executed.
The timed task monitoring device in this embodiment is in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory executing one or more software or fixed programs, and/or other devices that can provide the above-described functions.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
An embodiment of the present invention further provides a monitoring system for a timing task, as shown in fig. 5, fig. 5 is a block diagram of a structure of the monitoring system for a timing task according to an optional embodiment of the present invention, where the monitoring system includes: triggering an alarm service module 51 and a monitoring device 52 for timed tasks. The triggering alarm service module 51 is configured to send an nondata alarm when the timed task is not triggered. Specifically, the monitoring system for the timed task may set the acquired monitoring data to be in a normal execution state, and if the monitoring data is not available, a fault is considered to occur, and an alarm is triggered.
According to the monitoring system for the timing task, provided by the embodiment of the invention, by acquiring the expected data and the actual monitoring data of the timing task, the problem that the actual monitoring data cannot be detected and the triggering and execution of the timing task are difficult to monitor is solved, the triggering and execution of the timing task are monitored in real time, and therefore, index data corresponding to the timing task can be pushed in time, so that a monitoring program can pull the latest monitoring data and discover the execution problem of the timing task in time. When the timing task is detected not to be triggered, the Nodata alarm is sent out through the trigger alarm service module, so that the execution problem of the timing task can be found in time.
The embodiment of the present invention further provides a server, which has the monitoring device for the timed task shown in fig. 3 or fig. 4.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a server according to an alternative embodiment of the present invention, and as shown in fig. 6, the server may include: at least one processor 601, such as a CPU (Central Processing Unit), at least one communication interface 603, memory 604, and at least one communication bus 602. Wherein a communication bus 602 is used to enable the connection communication between these components. The communication interface 603 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 603 may also include a standard wired interface and a standard wireless interface. The Memory 604 may be a high-speed RAM (Random Access Memory) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 604 may optionally be at least one storage device located remotely from the processor 601. Wherein the processor 601 may be in connection with the apparatus described in fig. 3 or fig. 4, the memory 604 stores an application program, and the processor 601 calls the program code stored in the memory 604 for performing any of the method steps described above.
The communication bus 602 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus. The communication bus 602 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The memory 604 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 604 may also comprise a combination of the above types of memory.
The processor 601 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 601 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 604 is also used for storing program instructions. The processor 601 may call program instructions to implement the method for monitoring timed tasks as shown in the embodiments of fig. 1 and 2 of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the processing method of the monitoring method of the timing task in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A monitoring method of a timing task is characterized by comprising the following steps:
acquiring expected data and actual monitoring data of a timing task, wherein the expected data is used for reflecting the expected data for executing the timing task, and the actual monitoring data is used for reflecting the actual data for executing the timing task;
judging whether the expected data is matched with the actual monitoring data;
and under the condition that the expected data are not matched with the actual monitoring data, determining that a timing task is not triggered, and exposing index data corresponding to the expected data and the actual monitoring data.
2. The method of claim 1, wherein obtaining desired data for a timed task comprises:
acquiring an expected trigger time point and an expected running state corresponding to the timing task;
based on the desired trigger time point and the desired operating state, desired data corresponding to the desired trigger time point and the desired operating state is determined.
3. The method of claim 2, wherein the expected data comprises: a desired trigger time and a desired execution success time.
4. The method of claim 1, wherein the actual monitoring data comprises: the triggering time of the timing task and the execution success time of the timing task.
5. The method according to any one of claims 1-4, further comprising:
and when the expected data is matched with the actual monitoring data, updating the actual monitoring data, and exposing the index data corresponding to the expected data and the updated actual monitoring data.
6. A timed task monitoring device, comprising:
the timing engine module is used for acquiring expected data of a timing task, and the expected data is used for reflecting expected data for executing the timing task;
the timing task detection engine module is used for acquiring actual monitoring data of a timing task, and the actual monitoring data is used for reflecting the actual data for executing the timing task;
the judging module is used for judging whether the expected data is matched with the actual monitoring data;
and the judging module is used for determining that the timing task is not triggered and exposing the index data corresponding to the expected data and the actual monitoring data under the condition that the expected data is not matched with the actual monitoring data.
7. The apparatus of claim 6, wherein the timing engine module comprises:
the acquisition submodule is used for acquiring an expected trigger time point and an expected running state corresponding to the timing task;
a determination submodule configured to determine, based on the expected trigger time point and the expected operating state, expected data corresponding to the expected trigger time point and the expected operating state.
8. A timed task monitoring system, comprising: a triggering alarm service module, and a monitoring device of a timed task according to claim 6 or 7,
the monitoring device of the timing task is used for judging whether the timing task is triggered or not;
and the triggering alarm service module is used for sending out the Nodata alarm when the timing task is not triggered.
9. A server, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method of monitoring timed tasks according to any one of claims 1 to 5.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to execute the method of monitoring timed tasks according to any one of claims 1 to 5.
CN202110281928.1A 2021-03-16 2021-03-16 Timed task monitoring method and device, server and readable storage medium Pending CN115080336A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110281928.1A CN115080336A (en) 2021-03-16 2021-03-16 Timed task monitoring method and device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110281928.1A CN115080336A (en) 2021-03-16 2021-03-16 Timed task monitoring method and device, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN115080336A true CN115080336A (en) 2022-09-20

Family

ID=83245685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110281928.1A Pending CN115080336A (en) 2021-03-16 2021-03-16 Timed task monitoring method and device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN115080336A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221905A (en) * 2019-05-22 2019-09-10 网联清算有限公司 Timed task monitoring method, device, system, equipment and storage medium
CN111476539A (en) * 2020-04-07 2020-07-31 深圳市分期乐网络科技有限公司 Task monitoring method and device, computer equipment and storage medium
CN111831508A (en) * 2020-06-12 2020-10-27 新浪网技术(中国)有限公司 Dynamic monitoring data acquisition method and device
CN112486645A (en) * 2020-11-27 2021-03-12 深圳乐信软件技术有限公司 Timed task monitoring method and device, electronic equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221905A (en) * 2019-05-22 2019-09-10 网联清算有限公司 Timed task monitoring method, device, system, equipment and storage medium
CN111476539A (en) * 2020-04-07 2020-07-31 深圳市分期乐网络科技有限公司 Task monitoring method and device, computer equipment and storage medium
CN111831508A (en) * 2020-06-12 2020-10-27 新浪网技术(中国)有限公司 Dynamic monitoring data acquisition method and device
CN112486645A (en) * 2020-11-27 2021-03-12 深圳乐信软件技术有限公司 Timed task monitoring method and device, electronic equipment and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PENGUINHE2006: "如何查看crontab定时任务是否执行", Retrieved from the Internet <URL:https://jingyan.baidu.com/article/73c3ce28e7b298e50343d925.html> *

Similar Documents

Publication Publication Date Title
CN110224858B (en) Log-based alarm method and related device
CN108845912B (en) Service interface calls the alarm method of failure and calculates equipment
CN109218407B (en) Code management and control method based on log monitoring technology and terminal equipment
US11310140B2 (en) Mitigating failure in request handling
CN111092865B (en) Security event analysis method and system
CN113448862B (en) Software version testing method and device and computer equipment
CN114884840A (en) Application health state checking method and electronic equipment
CN113760677A (en) Abnormal link analysis method, device, equipment and storage medium
CN112068935A (en) Method, device and equipment for monitoring deployment of kubernets program
CN110633165B (en) Fault processing method, device, system server and computer readable storage medium
CN115080336A (en) Timed task monitoring method and device, server and readable storage medium
CN112241355A (en) Link tracking method, system, computer readable storage medium and electronic device
CN111506641A (en) Data management method, data acquisition platform, data management system and storage medium
CN114116282B (en) Method and device for reporting and repairing network additional storage faults
CN115442209A (en) Fault detection method and device, electronic equipment and storage medium
CN113238901A (en) Multi-device automatic testing method and device, storage medium and computer device
CN110362464B (en) Software analysis method and equipment
CN112527521B (en) Message processing method and device
CN115080337A (en) Data monitoring method, device, system, server and readable storage medium
CN116484373B (en) Abnormal process checking and killing method, system, device, computer equipment and storage medium
CN112134951B (en) Data transmission method, device, electronic equipment and storage medium
CN117707895A (en) Method and device for canceling abnormal data alarm, computer equipment and storage medium
CN112817623B (en) Method and device for publishing application program, mobile terminal and readable storage medium
CN112882926A (en) Multi-service line tagging method and device, electronic equipment and readable storage medium
CN110430093B (en) Data processing method and device and computer readable storage medium

Legal Events

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