CN111045893B - Method, device and system for executing monitoring task, storage medium and electronic device - Google Patents

Method, device and system for executing monitoring task, storage medium and electronic device Download PDF

Info

Publication number
CN111045893B
CN111045893B CN201911276925.8A CN201911276925A CN111045893B CN 111045893 B CN111045893 B CN 111045893B CN 201911276925 A CN201911276925 A CN 201911276925A CN 111045893 B CN111045893 B CN 111045893B
Authority
CN
China
Prior art keywords
monitoring
script
target
scripts
data source
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.)
Active
Application number
CN201911276925.8A
Other languages
Chinese (zh)
Other versions
CN111045893A (en
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.)
Chinabank Payments Beijing Technology Co Ltd
Original Assignee
Chinabank Payments Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chinabank Payments Beijing Technology Co Ltd filed Critical Chinabank Payments Beijing Technology Co Ltd
Priority to CN201911276925.8A priority Critical patent/CN111045893B/en
Publication of CN111045893A publication Critical patent/CN111045893A/en
Application granted granted Critical
Publication of CN111045893B publication Critical patent/CN111045893B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Abstract

The application discloses a method, a device and a system for executing a monitoring task, a storage medium and an electronic device. Wherein the method comprises the following steps: receiving a monitoring request sent by monitoring equipment, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services requested to be monitored by the monitoring request in a plurality of services; searching a first script for implementing a target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task; the target monitoring task is implemented using the first script. The application solves the technical problem of complicated monitoring operation in the related technology.

Description

