CN110795315A - Method and device for monitoring service - Google Patents

Method and device for monitoring service Download PDF

Info

Publication number
CN110795315A
CN110795315A CN201810862004.9A CN201810862004A CN110795315A CN 110795315 A CN110795315 A CN 110795315A CN 201810862004 A CN201810862004 A CN 201810862004A CN 110795315 A CN110795315 A CN 110795315A
Authority
CN
China
Prior art keywords
monitoring
data source
alarm
service
timing task
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
CN201810862004.9A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810862004.9A priority Critical patent/CN110795315A/en
Publication of CN110795315A publication Critical patent/CN110795315A/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/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and a device for monitoring business, and relates to the technical field of computers. One embodiment of the method comprises: creating a service monitoring table of the target service, and inputting monitoring parameters of the target service into the service monitoring table; generating a timing task of the target service according to the monitoring parameters; and executing the timing task according to the monitoring parameters and the unique identifier of the timing task to complete the monitoring of the target service. The implementation mode automatically generates the timing task according to the monitoring parameters input into the service monitoring table, and then executes the timing task, so that the effect of monitoring the service is achieved, the maintenance cost of the code is reduced, and the efficiency of monitoring the service is improved.

Description

Method and device for monitoring service
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for monitoring a service.
Background
In recent years, with continuous innovation and progress of information technology, industries such as social networking, internet e-commerce, internet insurance, internet banking and the like are rapidly developed. Therefore, more and more business systems are needed, and operators need to master the operation condition of the business systems, so that the normal operation of the business is ensured, and the risk occurrence probability is reduced to the minimum. How to monitor the business is of great significance today in the rapid development of the information technology industry.
In the prior art, when monitoring whether a certain service is in normal circulation in a service system, a customized timing task is usually developed in the service system, data is checked in a database at regular time, logic check is performed on the checked data in a hard coding mode, and an alarm is given if the detected data is not in a normal range.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art: in the method for monitoring the service in the prior art, each time one service monitoring is added, a corresponding customized code needs to be developed, so that the maintenance cost is high; in the method for monitoring the service in the prior art, when the alarm strategy or the query condition is adjusted, the code needs to be changed.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for monitoring a service, which can reduce the maintenance cost of a code and improve the efficiency of monitoring the service.
To achieve the above object, according to an aspect of an embodiment of the present invention, a method for monitoring a service is provided.
The method for monitoring the service of the embodiment of the invention comprises the following steps: creating a service monitoring table of a target service, and inputting a monitoring parameter of the target service into the service monitoring table; generating a timing task of the target service according to the monitoring parameters; and executing the timing task according to the monitoring parameters and the unique identifier of the timing task to complete the monitoring of the target service.
Optionally, the monitoring parameters include: unique identification of data source, query language, alarm policy, alarm description, time parameter, and alarm contact.
Optionally, after generating the timing task of the target service, the method further includes: and setting the execution time frequency of the timing task according to the time parameter.
Optionally, executing the timing task according to the monitoring parameter and the unique identifier of the timing task includes: acquiring the unique identifier of the data source and the query language according to the unique identifier of the timing task, and determining the data source according to the unique identifier of the data source; acquiring a query result from the data source by using the query language, and transmitting the query result into the alarm strategy to acquire an alarm result; and if the alarm result is true, sending the alarm description to the alarm contact person.
Optionally, determining the data source according to the unique identifier of the data source includes: and dynamically setting a route to the data source according to the unique identifier of the data source by utilizing a tangential programming oriented technology, thereby determining the data source.
Optionally, the alarm strategy is a boolean expression.
To achieve the above object, according to still another aspect of the embodiments of the present invention, an apparatus for monitoring a service is provided.
The device for monitoring the service of the embodiment of the invention comprises: the system comprises a creating module, a monitoring module and a processing module, wherein the creating module is used for creating a service monitoring table of a target service and inputting a monitoring parameter of the target service into the service monitoring table; the generating module is used for generating a timing task of the target service according to the monitoring parameters; and the execution module is used for executing the timing task according to the monitoring parameters and the unique identifier of the timing task so as to complete the monitoring of the target service.
Optionally, the monitoring parameters include: unique identification of data source, query language, alarm policy, alarm description, time parameter, and alarm contact.
Optionally, after generating the timing task of the target service, the generating module is further configured to: and setting the execution time frequency of the timing task according to the time parameter.
Optionally, the execution module is further configured to: acquiring the unique identifier of the data source and the query language according to the unique identifier of the timing task, and determining the data source according to the unique identifier of the data source; acquiring a query result from the data source by using the query language, and transmitting the query result into the alarm strategy to acquire an alarm result; and if the alarm result is true, sending the alarm description to the alarm contact person.
Optionally, the execution module is further configured to: and dynamically routing the data source according to the unique identifier of the data source by using a tangential programming oriented technology so as to determine the data source.
Optionally, the alarm strategy is a boolean expression.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by one or more processors, the one or more processors implement the method for monitoring the service according to the embodiment of the invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements a method of monitoring a service of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: the timing task can be automatically generated according to the monitoring parameters input into the service monitoring table, and then the timing task is executed, so that the effect of monitoring the service is achieved, the maintenance cost of the code can be reduced, and the efficiency of the monitoring service is improved; in the embodiment of the invention, the execution time frequency of the timing task is set according to the time parameter, so that the setting of the timing task can be perfected, and the service monitoring efficiency is improved; in the embodiment of the invention, the monitoring parameters of the target service are obtained according to the unique identifier of the timing task, and then the monitoring parameters are utilized to monitor and alarm the target service, so that the change of codes can be reduced; in the embodiment of the invention, the data source is dynamically set by using the tangential programming oriented technology, so that the query language can be ensured to be executed in the corresponding data source; the alarm strategy in the embodiment of the invention is a Boolean expression, so that the alarm description can be quickly sent to the contact person according to the result of the expression, and the efficiency of service monitoring is improved. Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a method of monitoring traffic according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a main flow of a method of monitoring traffic according to a referential embodiment of the present invention;
FIG. 3 is a schematic diagram of the main modules of an apparatus for monitoring traffic according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method of monitoring traffic according to an embodiment of the present invention. According to a reference embodiment of the present invention, as shown in fig. 1, the method for monitoring a service mainly includes the following steps:
step S101: and creating a service monitoring table of the target service, and inputting the monitoring parameters of the target service into the service monitoring table. In the invention, the target service to be monitored is service A, and a service monitoring related to service A is added firstly, namely a service monitoring table of service A is established in a service monitoring management module. The service monitoring management module is used for creating, modifying or deleting the service monitoring table. For example, when a service a needs to be monitored, a service monitoring table about the service a is created in the service monitoring management module; when the monitoring of the service A needs to be modified, modifying a service monitoring table related to the service A by a service monitoring management module; when the monitoring of the service A needs to be deleted, the service monitoring management module deletes the service monitoring table related to the service A.
Inputting the monitoring parameters of the target service in the service monitoring table, in the embodiment of the present invention, the monitoring parameters may include: unique identification of data source, query language, alarm policy, alarm description, time parameter, and alarm contact. The unique identification of the data source refers to identification information of the data source to be executed by the query language; the Query Language refers to a Query programming Language for service monitoring, such as SQL (Structured Query Language, SQL for short, is a special purpose programming Language, and is a database Query and programming Language for accessing data and querying, updating, and managing a relational database system); the alarm strategy is an expression for carrying out logic verification on the query result; the alarm description refers to the content of alarm information; the time parameter refers to the time and execution frequency that the timing task needs to be executed, that is, the time and frequency that the target service needs to be monitored, for example, a CRON expression, an expression expressing various time dimensions, which is used to ensure that the timing task is executed at the appointed time; the alarm contact person refers to a contact person sent by the alarm information, and the contact persons are usually stored in a grouping mode, so that the grouping of the contact persons can be changed conveniently.
In the embodiment of the invention, the alarm strategy can be a Boolean expression. The boolean expression is a code statement, which ultimately has two values, true and false. The simplest boolean expression is an equation (equality) that is used to test whether one value is the same as another. The alarm strategy in the invention can be a Boolean expression based on Groovy script, such as "count >100& & count < 1000". The Groovy is an agile development language based on the JVM, and Groovy codes can be well combined with Java codes and can also be used for expanding existing codes. Due to its nature of running on a JVM, Groovy may use libraries written in other Java languages. The JVM is a Java virtual machine, Java being a computer programming language.
Step S102: and generating a timing task of the target service according to the monitoring parameters. After the monitoring parameters are input in step S101, the system automatically generates a timing task related to the target service according to the input monitoring parameters.
As another embodiment of the present invention, after the step S102 generates the timing task of the target service, the method for monitoring the service may further include: and setting the execution time frequency of the timing task according to the time parameter. The step sets the execution time frequency of the timing task according to the time parameter, thereby perfecting the setting of the timing task and improving the efficiency of service monitoring
Step S103: and executing the timing task according to the monitoring parameters and the unique identifier of the timing task to complete the monitoring of the target service. The invention executes the timing task according to the acquired unique identifier of the timing task, thereby achieving the purpose of monitoring the service. The unique identifier of the timing task may be a self-added task number in the database, or may be in other forms, which is not limited in the present invention.
As still another embodiment of the present invention, the executing the timing task according to the monitoring parameter and the unique identifier of the timing task in step S103 may include: acquiring a unique identifier and query language of a data source according to the unique identifier of the timing task, and determining the data source according to the unique identifier of the data source; acquiring a query result from a data source by using a query language, and transmitting the query result into an alarm strategy to acquire an alarm result; and if the alarm result is true, sending the alarm description to an alarm contact person. The specific process of executing the timing task of the invention is as follows: firstly, acquiring a unique identifier of a data source of the target service and a query language needed to be used for monitoring the target service from a timing task according to the unique identifier of the timing task; then determining a data source according to the unique identifier of the data source; then, acquiring a query result from the data source by using a query language, and putting the acquired query result into an alarm strategy for execution to obtain an alarm result; and judging whether the alarm result is true, if so, determining that the alarm is needed, and sending the alarm description information to the alarm contact person. The invention can be sent to the alarm contact person in the form of sending mail or short message, and certainly, the alarm contact person can also be notified in other forms, which is not limited by the invention.
As another embodiment of the present invention, the step of determining the data source according to the unique identifier of the data source may include: and dynamically routing the data source according to the unique identifier of the data source by using a tangential programming oriented technology so as to determine the data source. The unique identifier of the data source is not the attribute information of the data source, but the unique identifier of the data source can find the corresponding data source. The tangential programming oriented technology may be an AOP technology (i.e., a tangent-oriented programming technology, a technology for implementing unified maintenance of program functions by means of a precompilation mode and a runtime dynamic proxy) using Spring (i.e., a design level framework of an open source code) to implement dynamic setting of a data source. The dynamic routing is performed according to the unique identifier of the data source, namely, the routing is performed according to the incoming data source identifier (e.g., a string of characters) to the corresponding data source, and the dynamic routing has the advantage that when a plurality of data sources obtain the query result, the routing can be performed through the identifier of the data source to the plurality of data sources, so that the query language can be ensured to be executed in the corresponding data source. The advantage of dynamic routing is also embodied in that the data source can be rapidly replaced according to the actual situation, and the monitoring efficiency of service monitoring is improved.
The technical scheme of the monitoring service of the invention can comprise two units: a service monitoring management unit and a timing task unit. If a certain service is to be monitored, a monitoring table of the service is to be added, and firstly, a monitoring table needs to be newly added in a service monitoring management unit, and unique identification of a data source, query SQL, an alarm strategy, alarm description, a CRON expression and contact person alarm are input. After the monitoring parameters are recorded, the system can create a timing task according to the recorded parameters, the timing task unit can periodically query data from a corresponding data source according to the query SQL, the data is put into a Groovy script of an alarm strategy to be executed, and if the script returns true, an alarm is triggered to send a short message or a mail to an alarm contact.
Fig. 2 is a schematic diagram of a main flow of a method of monitoring traffic according to a referential embodiment of the present invention. As shown in fig. 2, the main process of the method for monitoring a service of the present invention may include:
step S201: receiving a task of monitoring a target service, and creating a service monitoring table of the target service;
step S202: inputting monitoring parameters of the target service in a service monitoring table, wherein the monitoring parameters may include: unique identification of a data source, query language, alarm strategy, alarm description, time parameter and alarm contact;
step S203: the system automatically generates a timing task of the target service according to the input monitoring parameters;
step S204: setting the execution time frequency of the timing task according to the time parameter, and acquiring a unique identifier of the timing task;
step S205: acquiring a unique identifier and a query language of a data source according to the unique identifier of the timing task;
step S206: dynamically routing to the data source according to the unique identifier of the data source by utilizing an Aop technology of Spring, and acquiring a query result from the data source by utilizing a query language;
step S207: transmitting the query result into an alarm strategy to obtain an alarm result;
step S208: judging whether the alarm result is true, if so, executing step S209;
step S209: and sending the alarm description to an alarm contact person.
According to the technical scheme of monitoring the business, the timing task can be automatically generated according to the monitoring parameters input into the business monitoring table, and then the timing task is executed, so that the effect of monitoring the business is achieved, the maintenance cost of the code can be reduced, and the efficiency of monitoring the business is improved; in the embodiment of the invention, the execution time frequency of the timing task is set according to the time parameter, so that the setting of the timing task can be perfected, and the service monitoring efficiency is improved; in the embodiment of the invention, the monitoring parameters of the target service are obtained according to the unique identifier of the timing task, and then the monitoring parameters are utilized to monitor and alarm the target service, so that the change of codes can be reduced; in the embodiment of the invention, the data source is dynamically set by using the tangential programming oriented technology, so that the query language can be ensured to be executed in the corresponding data source; the alarm strategy in the embodiment of the invention is a Boolean expression, so that the alarm description can be quickly sent to the contact person according to the result of the expression, and the efficiency of service monitoring is improved.
Fig. 3 is a schematic diagram of main blocks of an apparatus for monitoring traffic according to an embodiment of the present invention. As shown in fig. 3, the apparatus 300 for monitoring a service according to an embodiment of the present invention mainly includes the following modules: a creation module 301, a generation module 302, and an execution module 303. The creating module 301 may be configured to create a service monitoring table of a target service, and input a monitoring parameter of the target service in the service monitoring table; the generating module 302 may be configured to generate a timing task of the target service according to the monitoring parameter; the execution module 303 may be configured to execute the timing task according to the monitoring parameter and the unique identifier of the timing task, so as to complete monitoring of the target service.
In the embodiment of the present invention, the monitoring parameters may include: unique identification of data source, query language, alarm policy, alarm description, time parameter, and alarm contact.
In this embodiment of the present invention, after generating the timing task of the target service, the generating module 302 may further be configured to: and setting the execution time frequency of the timing task according to the time parameter.
In this embodiment of the present invention, the executing module 303 may further be configured to: acquiring a unique identifier and query language of a data source according to the unique identifier of the timing task, and determining the data source according to the unique identifier of the data source; acquiring a query result from a data source by using a query language, and transmitting the query result into an alarm strategy to acquire an alarm result; and if the alarm result is true, sending the alarm description to an alarm contact person.
In this embodiment of the present invention, the executing module 303 may further be configured to: and dynamically routing the data source according to the unique identifier of the data source by using a tangential programming oriented technology so as to determine the data source.
In the embodiment of the invention, the alarm strategy can be a Boolean expression.
From the above description, it can be seen that the timing task can be automatically generated according to the monitoring parameters input into the service monitoring table, and then the timing task is executed, so as to achieve the effect of monitoring the service, thereby reducing the maintenance cost of the code and improving the efficiency of monitoring the service; in the embodiment of the invention, the execution time frequency of the timing task is set according to the time parameter, so that the setting of the timing task can be perfected, and the service monitoring efficiency is improved; in the embodiment of the invention, the monitoring parameters of the target service are obtained according to the unique identifier of the timing task, and then the monitoring parameters are utilized to monitor and alarm the target service, so that the change of codes can be reduced; in the embodiment of the invention, the data source is dynamically set by using the tangential programming oriented technology, so that the query language can be ensured to be executed in the corresponding data source; the alarm strategy in the embodiment of the invention is a Boolean expression, so that the alarm description can be quickly sent to the contact person according to the result of the expression, and the efficiency of service monitoring is improved.
Fig. 4 shows an exemplary system architecture 400 of a method of monitoring traffic or an apparatus for monitoring traffic to which embodiments of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the method for monitoring the service provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the device for monitoring the service is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a creation module, a generation module, and an execution module. The names of these modules do not form a limitation on the module itself in some cases, for example, the creating module may also be described as a "module that creates a service monitoring table of a target service and inputs monitoring parameters of the target service in the service monitoring table".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: creating a service monitoring table of the target service, and inputting monitoring parameters of the target service into the service monitoring table; generating a timing task of the target service according to the monitoring parameters; and executing the timing task according to the monitoring parameters and the unique identifier of the timing task to complete the monitoring of the target service.
According to the technical scheme of the embodiment of the invention, the timing task can be automatically generated according to the monitoring parameters input into the service monitoring table, and then the timing task is executed, so that the effect of monitoring the service is achieved, the maintenance cost of the code can be reduced, and the efficiency of monitoring the service is improved; in the embodiment of the invention, the execution time frequency of the timing task is set according to the time parameter, so that the setting of the timing task can be perfected, and the service monitoring efficiency is improved; in the embodiment of the invention, the monitoring parameters of the target service are obtained according to the unique identifier of the timing task, and then the monitoring parameters are utilized to monitor and alarm the target service, so that the change of codes can be reduced; in the embodiment of the invention, the data source is dynamically set by using the tangential programming oriented technology, so that the query language can be ensured to be executed in the corresponding data source; the alarm strategy in the embodiment of the invention is a Boolean expression, so that the alarm description can be quickly sent to the contact person according to the result of the expression, and the efficiency of service monitoring is improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method of monitoring traffic, comprising:
creating a service monitoring table of a target service, and inputting a monitoring parameter of the target service into the service monitoring table;
generating a timing task of the target service according to the monitoring parameters;
and executing the timing task according to the monitoring parameters and the unique identifier of the timing task to complete the monitoring of the target service.
2. The method of claim 1, wherein the monitoring parameters comprises: unique identification of data source, query language, alarm policy, alarm description, time parameter, and alarm contact.
3. The method of claim 2, wherein after generating the timing task for the target traffic, the method further comprises: and setting the execution time frequency of the timing task according to the time parameter.
4. The method of claim 2, wherein executing the timed task based on the monitoring parameter and the unique identification of the timed task comprises:
acquiring the unique identifier of the data source and the query language according to the unique identifier of the timing task, and determining the data source according to the unique identifier of the data source;
acquiring a query result from the data source by using the query language, and transmitting the query result into the alarm strategy to acquire an alarm result;
and if the alarm result is true, sending the alarm description to the alarm contact person.
5. The method of claim 4, wherein determining a data source from the unique identification of the data source comprises: and dynamically routing the data source according to the unique identifier of the data source by using a tangential programming oriented technology so as to determine the data source.
6. The method of claim 2, wherein the alarm policy is a boolean expression.
7. An apparatus for monitoring traffic, comprising:
the system comprises a creating module, a monitoring module and a processing module, wherein the creating module is used for creating a service monitoring table of a target service and inputting a monitoring parameter of the target service into the service monitoring table;
the generating module is used for generating a timing task of the target service according to the monitoring parameters;
and the execution module is used for executing the timing task according to the monitoring parameters and the unique identifier of the timing task so as to complete the monitoring of the target service.
8. The apparatus of claim 7, wherein the monitoring parameters comprise: unique identification of data source, query language, alarm policy, alarm description, time parameter, and alarm contact.
9. The apparatus of claim 8, wherein after generating the timing task for the target traffic, the generating module is further configured to: and setting the execution time frequency of the timing task according to the time parameter.
10. The apparatus of claim 8, wherein the execution module is further configured to:
acquiring the unique identifier of the data source and the query language according to the unique identifier of the timing task, and determining the data source according to the unique identifier of the data source;
acquiring a query result from the data source by using the query language, and transmitting the query result into the alarm strategy to acquire an alarm result;
and if the alarm result is true, sending the alarm description to the alarm contact person.
11. The apparatus of claim 10, wherein the execution module is further configured to: and dynamically routing the data source according to the unique identifier of the data source by using a tangential programming oriented technology so as to determine the data source.
12. The apparatus of claim 8, wherein the alarm policy is a boolean expression.
13. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201810862004.9A 2018-08-01 2018-08-01 Method and device for monitoring service Pending CN110795315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810862004.9A CN110795315A (en) 2018-08-01 2018-08-01 Method and device for monitoring service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810862004.9A CN110795315A (en) 2018-08-01 2018-08-01 Method and device for monitoring service

