CN110309028B - Monitoring information acquisition method, service monitoring method, device and system - Google Patents

Monitoring information acquisition method, service monitoring method, device and system Download PDF

Info

Publication number
CN110309028B
CN110309028B CN201910531515.7A CN201910531515A CN110309028B CN 110309028 B CN110309028 B CN 110309028B CN 201910531515 A CN201910531515 A CN 201910531515A CN 110309028 B CN110309028 B CN 110309028B
Authority
CN
China
Prior art keywords
monitored
monitoring
service
interface
annotation
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
CN201910531515.7A
Other languages
Chinese (zh)
Other versions
CN110309028A (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and 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 QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910531515.7A priority Critical patent/CN110309028B/en
Publication of CN110309028A publication Critical patent/CN110309028A/en
Application granted granted Critical
Publication of CN110309028B publication Critical patent/CN110309028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a monitoring information acquisition method, a service monitoring method, a device and a system, wherein an interface server determines a service interface to be monitored by inquiring monitoring notes; acquiring an interface path of a service interface to be monitored; acquiring items to be monitored of the service interface to be monitored from monitoring notes of the service interface to be monitored; and storing the interface path of the service interface to be monitored and the items to be monitored into a storage medium for monitoring the service to be monitored. The monitoring server acquires an interface path of a service interface to be monitored of the service to be monitored and a item to be monitored of the service interface to be monitored from a storage medium; and monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored. By adopting the method provided by the embodiment of the invention, the monitoring information comprising the interface path of the service interface to be monitored and the items to be monitored can be automatically acquired, thereby improving the configuration efficiency.

Description

Monitoring information acquisition method, service monitoring method, device and system
Technical Field
The present invention relates to the field of system monitoring technologies, and in particular, to a method for obtaining monitoring information, a method, a device and a system for service monitoring.
Background
In a business system, there are multiple service interfaces in a service, and in order to facilitate management and maintenance, these service interfaces need to be monitored. In the prior art, a monitoring system capable of automatically discovering service interfaces exists, and all service interfaces in a service system and all monitoring items of each service interface are automatically monitored, that is, all use conditions of all service interfaces can be monitored.
However, in order to save system resources and perform monitoring more specifically, in practical applications, it is generally necessary to selectively monitor a part of the monitoring items of a part of the service interfaces, which requires manual configuration by a developer: and creating a configuration file aiming at the service to be monitored, manually inputting interface information of the service interface to be monitored, monitoring item information of each service interface to be monitored and the like in the configuration file, and monitoring the service interface selected by an developer and the monitoring item of the service interface according to the interface information and the monitoring item information in the configuration file in the monitoring process.
The inventors have found that in the process of implementing the present invention, at least the following problems exist in the prior art:
in the prior art, based on the information manually configured by a developer, the method for monitoring the service interface requires the developer to input a series of information such as a service name to be monitored, a service interface path to be monitored, a item to be monitored and the like in the configuration process, so that the configuration content is more, the input workload of the developer is large, and the configuration efficiency is low.
Disclosure of Invention
The embodiment of the invention aims to provide a monitoring information acquisition method, a service monitoring method, a device and a system, so as to achieve the aim of improving configuration efficiency. The specific technical scheme is as follows:
to achieve the above object, an embodiment of the present invention provides a method for obtaining monitoring information, including:
inquiring monitoring notes in the process of starting the service to be monitored, and determining a service interface marked with the monitoring notes in advance as the service interface to be monitored;
acquiring an interface path of the service interface to be monitored;
acquiring a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface;
and storing the interface path of the service interface to be monitored and the item to be monitored into a storage medium for monitoring the service to be monitored.
Optionally, the step of querying the monitoring annotation includes:
inquiring the monitoring annotation of the service to be monitored from a preset callable file packet, wherein the callable format file packet comprises codes of the monitoring annotation aiming at the service to be monitored.
Optionally, the obtaining the item to be monitored of the service interface to be monitored from the monitoring annotation of the service interface to be monitored includes:
when the annotation parameters in the monitoring annotation of the service interface to be monitored are not empty, acquiring the monitoring items represented by the annotation parameters as the items to be monitored of the service interface to be monitored;
and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
The embodiment of the invention also provides a service monitoring method, which comprises the following steps:
acquiring an interface path of a service interface to be monitored of a service to be monitored and a item to be monitored of the service interface to be monitored from a storage medium, wherein the interface path and the item to be monitored in the storage medium are determined based on monitoring notes marked in advance by the service to be monitored in the process of starting the service to be monitored;
and monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
The embodiment of the invention also provides a service monitoring system, which comprises: the system comprises an interface server, a monitoring server and a cache server;
the interface server is used for determining a service interface marked with monitoring notes in advance as a service interface to be monitored by inquiring the monitoring notes from the codes of the service to be monitored in the process of starting the service to be monitored; acquiring an interface path of the service interface to be monitored; acquiring a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface; storing the interface path of the service interface to be monitored and the item to be monitored into a cache server for monitoring the service to be monitored;
the monitoring server is used for acquiring the interface path of the service interface to be monitored of the service to be monitored and the item to be monitored of the service interface to be monitored from the cache server; monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored;
the cache server is used for storing the interface path of the service interface to be monitored of the service to be monitored and the item to be monitored of the service interface to be monitored.
Optionally, the interface server is specifically configured to obtain, when an annotation parameter in the monitoring annotation of the service interface to be monitored is not null, a monitoring item represented by the annotation parameter as a to-be-monitored item of the service interface to be monitored; and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
Optionally, the system further comprises:
the front-end processor is used for receiving an interface call request sent by the client and sending an interface call instruction to the interface server aiming at the interface call request;
the interface server is also used for calling a service interface according to the received interface calling instruction sent by the front-end processor;
the monitoring server is specifically configured to obtain monitoring data of the service interface to be monitored from the front-end processor based on the interface path of the service interface to be monitored.
The embodiment of the invention also provides a monitoring information acquisition device, which comprises:
the monitoring annotation determining module is used for inquiring the monitoring annotation in the process of starting the service to be monitored, and determining a service interface marked with the monitoring annotation in advance as the service interface to be monitored;
the path acquisition module is used for acquiring an interface path of the service interface to be monitored;
the monitoring item acquisition module is used for acquiring the items to be monitored of the service interface to be monitored from the monitoring notes of the service interface to be monitored;
and the monitoring information storage module is used for storing the interface path of the service interface to be monitored and the item to be monitored into a storage medium and is used for monitoring the service to be monitored.
Optionally, the monitoring annotation determining module is specifically configured to:
inquiring the monitoring annotation of the service to be monitored from a preset callable file packet, wherein the callable format file packet comprises codes of the monitoring annotation aiming at the service to be monitored.
Optionally, the monitoring item obtaining module is specifically configured to obtain, when an annotation parameter in the monitoring annotation of the service interface to be monitored is not null, a monitoring item represented by the annotation parameter as a to-be-monitored item of the service interface to be monitored;
and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
The embodiment of the invention also provides a service monitoring device, which comprises:
the monitoring information acquisition module is used for acquiring an interface path of a service interface to be monitored of a service to be monitored from a storage medium, and a item to be monitored of the service interface to be monitored, wherein the interface path and the item to be monitored in the storage medium are determined based on monitoring notes marked in advance by the service to be monitored in the process of starting the service to be monitored;
and the monitoring module is used for monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
The embodiment of the invention also provides an interface server, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface, and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the method steps for acquiring the monitoring information when executing the program stored in the memory.
The embodiment of the invention also provides a monitoring server which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface, and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the method steps of the service monitoring when executing the program stored in the memory.
The present invention also provides a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the steps of any of the above-described monitoring information acquisition methods.
The present invention further provides a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the steps of any of the service monitoring methods described above.
The embodiment of the invention also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute any of the monitoring information acquisition methods.
The embodiments of the present invention also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform any of the service monitoring methods described above.
According to the monitoring information acquisition method, the service monitoring method, the device and the system provided by the embodiment of the invention, the interface server determines a service interface marked with the monitoring annotation in advance as the service interface to be monitored by inquiring the monitoring annotation in the process of starting the service to be monitored; acquiring an interface path of a service interface to be monitored; acquiring items to be monitored of the service interface to be monitored from monitoring notes of the service interface to be monitored; and storing the interface path of the service interface to be monitored and the items to be monitored into a storage medium for monitoring the service to be monitored.
The monitoring server acquires an interface path of a service interface to be monitored of the service to be monitored and a item to be monitored of the service interface to be monitored from a storage medium; and monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
By adopting the method provided by the embodiment of the invention, the configuration file for acquiring the monitoring information is not required to be created, the service interface to be monitored is determined by inquiring the monitoring annotation in the code of the service to be monitored in the process of starting the service to be monitored, the monitoring information is automatically acquired, the interface path of the service interface to be monitored and the item to be monitored are included, and a great amount of configuration information is not required to be input by a developer, so that the configuration efficiency is improved.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for obtaining monitoring information according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a service monitoring method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a service monitoring system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another service monitoring system according to an embodiment of the present invention;
FIG. 5 is an interactive signaling diagram of a service monitoring system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a monitoring information acquiring device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a service monitoring device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an interface server according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a monitoring server according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for obtaining monitoring information according to an embodiment of the present invention, which may include the following steps:
step 101: and inquiring the monitoring annotation in the process of starting the service to be monitored, and determining a service interface marked with the monitoring annotation in advance as the service interface to be monitored.
The embodiment of the invention can determine the monitoring annotation of the service to be monitored when the service to be monitored is started, namely, the annotation object of the monitoring annotation is the service to be monitored, and the defined monitoring annotation can be added into the code of the service interface to be monitored in advance, wherein the code can be a pre-written and packaged file containing the code, and the file can be called in the process of starting the service to be monitored, so that the code in the file is read, and the monitoring annotation of the service to be monitored is queried.
Alternatively, the file containing the code may be, for example, a JAR (Java Archive) package, that is, a JAR format file package, and the monitoring annotation for the service to be monitored may be added in the JAR package in advance in the form of the code.
Step 102: and acquiring an interface path of the service interface to be monitored.
Specifically, after the service interface to be monitored is queried, the interface path of the service interface to be monitored is obtained from the code of the service interface to be monitored, for example, the interface path may be a URL (Uniform Resource Locator ) of the service interface to be monitored.
Step 103: and obtaining the items to be monitored of the service interface to be monitored from the monitoring notes of the service interface to be monitored.
Specifically, the items to be monitored of the service interface to be monitored can be obtained according to annotation parameters of the monitoring annotation;
when the annotation parameter in the monitoring annotation of the service interface to be monitored is not empty, acquiring a monitoring item represented by the annotation parameter as a to-be-monitored item of the service interface to be monitored;
when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, all monitoring items of the service interface to be monitored can be determined to be the items to be monitored.
Step 104: and storing the interface path of the service interface to be monitored and the items to be monitored into a storage medium for monitoring the service to be monitored.
In the embodiment of the present invention, the storage medium may be, for example: the cache, the disk, or a medium capable of storing data, where the cache has a higher reading speed than the disk, optionally, the interface path of the service interface to be monitored and the item to be monitored may be stored in the cache.
By adopting the monitoring information acquisition method provided by the embodiment of the invention, the configuration file for acquiring the monitoring information is not required to be created, the service interface to be monitored is determined by inquiring the monitoring annotation in the code of the service to be monitored in the process of starting the service to be monitored, the monitoring information is automatically acquired, the interface path of the service interface to be monitored and the item to be monitored are included, and a great amount of configuration information is not required to be input by a developer, so that the configuration efficiency is improved.
Correspondingly, the embodiment of the invention also provides a service monitoring method, referring to fig. 2, which can include the following steps:
step 201: and acquiring an interface path of a service interface to be monitored of the service to be monitored and an item to be monitored of the service interface to be monitored from the storage medium.
Specifically, the interface path and the item to be monitored in the storage medium are determined based on monitoring notes marked in advance by the service to be monitored in the process of starting the service to be monitored. The storage medium may be, for example: cache, disk, etc. capable of storing data.
As an optional implementation manner of the embodiment of the present invention, the interface path of the service interface to be monitored of the service to be monitored may be obtained from the storage medium at intervals of a preset time period, for example, at intervals of 10 seconds, or 1 minute, or 10 minutes, so as to achieve active obtaining of the interface path of the service interface to be monitored of the service to be monitored, thereby improving the intelligence degree of the embodiment of the present invention.
Step 202: and monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
In the embodiment of the invention, when monitoring the item to be monitored of the service interface to be monitored, the monitoring data of the item to be monitored can be obtained from the router or the switch communicated with the current equipment so as to realize the monitoring of the item to be monitored of the service interface to be monitored.
As an optional implementation manner of the embodiment of the invention, after the monitoring data is obtained, statistical analysis can be performed on the monitoring data, and each monitoring service cached in the storage medium can be grouped, and the monitoring view of each monitoring item of each monitoring service is generated by using the statistical analysis result, so that monitoring management personnel can more intuitively know the state of each monitoring service, and the monitoring management is more convenient to manage each monitoring service.
Correspondingly, the embodiment of the invention also provides a service monitoring system, referring to fig. 3, which may include an interface server 301, a monitoring server 302 and a cache server 303;
the interaction flow of the interface server 301, the monitoring server 302 and the cache server 303 is shown in fig. 5;
the interface server 301 is configured to determine, during a process of starting a service to be monitored, a service interface with a monitoring annotation marked in advance by querying the monitoring annotation from a code of the service to be monitored, as the service interface to be monitored; acquiring an interface path of a service interface to be monitored; acquiring items to be monitored of the service interface to be monitored from monitoring notes of the service interface to be monitored; storing an interface path of the service interface to be monitored and the item to be monitored into a cache server 303 for monitoring the service to be monitored;
the monitoring server 302 is configured to obtain, from the cache server 303, the interface path of the service interface to be monitored of the service to be monitored, and a term to be monitored of the service interface to be monitored; monitoring items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored;
the cache server 303 is configured to store an interface path of a service interface to be monitored of a service to be monitored, and an item to be monitored of the service interface to be monitored.
Specifically, the interface server 301 may be further configured to obtain, when an annotation parameter in the monitoring annotation of the service interface to be monitored is not null, a monitoring item represented by the annotation parameter as a to-be-monitored item of the service interface to be monitored; and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
The service monitoring system provided by the embodiment of the invention can further comprise a front-end processor 304, see fig. 4;
the interaction flow of the interface server 301, the monitoring server 302, the cache server 303 and the front-end processor 304 is shown in fig. 5;
wherein: the front end processor 304 may be configured to receive an interface call request sent by the client, and send an interface call instruction to the interface server 301 for the interface call request;
the interface server 301 may be further configured to call a service interface according to the received interface call instruction sent by the front end processor 304;
the monitoring server 302 may be further configured to obtain monitoring data of the service interface to be monitored from the front end processor 304 based on the interface path of the service interface to be monitored.
By adopting the system provided by the embodiment of the invention, the monitoring information in the configuration file is not required to be acquired, the service interface to be monitored is determined by inquiring the monitoring annotation in the code of the service to be monitored in the process of starting the service to be monitored, the monitoring information is automatically acquired, and the monitoring information comprises the interface path of the service interface to be monitored and the items to be monitored, so that the quantity of configuration information input by a developer is reduced, and the configuration efficiency is improved.
The embodiment of the invention also provides a monitoring information acquisition device, referring to fig. 6, which may include:
the monitoring annotation determining module 601 is configured to query the monitoring annotation in a process of starting a service to be monitored, and determine a service interface with the monitoring annotation marked in advance as the service interface to be monitored.
The path acquisition module 602 is configured to acquire an interface path of the service interface to be monitored.
The monitoring item obtaining module 603 is configured to obtain a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface.
The monitoring information storage module 604 is configured to store the interface path of the service interface to be monitored and the item to be monitored in a storage medium, and is configured to monitor the service to be monitored.
The monitoring annotation determination module may be specifically configured to:
and inquiring monitoring notes of the service to be monitored from a preset callable file packet, wherein the callable format file packet comprises codes.
Specifically, the monitoring item obtaining module 603 may be further configured to obtain, when an annotation parameter in the monitoring annotation of the service interface to be monitored is not null, a monitoring item represented by the annotation parameter as a to-be-monitored item of the service interface to be monitored;
and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
The embodiment of the invention also provides a service monitoring device, referring to fig. 7, which may include:
the monitoring information obtaining module 701 is configured to obtain, from a storage medium, an interface path of a service interface to be monitored of a service to be monitored, and a item to be monitored of the service interface to be monitored, where the interface path and the item to be monitored in the storage medium are determined based on a monitoring annotation pre-marked by the service to be monitored in a process of starting the service to be monitored;
the monitoring module 702 is configured to monitor items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
The embodiment of the present invention also provides an interface server, as shown in fig. 8, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804, where the processor 801, the communication interface 802, and the memory 803 complete communication with each other through the communication bus 804,
a memory 803 for storing a computer program;
the processor 801, when executing the program stored in the memory 803, implements the following steps:
in the process of starting the service to be monitored, determining a service interface with a monitoring annotation marked in advance as the service interface to be monitored by inquiring the monitoring annotation;
acquiring an interface path of a service interface to be monitored;
acquiring items to be monitored of the service interface to be monitored from monitoring notes of the service interface to be monitored;
and storing the interface path of the service interface to be monitored and the item to be monitored into a storage medium for monitoring the service to be monitored.
The embodiment of the present invention also provides a monitoring server, as shown in fig. 9, including a processor 901, a communication interface 902, a memory 903 and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete communication with each other through the communication bus 904,
a memory 903 for storing a computer program;
the processor 901 is configured to execute a program stored in the memory 903, and implement the following steps:
acquiring an interface path of a service interface to be monitored of a service to be monitored from a storage medium, and a item to be monitored of the service interface to be monitored, wherein the interface path and the item to be monitored in the storage medium are determined based on monitoring notes marked in advance by the service to be monitored in the process of starting the service to be monitored;
and monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
The communication bus mentioned above for the electronic devices may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor, implements the steps of any of the above-described monitoring information acquisition methods.
In yet another embodiment of the present invention, a computer readable storage medium is provided, in which a computer program is stored, which when executed by a processor, implements the steps of any of the service monitoring methods described above.
In yet another embodiment of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the monitoring information acquisition methods of the above embodiments.
In yet another embodiment of the present invention, a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the service monitoring methods of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system, apparatus, electronic device, computer readable storage medium, and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (11)

1. A monitoring information acquisition method, characterized by comprising:
inquiring monitoring annotation in the process of starting the service to be monitored, determining a service interface marked with the monitoring annotation in advance as the service interface to be monitored, wherein the annotation object of the monitoring annotation is the service to be monitored, and the monitoring annotation is added in the code of the service interface to be monitored in advance; the step of querying the monitoring annotation comprises: inquiring monitoring notes of the service to be monitored from a preset callable file packet, wherein the callable file packet comprises codes of the monitoring notes of the service to be monitored;
acquiring an interface path of the service interface to be monitored;
acquiring a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface;
and storing the interface path of the service interface to be monitored and the item to be monitored into a storage medium for monitoring the service to be monitored.
2. The method according to claim 1, wherein said obtaining the items to be monitored of the service interface to be monitored from the monitoring notes of the service interface to be monitored comprises:
when the annotation parameters in the monitoring annotation of the service interface to be monitored are not empty, acquiring the monitoring items represented by the annotation parameters as the items to be monitored of the service interface to be monitored;
and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
3. A method of service monitoring, comprising:
acquiring an interface path of a service interface to be monitored of a service to be monitored and a item to be monitored of the service interface to be monitored from a storage medium, wherein the interface path and the item to be monitored in the storage medium are determined based on monitoring notes marked in advance by the service to be monitored in the process of starting the service to be monitored; the obtaining the interface path of the service interface to be monitored of the service to be monitored from the storage medium comprises the following steps: inquiring monitoring annotation in the process of starting the service to be monitored, and determining a service interface marked with the monitoring annotation in advance as the service interface to be monitored, wherein the annotation object of the monitoring annotation is the service to be monitored, and the monitoring annotation is added in the code of the service interface to be monitored in advance; the step of querying the monitoring annotation comprises: inquiring monitoring notes of the service to be monitored from a preset callable file packet, wherein the callable file packet comprises codes of the monitoring notes of the service to be monitored; acquiring an interface path of the service interface to be monitored; the obtaining the item to be monitored of the service interface to be monitored from the storage medium comprises the following steps: acquiring a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface;
and monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
4. A service monitoring system, comprising: the system comprises an interface server, a monitoring server and a cache server;
the interface server is used for determining a service interface with a monitoring annotation marked in advance by inquiring the monitoring annotation from the code of the service to be monitored in the process of starting the service to be monitored, and the annotation object of the monitoring annotation is the service to be monitored and is added in the code of the service interface to be monitored in advance; the step of querying the monitoring annotation comprises: inquiring monitoring notes of the service to be monitored from a preset callable file packet, wherein the callable file packet comprises codes of the monitoring notes of the service to be monitored; acquiring an interface path of the service interface to be monitored; acquiring a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface; storing the interface path of the service interface to be monitored and the item to be monitored into a cache server for monitoring the service to be monitored;
the monitoring server is used for acquiring the interface path of the service interface to be monitored of the service to be monitored and the item to be monitored of the service interface to be monitored from the cache server; monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored; the obtaining the interface path of the service interface to be monitored of the service to be monitored from the cache server comprises the following steps: inquiring monitoring annotation in the process of starting the service to be monitored, and determining a service interface marked with the monitoring annotation in advance as the service interface to be monitored, wherein the annotation object of the monitoring annotation is the service to be monitored, and the monitoring annotation is added in the code of the service interface to be monitored in advance; the step of querying the monitoring annotation comprises: inquiring monitoring notes of the service to be monitored from a preset callable file packet, wherein the callable file packet comprises codes of the monitoring notes of the service to be monitored; acquiring an interface path of the service interface to be monitored; the obtaining the item to be monitored of the service interface to be monitored from the cache server comprises the following steps: acquiring a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface;
the cache server is used for storing the interface path of the service interface to be monitored of the service to be monitored and the item to be monitored of the service interface to be monitored.
5. The system according to claim 4, wherein the interface server is specifically configured to obtain, when an annotation parameter in the monitoring annotation of the service interface to be monitored is not null, a monitoring item represented by the annotation parameter as a to-be-monitored item of the service interface to be monitored; and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
6. The system according to claim 4 or 5, further comprising:
the front-end processor is used for receiving an interface call request sent by the client and sending an interface call instruction to the interface server aiming at the interface call request;
the interface server is also used for calling a service interface according to the received interface calling instruction sent by the front-end processor;
the monitoring server is specifically configured to obtain monitoring data of the service interface to be monitored from the front-end processor based on the interface path of the service interface to be monitored.
7. A monitoring information acquisition apparatus characterized by comprising:
the monitoring annotation determining module is used for inquiring the monitoring annotation in the process of starting the service to be monitored, determining a service interface with the monitoring annotation marked in advance as the service interface to be monitored, wherein the annotation object of the monitoring annotation is the service to be monitored, and the monitoring annotation is added in the code of the service interface to be monitored in advance; the monitoring annotation determining module is specifically configured to: inquiring monitoring notes of the service to be monitored from a preset callable file packet, wherein the callable file packet comprises codes of the monitoring notes of the service to be monitored;
the path acquisition module is used for acquiring an interface path of the service interface to be monitored;
the monitoring item acquisition module is used for acquiring the items to be monitored of the service interface to be monitored from the monitoring notes of the service interface to be monitored;
and the monitoring information storage module is used for storing the interface path of the service interface to be monitored and the item to be monitored into a storage medium and is used for monitoring the service to be monitored.
8. The apparatus according to claim 7, wherein the monitoring item obtaining module is specifically configured to obtain, when an annotation parameter in the monitoring annotation of the service interface to be monitored is not null, a monitoring item represented by the annotation parameter as a to-be-monitored item of the service interface to be monitored;
and when the annotation parameters in the monitoring annotation of the service interface to be monitored are empty, determining all monitoring items of the service interface to be monitored as items to be monitored.
9. A service monitoring device, comprising:
the monitoring information acquisition module is used for acquiring an interface path of a service interface to be monitored of a service to be monitored from a storage medium, and a item to be monitored of the service interface to be monitored, wherein the interface path and the item to be monitored in the storage medium are determined based on monitoring notes marked in advance by the service to be monitored in the process of starting the service to be monitored; the obtaining the interface path of the service interface to be monitored of the service to be monitored from the storage medium comprises the following steps: inquiring monitoring annotation in the process of starting the service to be monitored, and determining a service interface marked with the monitoring annotation in advance as the service interface to be monitored, wherein the annotation object of the monitoring annotation is the service to be monitored, and the monitoring annotation is added in the code of the service interface to be monitored in advance; the step of querying the monitoring annotation comprises: inquiring monitoring notes of the service to be monitored from a preset callable file packet, wherein the callable file packet comprises codes of the monitoring notes of the service to be monitored; acquiring an interface path of the service interface to be monitored; the obtaining the item to be monitored of the service interface to be monitored from the storage medium comprises the following steps: acquiring a to-be-monitored item of the to-be-monitored service interface from the monitoring annotation of the to-be-monitored service interface;
and the monitoring module is used for monitoring the items to be monitored of the service interface to be monitored based on the interface path of the service interface to be monitored.
10. The interface server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-2 when executing a program stored on a memory.
11. The monitoring server is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of claim 3 when executing a program stored on a memory.
CN201910531515.7A 2019-06-19 2019-06-19 Monitoring information acquisition method, service monitoring method, device and system Active CN110309028B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910531515.7A CN110309028B (en) 2019-06-19 2019-06-19 Monitoring information acquisition method, service monitoring method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910531515.7A CN110309028B (en) 2019-06-19 2019-06-19 Monitoring information acquisition method, service monitoring method, device and system

Publications (2)

Publication Number Publication Date
CN110309028A CN110309028A (en) 2019-10-08
CN110309028B true CN110309028B (en) 2023-04-28

Family

ID=68076699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910531515.7A Active CN110309028B (en) 2019-06-19 2019-06-19 Monitoring information acquisition method, service monitoring method, device and system

Country Status (1)

Country Link
CN (1) CN110309028B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581219B (en) * 2020-05-14 2024-02-23 中国银行股份有限公司 Method and device for acquiring monitoring data
CN113127309B (en) * 2021-04-30 2023-10-10 北京奇艺世纪科技有限公司 Program monitoring method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107342916A (en) * 2017-06-28 2017-11-10 广州信维电子科技股份有限公司 Monitoring method, device and the server of server info
CN108229183A (en) * 2017-12-06 2018-06-29 链家网(北京)科技有限公司 A kind of business datum monitoring method and its monitoring device
CN108965403A (en) * 2018-06-27 2018-12-07 平安科技(深圳)有限公司 O&M monitors establishment of connection method and terminal device
CN109062699A (en) * 2018-08-15 2018-12-21 郑州云海信息技术有限公司 A kind of resource monitoring method, device, server and storage medium
CN109766237A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Monitoring method, device, equipment and storage medium based on order distribution

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107819640B (en) * 2016-09-14 2019-06-28 北京百度网讯科技有限公司 Monitoring method and device for robot operating system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107342916A (en) * 2017-06-28 2017-11-10 广州信维电子科技股份有限公司 Monitoring method, device and the server of server info
CN108229183A (en) * 2017-12-06 2018-06-29 链家网(北京)科技有限公司 A kind of business datum monitoring method and its monitoring device
CN108965403A (en) * 2018-06-27 2018-12-07 平安科技(深圳)有限公司 O&M monitors establishment of connection method and terminal device
CN109062699A (en) * 2018-08-15 2018-12-21 郑州云海信息技术有限公司 A kind of resource monitoring method, device, server and storage medium
CN109766237A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Monitoring method, device, equipment and storage medium based on order distribution

Also Published As

Publication number Publication date
CN110309028A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
CN109710615B (en) Database access management method, system, electronic device and storage medium
CN109995612B (en) Service inspection method and device and electronic equipment
WO2015103967A1 (en) Application categorization method, application categorization apparatus, and service server
CN110309028B (en) Monitoring information acquisition method, service monitoring method, device and system
CN114090366A (en) Method, device and system for monitoring data
CN111177094A (en) Log data processing method and device, electronic equipment and storage medium
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN105553770B (en) Data acquisition control method and device
CN111159269B (en) Data processing method, device and system
CN113746703A (en) Abnormal link monitoring method, system and device
CN116055551A (en) Information pushing method, device and system, electronic equipment and storage medium
CN109446445B (en) Resource acquisition method and device
CN112653736B (en) Parallel source returning method and device and electronic equipment
CN112118352B (en) Method and device for processing notification trigger message, electronic equipment and computer readable medium
KR101845195B1 (en) Multiple Resource Subscriptions Association Method in an M2M system
CN107332703B (en) Method and device for checking multi-application logs
CN110955460B (en) Service process starting method and device, electronic equipment and storage medium
CN109495319B (en) Method, device and equipment for determining fault information of CDN node
CN114090268B (en) Container management method and container management system
CN111291127B (en) Data synchronization method, device, server and storage medium
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment
CN113014456A (en) Monitoring data transmission system, method, device, equipment and storage medium
CN112131198A (en) Log analysis method and device and electronic equipment
CN112306791A (en) Method and device for monitoring performance
CN114841648B (en) Material distribution method, device, electronic equipment and medium

Legal Events

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