Method, device and system for executing monitoring task, storage medium and electronic device
Technical Field
The application relates to the field of internet, in particular to a method, a device and a system for executing a monitoring task, a storage medium and an electronic device.
Background
In order to ensure the normal operation of the network transaction platform, the network transaction platform needs to be monitored, and along with the increase of the business volume of the e-commerce network transaction platform, the explosive growth of business types and the sudden increase of business complexity, the monitoring range of the network transaction platform is wider and wider, the monitoring content is more and more, and the processing speed of the sudden transaction data monitoring and early warning information is faster and faster.
The inventor finds that the current monitoring mode is complicated in the process of realizing the application, and writes a monitoring program for a new service when the new service is on line or needs to be monitored, and the monitoring program runs after debugging and verification to realize the monitoring of the service.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a method, a device and a system for executing a monitoring task, a storage medium and an electronic device, which are used for at least solving the technical problem that the monitoring operation is complicated in the related technology.
According to an aspect of the embodiment of the present application, there is provided a method for performing a monitoring task, including: receiving a monitoring request sent by monitoring equipment, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services requested to be monitored by the monitoring request in a plurality of services; searching a first script for implementing a target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task; the target monitoring task is implemented using the first script.
According to another aspect of the embodiment of the present application, there is also provided an apparatus for performing a monitoring task, including: the receiving unit is used for receiving a monitoring request sent by the monitoring equipment, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services requested to be monitored by the monitoring request in a plurality of services; the searching unit is used for searching a first script for implementing the target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task; and the execution unit is used for implementing the target monitoring task by using the first script.
According to another aspect of the embodiment of the present application, there is also provided a system for performing a monitoring task, including: the monitoring device is used for sending a monitoring request, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services requested to be monitored by the monitoring request in a plurality of services; a database for storing target data; and the server is used for searching a first script for implementing the target monitoring task from the plurality of scripts under the condition that the monitoring request is received, and implementing the target monitoring task by utilizing the first script, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above-described method when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the method described above by the computer program.
In the embodiment of the application, when the monitoring request is received, the script corresponding to the target monitoring task is selected from the plurality of pre-created scripts to run, and the repeated writing and debugging of the monitoring program are not needed, so that the technical problem of complicated monitoring operation in the related technology can be solved, and the technical effect of simplifying the complexity of the monitoring operation is further achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment of a method of monitoring execution of tasks according to an embodiment of the application;
FIG. 2 is a flow chart of an alternative method of monitoring task execution in accordance with an embodiment of the present application;
FIG. 3 is a flow chart of an alternative method of monitoring task execution in accordance with an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative monitoring task performing device according to an embodiment of the present application; the method comprises the steps of,
fig. 5 is a block diagram of a structure of a terminal according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiment of the application, a method embodiment of a method for monitoring execution of a task is provided.
Alternatively, in the present embodiment, the above-described execution method of the monitoring task may be applied to a hardware environment constituted by the monitoring device 101, the server 103, and the database 105 as shown in fig. 1. As shown in fig. 1, a server 103 is connected to a monitoring device 101 and a database 105 through a network, the monitoring device 101 is configured to send a monitoring request to the server 103 to request to perform a target monitoring task on target data in a target service, the server 103 searches a first script for performing the target monitoring task from a plurality of scripts when receiving the monitoring request, and performs the target monitoring task by using the first script, and the database is configured to store the target data. Such networks include, but are not limited to: the monitoring device 101 is not limited to a PC, a mobile phone, a tablet computer, a PC computer, or the like.
The method for executing the monitoring task according to the embodiment of the present application may be executed by the server 103, or may be executed by the server 103, the monitoring device 101, and the database 105 together. FIG. 2 is a flow chart of an alternative method of monitoring the execution of tasks according to an embodiment of the application, as shown in FIG. 2, the method may include the steps of:
in step S202, the server receives a monitoring request sent by the monitoring device, where the monitoring request is used to request to execute a target monitoring task on target data in a target service.
The target service is a service requested to be monitored by a monitoring request in the plurality of services, in other words, any service in the plurality of services can be executed by selecting a script representing a monitoring task from a plurality of scripts in common according to the monitoring task to be executed when the monitoring task is required to be executed.
In step S204, the server searches a first script for implementing a target monitoring task from a plurality of scripts, where each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, in other words, code logic in each script program is task logic of a corresponding monitoring task, monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks includes the target monitoring task.
In step S206, the server uses the first script to implement the target monitoring task.
In the related art, when a new service is on line or needs to be monitored, a monitoring program is required to be written for the new service, and the monitoring program is debugged and verified and then operated so as to realize the monitoring of the service. The following further details the technical scheme of the present application in connection with the steps shown in fig. 2.
In the technical solution provided in step S202, in the monitoring field, a manager needs to monitor various running states of a platform (such as a transaction platform), the states are mainly represented by various technical indexes and service indexes, and taking the state of the transaction platform as an example, common technical indexes and service indexes are as follows: the connection number of the current port, the connection state of the current port, the utilization rate of the system memory, the success rate of the transaction, the transaction time delay, the total amount of service data, the success number of the service, the success rate, whether the service data are abnormal or not and the like.
For various technical indexes and business indexes, corresponding scripts can be created according to the processing flow of each monitoring task in a plurality of monitoring tasks to obtain a plurality of scripts, script identifiers are created for each script in the plurality of scripts, namely, scripts corresponding to the monitoring tasks of each technical index and each business index are generated in advance (logic in the scripts comprises execution logic of the monitoring tasks), script identifiers (or identifiers of the monitoring tasks) of each script are sent to monitoring equipment, and when a certain technical index or business index needs to be monitored, an administrator can automatically generate a monitoring request by using the monitoring equipment or the monitoring equipment, and the monitoring request carries the script identifiers or the identifiers of the monitoring tasks so as to search related scripts.
In the technical solution provided in step S204, after creating the plurality of scripts in the above manner, when searching the first script for implementing the target monitoring task from the plurality of scripts, the script identifier carried in the monitoring request may be obtained, and the first script corresponding to the script identifier carried in the monitoring request may be searched from the plurality of scripts.
In the technical solution provided in step S206, implementing the target monitoring task by using the first script includes: configuring a target data source in the first script to obtain a second script, wherein the target data source is a data source of target data in target service, and the configuration can be to configure a direct target data source, such as directly writing a high data source in the first script, or to configure an indirect target data source, such as writing associated information (such as a data source identifier and the like) of the target data source in the first script; the second script is executed by a script execution engine, which is an engine for running scripts, to implement the target monitoring task.
Optionally, configuring the target data source in the first script includes steps 1-4 as follows:
step 1, acquiring a data source identifier carried in a monitoring request, wherein the data source identifier is used for representing a target data source, for example, an index to be monitored is a transaction success rate, and the target data source can be a source address identifier (such as an identifier of a database address) of transaction data;
step 2, searching a target data source corresponding to the data source identifier from a data source set, wherein the data source set can store the corresponding relation between source addresses (such as addresses of a database) of all the data sources and the data source identifier, and then can be matched to the corresponding data source address according to the data source identifier;
step 3, generating a structured query statement (such as SQL statement) or data source parameters (i.e. parameters representing the address of the data source) for querying the target data according to the target data source;
and 4, storing the structured query statement or the data source parameter in a preset position in the first script, wherein the script is an abstraction of the monitoring logic, and meanwhile, the position for filling the monitoring data source is reserved, and the preset position is the position for filling the target data source.
Optionally, executing the second script by the script execution engine to perform the target monitoring task includes steps 1-2 as shown below:
step 1, executing a first part of logic in a second script through a script execution engine, wherein the first part of logic is used for transmitting a structured query statement or a data source parameter in the second script to a database where target data is located, and the database is used for searching the target data by utilizing the structured query statement or the data source parameter;
and step 2, under the condition that target data returned by the database is received, executing a second part of logic in a second script by the script execution engine, wherein the second part of logic is used for converting the target data into data in a preset format and processing the target data according to a monitoring flow.
As an alternative embodiment, the technical solution of the present application is described in detail below in connection with a specific implementation.
For monitoring the service index, a mode may be adopted that corresponding query related function codes are pre-built in the database in advance according to the query requirement possibly needed in the database, each function code may correspond to a User Interface UI (User Interface, medium for interaction and information exchange between the system and the User), along with continuous input of real-time data into the database, then data query is performed in the database and aggregation is performed through the UI control corresponding to the pre-built function code, so that health conditions of various indexes are given. And for the configuration of the technical indexes, a specific UI control needs to be operated to configure the index types and the monitoring objects.
This UI control-based approach is simple and intuitive, but less flexible. There is a lack of adaptability to new or complex monitoring logic, metrics, post-processing modes, etc. After a period of operation, with more and more monitored indexes, the indexes are queried more and more frequently, and each time the indexes are added, the corresponding query codes are needed to be newly added to execute corresponding logic, so that the defects of the mode are more and more remarkable, and the main appearance is that: the new control corresponding to the data query function is added in the interface, the system is generally required to be subjected to version iteration and upgrade and online, in the code development process, in order to ensure the stability of the system after version update, any new version online (needing internal test, online test and the like) is complicated, team coordination, test and the like are needed in the interface, the online time interval between different versions is generally larger, the version update frequency is lower, and the newly added query and monitoring requirements cannot be met.
In order to overcome the defects, the application also provides a method for configuring monitoring task parameters and logic without a UI control, namely, the method is realized by a script, the script is stored in a database or a cache, the collection of each monitoring index depends on the call of an index collection function, an index collection function and an alarm notification function are provided in a script running environment, and the method combines the support of the script on data processing capability, so that the simple, flexible, quick and function-rich monitoring of various indexes of the system running is realized, as shown in fig. 3, the specific steps of the scheme are as follows:
step S302, establishing scripts of different monitoring tasks, and configuring corresponding script identification IDs for each script.
In step S304, the monitoring task is started, and the timing of the timer may be started, for example, by timing triggering.
Step S306, detecting whether to trigger the inquiry request (if the timer is triggered when the timer meets a certain target threshold), and searching the ID of the corresponding script according to the data inquiry request.
Step S308, loading the corresponding script according to the ID.
In step S310, the script is executed by the script execution engine to query the data source for the required target query data (i.e., to collect the index).
This step may include: configuring a data source ID in a script, and putting a specific SQL text or other parameters corresponding to query in the script; searching a corresponding data source according to the data source ID, and transmitting SQL text or other parameters to the data source; the data source executes SQL text or other parameters; and receiving the returned data, and performing format conversion on the data to obtain target query data.
In step S312, the target query data is processed (i.e., the processing index).
Step S314, post-processing such as notification (e.g., data alarm), remote call, etc. is performed.
Step S316, judging whether to continue, if yes, returning to step S310, otherwise, ending.
In the technical scheme of the application, the monitoring parameters and logic are configured into a script form, the monitoring parameters and logic depend on an index collection function and an alarm notification function, and a simple, flexible and functional monitoring configuration scheme is provided by combining the data processing capability provided by the script; in the scheme, in the query database, the UI control can be not newly added in the interface corresponding to the database, but the data query is executed in the numerical control background, so that the query function is newly added, and version upgrading is not relied on.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present application.
According to another aspect of the embodiment of the present application, there is also provided a monitoring task execution device for implementing the above-mentioned monitoring task execution method. FIG. 4 is a schematic diagram of an alternative monitoring task performing device according to an embodiment of the present application, as shown in FIG. 4, the device may include:
a receiving unit 401, configured to receive a monitoring request sent by a monitoring device, where the monitoring request is used to request to execute a target monitoring task on target data in a target service, and the target service is a service requested to be monitored by the monitoring request in multiple services;
a searching unit 403, configured to search a plurality of scripts for a first script for implementing a target monitoring task, where each of the plurality of scripts is configured to implement at least one monitoring task of the plurality of monitoring tasks, where monitoring tasks executed by any two of the plurality of scripts are different, and the plurality of monitoring tasks includes the target monitoring task;
and the execution unit 405 is configured to implement the target monitoring task by using the first script.
It should be noted that, the receiving unit 401 in this embodiment may be used to perform step S202 in the embodiment of the present application, the searching unit 403 in this embodiment may be used to perform step S204 in the embodiment of the present application, and the executing unit 405 in this embodiment may be used to perform step S206 in the embodiment of the present application.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or hardware as a part of the apparatus in the hardware environment shown in fig. 1.
In the related art, when a new service is on line or needs to be monitored, a monitoring program is required to be written for the new service, and the monitoring program is debugged and verified and then run so as to realize the monitoring of the service.
Optionally, the execution unit includes: the configuration module is used for configuring a target data source in the first script to obtain a second script, wherein the target data source is a data source of target data in target service; and the execution module is used for executing the second script through a script execution engine to implement the target monitoring task, wherein the script execution engine is an engine used for running the script.
Optionally, the configuration module may be further configured to: acquiring a data source identifier carried in a monitoring request, wherein the data source identifier is used for representing a target data source; searching a target data source corresponding to the data source identifier from the data source set; generating a structured query statement or data source parameter for querying target data according to the target data source; and storing the structured query statement or the data source parameter in a preset position in the first script, wherein the preset position is a position for filling in the target data source.
Optionally, the execution module is further operable to: executing a first part of logic in a second script through a script execution engine, wherein the first part of logic is used for transmitting a structured query statement or a data source parameter in the second script to a database where target data is located, and the database is used for searching the target data by utilizing the structured query statement or the data source parameter; and under the condition that target data returned by the database is received, executing a second part of logic in a second script through the script execution engine, wherein the second part of logic is used for converting the target data into data in a preset format.
Optionally, the apparatus of the present application may further comprise: the creating module is used for creating a corresponding script according to the processing flow of each monitoring task in the plurality of monitoring tasks before searching a first script for implementing the target monitoring task from the plurality of scripts to obtain a plurality of scripts, and creating a script identifier for each script in the plurality of scripts.
Optionally, when searching the first script for implementing the target monitoring task from the plurality of scripts, the searching module may acquire a script identifier carried in the monitoring request, and search the first script corresponding to the script identifier carried in the monitoring request from the plurality of scripts.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments. It should be noted that the above modules may be implemented in software or in hardware as part of the apparatus shown in fig. 1, where the hardware environment includes a network environment.
According to another aspect of the embodiment of the present application, there is also provided a server or a terminal for implementing the method for performing the above-mentioned monitoring task.
Fig. 5 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 5, the terminal may include: one or more (only one is shown in fig. 5) processors 501, memory 503, and transmission means 505, as shown in fig. 5, the terminal may further comprise input output devices 507.
The memory 503 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for executing a monitoring task in the embodiment of the present application, and the processor 501 executes the software programs and modules stored in the memory 503, thereby executing various functional applications and data processing, that is, implementing the method for executing a monitoring task described above. Memory 503 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 503 may further include memory located remotely from the processor 501, which may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 505 is used for receiving or transmitting data via a network, and may also be used for data transmission between the processor and the memory. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 505 includes a network adapter (Network Interface Controller, NIC) that may be connected to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 505 is a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
Wherein in particular the memory 503 is used for storing application programs.
The processor 501 may call an application stored in the memory 503 via the transmission means 505 to perform the following steps:
receiving a monitoring request sent by monitoring equipment, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services which are requested to be monitored by the monitoring request in a plurality of services;
searching a first script for implementing the target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task;
and implementing the target monitoring task by using the first script.
The processor 501 is further configured to perform the steps of:
executing a first part of logic in a second script through a script execution engine, wherein the first part of logic is used for transmitting a structured query statement or a data source parameter in the second script to a database where target data is located, and the database is used for searching the target data by utilizing the structured query statement or the data source parameter;
and under the condition that target data returned by the database is received, executing a second part of logic in a second script through the script execution engine, wherein the second part of logic is used for converting the target data into data in a preset format.
By adopting the embodiment of the application, a monitoring request sent by monitoring equipment is provided, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services requested to be monitored by the monitoring request in a plurality of services; searching a first script for implementing a target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task; the first script is utilized to implement a solution of the target monitoring task. When a monitoring request is received, a script corresponding to a target monitoring task is selected from a plurality of scripts created in advance to run, and the monitoring program is not required to be repeatedly written and debugged, so that the technical problem that the monitoring operation is complicated in the related technology can be solved, and the technical effect of simplifying the complexity of the monitoring operation is achieved.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the structure shown in fig. 5 is only illustrative, and the terminal may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 5 is not limited to the structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in fig. 5, or have a different configuration than shown in fig. 5.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The embodiment of the application also provides a storage medium. Alternatively, in the present embodiment, the above-described storage medium may be used for program code of an execution method for executing the monitoring task.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
receiving a monitoring request sent by monitoring equipment, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services requested to be monitored by the monitoring request in a plurality of services;
searching a first script for implementing a target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task;
the target monitoring task is implemented using the first script.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
executing a first part of logic in a second script through a script execution engine, wherein the first part of logic is used for transmitting a structured query statement or a data source parameter in the second script to a database where target data is located, and the database is used for searching the target data by utilizing the structured query statement or the data source parameter;
and under the condition that target data returned by the database is received, executing a second part of logic in a second script through the script execution engine, wherein the second part of logic is used for converting the target data into data in a preset format.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (9)