Publications (1)

Publication Number Publication Date
CN110795315A true CN110795315A (en) 2020-02-14

Family

ID=69424912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810862004.9A Pending CN110795315A (en) 2018-08-01 2018-08-01 Method and device for monitoring service

Country Status (1)

Country Link
CN (1) CN110795315A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562993A (en) * 2020-04-24 2020-08-21 深圳市优必选科技股份有限公司 Web application system for dynamically switching data sources
CN112100034A (en) * 2020-09-29 2020-12-18 泰康保险集团股份有限公司 Service monitoring method and device
CN112596986A (en) * 2020-12-31 2021-04-02 恩亿科(北京)数据科技有限公司 Monitoring method and device
CN112600713A (en) * 2020-12-24 2021-04-02 上海哔哩哔哩科技有限公司 Data monitoring method and system
CN113419921A (en) * 2021-06-30 2021-09-21 北京百度网讯科技有限公司 Task monitoring method, device, equipment and storage medium
CN113486100A (en) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 Service management method, device, server and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110016A (en) * 2009-12-25 2011-06-29 华为技术有限公司 Method, device and system for obtaining database connection in a database cluster system
CN104040539A (en) * 2012-12-31 2014-09-10 华为技术有限公司 Data storage method and apparatus, data operation method and system, and access server
CN107220301A (en) * 2017-05-10 2017-09-29 北京小度信息科技有限公司 The data monitoring method and device of a kind of configurableization
CN107329894A (en) * 2017-06-21 2017-11-07 广州华多网络科技有限公司 Application program system method of testing, device and electronic equipment
CN107741955A (en) * 2017-09-15 2018-02-27 平安科技(深圳)有限公司 Business datum monitoring method, device, terminal device and storage medium
CN107992398A (en) * 2017-12-22 2018-05-04 宜人恒业科技发展(北京)有限公司 The monitoring method and monitoring system of a kind of operation system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110016A (en) * 2009-12-25 2011-06-29 华为技术有限公司 Method, device and system for obtaining database connection in a database cluster system
CN104040539A (en) * 2012-12-31 2014-09-10 华为技术有限公司 Data storage method and apparatus, data operation method and system, and access server
CN107220301A (en) * 2017-05-10 2017-09-29 北京小度信息科技有限公司 The data monitoring method and device of a kind of configurableization
CN107329894A (en) * 2017-06-21 2017-11-07 广州华多网络科技有限公司 Application program system method of testing, device and electronic equipment
CN107741955A (en) * 2017-09-15 2018-02-27 平安科技(深圳)有限公司 Business datum monitoring method, device, terminal device and storage medium
CN107992398A (en) * 2017-12-22 2018-05-04 宜人恒业科技发展(北京)有限公司 The monitoring method and monitoring system of a kind of operation system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111562993A (en) * 2020-04-24 2020-08-21 深圳市优必选科技股份有限公司 Web application system for dynamically switching data sources
CN111562993B (en) * 2020-04-24 2023-10-10 深圳市优必选科技股份有限公司 Web application system for dynamically switching data sources
CN112100034A (en) * 2020-09-29 2020-12-18 泰康保险集团股份有限公司 Service monitoring method and device
CN112600713A (en) * 2020-12-24 2021-04-02 上海哔哩哔哩科技有限公司 Data monitoring method and system
CN112596986A (en) * 2020-12-31 2021-04-02 恩亿科(北京)数据科技有限公司 Monitoring method and device
CN113419921A (en) * 2021-06-30 2021-09-21 北京百度网讯科技有限公司 Task monitoring method, device, equipment and storage medium
CN113486100A (en) * 2021-06-30 2021-10-08 中国民航信息网络股份有限公司 Service management method, device, server and computer storage medium
CN113419921B (en) * 2021-06-30 2023-09-29 北京百度网讯科技有限公司 Task monitoring method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110019350B (en) Data query method and device based on configuration information
CN110795315A (en) Method and device for monitoring service
CN110019080B (en) Data access method and device
WO2019042240A1 (en) Short-link parsing method, apparatus and device
CN111400061A (en) Data processing method and system
CN109522751B (en) Access right control method and device, electronic equipment and computer readable medium
CN112861529A (en) Method and device for managing error codes
CN113076153A (en) Interface calling method and device
CN110795741A (en) Method and device for carrying out security processing on data
CN110928594A (en) Service development method and platform
CN116450622B (en) Method, apparatus, device and computer readable medium for data warehouse entry
CN110795135A (en) Method and device for realizing injection-resolution configuration
CN112650804A (en) Big data access method, device, system and storage medium
CN113761565A (en) Data desensitization method and apparatus
CN115423030A (en) Equipment identification method and device
CN113762910A (en) Document monitoring method and device
CN112988857A (en) Service data processing method and device
CN113779945A (en) Method and device for generating file
CN112131287A (en) Method and device for reading data
CN113779018A (en) Data processing method and device
CN112925772A (en) Data dynamic splitting method and device
CN112835609A (en) Method and device for modifying dependent package download address
CN113704242A (en) Data processing method and device
CN112214500A (en) Data comparison method and device, electronic equipment and storage medium
CN113535768A (en) Production monitoring method and 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