1. A method of monitoring execution of a task, comprising:
receiving a monitoring request sent by monitoring equipment, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services which are requested to be monitored by the monitoring request in a plurality of services;
searching a first script for implementing the target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task;
implementing the target monitoring task using the first script, including: configuring a target data source in the first script to obtain a second script, wherein the target data source is a data source of the target data in the target service; the second script is executed by a script execution engine, which is an engine for executing a script, to implement the target monitoring task.
2. The method of claim 1, wherein configuring a target data source in the first script comprises:
acquiring a data source identifier carried in the monitoring request, wherein the data source identifier is used for representing the target data source;
searching the target data source corresponding to the data source identifier from a data source set;
generating a structured query statement or data source parameter for querying the target data according to the target data source;
and storing the structured query statement or the data source parameter in a preset position in the first script, wherein the preset position is a position for filling in the target data source.
3. The method of claim 1, wherein executing the second script by a script execution engine to perform the target monitoring task comprises:
executing a first part of logic in the second script through the script execution engine, wherein the first part of logic is used for transmitting a structured query statement or a data source parameter in the second script to a database where the target data are located, and the database is used for searching the target data by using the structured query statement or the data source parameter;
and under the condition that the target data returned by the database is received, executing a second part of logic in the second script by the script execution engine, wherein the second part of logic is used for converting the target data into data in a preset format and monitoring.
4. A method according to any one of claims 1 to 3, wherein prior to finding a first script from a plurality of scripts for performing the target monitoring task, the method further comprises:
creating corresponding scripts according to the processing flow of each monitoring task in the plurality of monitoring tasks to obtain the plurality of scripts, and creating script identifications for each script in the plurality of scripts.
5. The method of claim 4, wherein finding a first script from a plurality of scripts for performing the target monitoring task comprises:
and acquiring script identifications carried in the monitoring request, and searching the first script corresponding to the script identifications carried in the monitoring request from the plurality of scripts.
6. An apparatus for performing a monitoring task, comprising:
the system comprises a receiving unit, a monitoring unit and a monitoring unit, wherein the receiving unit is used for receiving a monitoring request sent by monitoring equipment, the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services which are requested to be monitored by the monitoring request in a plurality of services;
the searching unit is used for searching a first script for implementing the target monitoring task from a plurality of scripts, wherein each script in the plurality of scripts is used for implementing at least one monitoring task in the plurality of monitoring tasks, the monitoring tasks executed by any two scripts in the plurality of scripts are different, and the plurality of monitoring tasks comprise the target monitoring task;
the execution unit is used for implementing the target monitoring task by utilizing the first script;
wherein the execution unit includes: the configuration module is used for configuring a target data source in the first script to obtain a second script, wherein the target data source is a data source of the target data in the target service; and the execution module is used for executing the second script through a script execution engine to implement the target monitoring task, wherein the script execution engine is an engine used for executing the script.
7. A system for monitoring execution of a task, comprising:
the monitoring equipment is used for sending a monitoring request, wherein the monitoring request is used for requesting to execute a target monitoring task on target data in target services, and the target services are services which are requested to be monitored by the monitoring request in a plurality of services;
a database for storing the target data;
the server is configured to search, when the monitoring request is received, a first script for implementing the target monitoring task from multiple scripts, where each of the multiple scripts is configured to implement at least one monitoring task of multiple monitoring tasks, and monitoring tasks executed by any two scripts of the multiple scripts are different, where the multiple monitoring tasks include the target monitoring task, and implement the target monitoring task by using the first script, where the method includes: configuring a target data source in the first script to obtain a second script, wherein the target data source is a data source of the target data in the target service; the second script is executed by a script execution engine, which is an engine for executing a script, to implement the target monitoring task.
8. A storage medium comprising a stored program, wherein the program when run performs the method of any one of the preceding claims 1 to 5.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor performs the method according to any of the preceding claims 1 to 5 by means of the computer program.
CN201911276925.8A 2019-12-12 2019-12-12 Method, device and system for executing monitoring task, storage medium and electronic device Active CN111045893B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911276925.8A CN111045893B (en) 2019-12-12 2019-12-12 Method, device and system for executing monitoring task, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911276925.8A CN111045893B (en) 2019-12-12 2019-12-12 Method, device and system for executing monitoring task, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111045893A CN111045893A (en) 2020-04-21
CN111045893B true CN111045893B (en) 2023-09-22

Family

ID=70235925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911276925.8A Active CN111045893B (en) 2019-12-12 2019-12-12 Method, device and system for executing monitoring task, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111045893B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600713A (en) * 2020-12-24 2021-04-02 上海哔哩哔哩科技有限公司 Data monitoring method and system
CN113010373B (en) * 2021-01-25 2023-08-22 腾讯科技(深圳)有限公司 Data monitoring method and device, electronic equipment and storage medium
CN112817937A (en) * 2021-01-27 2021-05-18 上海臣星软件技术有限公司 Big data monitoring method and device, electronic equipment and computer storage medium
CN115118620A (en) * 2022-06-24 2022-09-27 银清科技有限公司 Configurable monitoring flow method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017067441A1 (en) * 2015-10-19 2017-04-27 广州爱九游信息技术有限公司 Method, device and system for testing application, and non-transient machine-readable storage medium
CN107528870A (en) * 2016-06-22 2017-12-29 腾讯科技(深圳)有限公司 A kind of collecting method and its equipment
CN108847977A (en) * 2018-06-14 2018-11-20 平安科技(深圳)有限公司 A kind of monitoring method of business datum, storage medium and server
CN108958729A (en) * 2017-05-19 2018-12-07 腾讯科技(深圳)有限公司 A kind of data processing method, device and storage medium
CN109257256A (en) * 2018-10-16 2019-01-22 北京信研汇智信息技术有限公司 Apparatus monitoring method, device, computer equipment and storage medium
CN109800145A (en) * 2018-12-13 2019-05-24 深圳壹账通智能科技有限公司 Script execution, device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017067441A1 (en) * 2015-10-19 2017-04-27 广州爱九游信息技术有限公司 Method, device and system for testing application, and non-transient machine-readable storage medium
CN107528870A (en) * 2016-06-22 2017-12-29 腾讯科技(深圳)有限公司 A kind of collecting method and its equipment
CN108958729A (en) * 2017-05-19 2018-12-07 腾讯科技(深圳)有限公司 A kind of data processing method, device and storage medium
CN108847977A (en) * 2018-06-14 2018-11-20 平安科技(深圳)有限公司 A kind of monitoring method of business datum, storage medium and server
CN109257256A (en) * 2018-10-16 2019-01-22 北京信研汇智信息技术有限公司 Apparatus monitoring method, device, computer equipment and storage medium
CN109800145A (en) * 2018-12-13 2019-05-24 深圳壹账通智能科技有限公司 Script execution, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向业务的IT资源监控系统设计;彭洪等;《金融电子化》(第03期);64-67 *

Also Published As

Publication number Publication date
CN111045893A (en) 2020-04-21

Similar Documents

Publication Publication Date Title
CN111045893B (en) Method, device and system for executing monitoring task, storage medium and electronic device
CN103530199B (en) A kind of method, Apparatus and system repairing running software mistake
CN111831548B (en) Dependency relationship topological graph drawing method and device
US11221743B2 (en) Information processing method, terminal, server, and computer storage medium
US20130326502A1 (en) Installing applications remotely
CN104765678A (en) Method and device for testing applications on mobile terminal
CN112073471A (en) Device control method and apparatus, storage medium, and electronic apparatus
CN111209309A (en) Method, device and equipment for determining processing result of data flow graph and storage medium
CN107168765A (en) A kind of method and system of remote compilation software
CN106980565B (en) Upgrading process monitoring method and device
WO2017092458A1 (en) Mobile terminal browser file transmission method and mobile terminal
CN106339273A (en) Application program restoration method, terminal and server
CN112968789A (en) Data acquisition method and device, computer equipment and computer readable medium
CN104504587A (en) Advertisement monitoring method and device, electronic apparatus
CN112328458A (en) Data processing method and device based on flink data engine
CN107370628B (en) Log processing method and system based on embedded points
CN107526584B (en) Data access method and device
CN112087327B (en) Information state acquisition method and apparatus, storage medium, and electronic apparatus
CN110198227B (en) Log file processing method and device, storage medium and electronic device
CN112153146B (en) Operation notification method and apparatus, storage medium, and electronic apparatus
CN111353136B (en) Method and device for processing operation request
CN103795739A (en) Application popularization method, device and system
CN112559124A (en) Model management system and target operation instruction processing method and device
CN112650674A (en) Method for remotely acquiring and debugging webpage log, computer equipment and storage medium
CN105119944B (en) Application starting method and related device

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
GR01 Patent grant
GR01 Patent grant