CN111130919B - Interface monitoring method, device and system and storage medium - Google Patents

Interface monitoring method, device and system and storage medium Download PDF

Info

Publication number
CN111130919B
CN111130919B CN201911107805.5A CN201911107805A CN111130919B CN 111130919 B CN111130919 B CN 111130919B CN 201911107805 A CN201911107805 A CN 201911107805A CN 111130919 B CN111130919 B CN 111130919B
Authority
CN
China
Prior art keywords
interface
monitoring
monitored
network side
private network
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
CN201911107805.5A
Other languages
Chinese (zh)
Other versions
CN111130919A (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.)
Guizhou Yidu Cloud Technology Co ltd
Original Assignee
Guizhou Yidu Cloud 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 Guizhou Yidu Cloud Technology Co ltd filed Critical Guizhou Yidu Cloud Technology Co ltd
Priority to CN201911107805.5A priority Critical patent/CN111130919B/en
Publication of CN111130919A publication Critical patent/CN111130919A/en
Application granted granted Critical
Publication of CN111130919B publication Critical patent/CN111130919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents

Abstract

The application provides an interface monitoring method, a device, a system and a storage medium, wherein the method is applied to a private network side in a platform constructed based on a public network and a private network, and comprises the following steps: receiving an interface monitoring event issued by a public network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network; executing the interface monitoring event to obtain a monitoring result of the interface to be monitored; and when the monitoring result is determined to be an interface abnormal result, returning the monitoring result to the public network side. According to the method and the device, the private network side executes the interface monitoring event, the communication flow from the public network to the private network is hardly occupied, and the influence of the flow limitation from the public network to the private network is avoided, so that the interface monitoring function of the platform constructed based on the public network and the private network can be realized.

Description

Interface monitoring method, device and system and storage medium
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to an interface monitoring method, device and system and a storage medium.
Background
The interface monitoring means that the monitoring executing party sends the interface request of the service regularly so as to check whether the interface returns a correct status code and whether the returned interface data meets the expectation. If the interface is abnormal, an alarm in the form of mail, short message, voice or WeChat and the like needs to be sent to a service-related responsible person so as to find and solve the problem at the first time.
The interface monitoring function in a platform constructed based on a public network and a private network generally refers to that the public network monitors an interface of a service deployed in the private network. At present, only a server in a public network sends an interface request to a service deployed in a private network at regular time to perform monitoring on an interface of the service, but because there is a limitation on communication traffic from the public network to the private network and the execution process of interface monitoring consumes traffic, the server in the public network cannot implement a monitoring function on the interface in the private network based on the limitation on the communication traffic.
Therefore, how to implement the interface monitoring function of each service deployed on the platform for the platform built by the public network and the private network together is a problem which needs to be solved urgently at present.
Disclosure of Invention
In view of this, embodiments of the present invention provide an interface monitoring method, an apparatus, a terminal device, and a storage medium, which can implement an interface monitoring function for each service deployed in a platform based on a public network and a private network without occupying communication traffic from the public network to the private network.
In a first aspect, the present application provides an interface monitoring method, where the method is applied to a private network side in a platform constructed based on a public network and a private network, and the method includes:
receiving an interface monitoring event issued by a public network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network;
executing the interface monitoring event to obtain a monitoring result of the interface to be monitored;
and when the monitoring result is determined to be an interface abnormal result, returning the monitoring result to the public network side.
In a second aspect, the present application further provides an interface monitoring method, where the method is applied to a public network side in a platform constructed based on a public network and a private network, and the method includes:
issuing an interface monitoring event to a private network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network;
and receiving a monitoring result obtained by executing the interface monitoring event at the private network side.
In a third aspect, the present application further provides an interface monitoring apparatus, where the apparatus is deployed on a private network side of a platform constructed based on a public network and a private network, and the apparatus includes:
the first receiving module is used for receiving an interface monitoring event issued by a public network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network;
the monitoring module is used for executing the interface monitoring event to obtain a monitoring result of the interface to be monitored;
and the returning module is used for returning the monitoring result to the public network side when the monitoring result is determined to be an interface abnormal result.
In a fourth aspect, the present application further provides an interface monitoring apparatus, where the apparatus is applied to a public network side of a platform constructed based on a public network and a private network, and the apparatus includes:
the system comprises an issuing module, a monitoring module and a monitoring module, wherein the issuing module is used for issuing an interface monitoring event to a private network side, and the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network;
and the second receiving module is used for receiving a monitoring result obtained by executing the interface monitoring event by the private network side.
In a fifth aspect, the present application further provides an interface monitoring system,
the system is applied to a platform constructed based on a public network and a private network, and comprises a public network side and a private network side;
the public network side is used for issuing an interface monitoring event to the private network side, and the interface monitoring event is used for monitoring a to-be-monitored interface deployed in the private network;
and the private network side is used for executing the interface monitoring event, obtaining a monitoring result of the interface to be monitored, and returning the monitoring result to the public network side when the monitoring result is determined to be an interface abnormal result.
In a sixth aspect, the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to implement the method of any one of the above when executed by a processor.
Compared with the prior art, the application has the beneficial effects that: in the interface monitoring method provided by the application, the private network side executes the interface monitoring event, and the communication flow from the public network to the private network is hardly occupied, so that the interface monitoring method provided by the application is not influenced by the flow limitation from the public network to the private network, and the interface monitoring function of the platform constructed based on the public network and the private network can be realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a platform architecture diagram of an interface monitoring method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of an interface monitoring method according to an embodiment of the present application;
fig. 3 is a flowchart of another interface monitoring method according to an embodiment of the present application;
fig. 4 is a data interaction diagram of an interface monitoring method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an interface monitoring apparatus according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another interface monitoring apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an interface monitoring system according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of an interface monitoring terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to realize the monitoring function of the interface to be monitored in the platform constructed based on the public network and the private network, the application provides an interface monitoring method, and particularly, the public network side of the platform constructed based on the public network and the private network sends an interface monitoring event to the private network, the private network side executes the interface monitoring event to obtain the monitoring result of the interface to be monitored, and when the monitoring result is determined to be an interface abnormal result, the private network side returns the monitoring result to the public network side. Because the interface monitoring event is executed at the private network side of the platform, the flow consumed in the execution process of the interface monitoring does not occupy the communication flow from the public network side to the private network side, and therefore the interface monitoring method provided by the application is not influenced by the limitation of the communication flow from the public network side to the private network side. Compared with the prior art, the method and the device can realize the interface monitoring function of each service deployed on the platform built together based on the public network and the private network.
In order to facilitate understanding of the technical solution of the present application, an interface monitoring method provided by the present application is introduced from an overall application architecture.
Referring to fig. 1, a platform architecture diagram of an interface monitoring method provided in an embodiment of the present application is constructed based on a public network and a private network, where each private network takes the public network as a center, a plurality of servers, namely a first server 110 and a second server 113, are respectively deployed in each private network, and the public network includes the second server 120.
The second server 120 on the public network side of the platform built together based on the public network and the private network is responsible for managing each interface monitoring event, and specifically includes performing management operations such as adding, deleting, modifying, checking and the like on each interface monitoring event. And each interface monitoring event is used for monitoring the corresponding interface to be monitored. The second server 120 may manage the respective interface monitoring events using a database to ensure efficient storage of the respective interface monitoring events. The interface monitoring event is used for monitoring a preset interface to be monitored, and the interface to be monitored can comprise a preset interface of a service deployed in each private network.
In addition, the second server 120 is also responsible for issuing corresponding interface monitoring events to the first servers in the respective private networks. Specifically, according to the requirement, the second server 120 sets interface monitoring events for the interfaces to be monitored of the services deployed in each private network in advance, where the interface monitoring events include not only the identifiers and monitoring parameters of the interfaces to be monitored, but also the monitoring trigger conditions of the interfaces to be monitored, for example, a monitoring trigger time period, such as executing a monitoring operation on the interfaces to be monitored every 10 minutes.
The first server 110 and 113 on the private network side of the platform built together based on the public network and the private network receives the interface monitoring event from the second server 120, and executes the interface monitoring event when the monitoring triggering condition in the interface monitoring event is met, so as to obtain the monitoring result.
For the monitoring result, the first server 110 and 113 may determine whether the obtained monitoring result is abnormal, if it is determined that the monitoring result is the interface abnormal result, it indicates that the interface corresponding to the monitoring result may have a problem, at this time, in order to further determine whether the interface really has the abnormality, the first server 110 and 113 needs to return the monitoring result to the second server 120 on the public network side, and the second server 120 collectively analyzes the monitoring results returned from the first servers 110 and 113 on each private network side.
In the interface monitoring method provided by the application, after the second server on the public network side issues the interface monitoring event to the private network side, the first server deployed on the private network side executes the interface monitoring event. Because the interface monitoring event is executed at the private network side, and the execution process of the interface monitoring does not need to consume the flow from the public network side to the private network side, the interface monitoring method provided by the application is not limited by the flow, and the interface monitoring function of the platform based on the public network and the private network can be realized.
Based on the description of the foregoing embodiment, the present application further provides an interface monitoring method, and refers to fig. 2, which is a flowchart of an interface monitoring method provided in an embodiment of the present application. The method is applied to a private network side of a platform built based on a public network and a private network, and specifically comprises the following steps:
s201: and receiving an interface monitoring event issued by a public network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network.
In the embodiment of the application, the public network side of the platform built based on the public network and the private network uniformly manages the interface monitoring events of each private network, and pushes the interface monitoring events to the corresponding private network side, so that the private network side is responsible for executing the interface monitoring events, and the influence of flow limitation from the public network side to the private network side is avoided.
The interface monitoring event in the embodiment of the application has a corresponding relation with the interface to be monitored, that is, one interface monitoring event is used for monitoring one interface to be monitored. In an optional implementation manner, the public network side determines interfaces to be monitored of each private network side in advance, and sets an interface monitoring event for each interface to be monitored.
In practical application, after determining the interface monitoring event corresponding to each private network, the public network side pushes each interface monitoring event to the corresponding private network side.
S202: and executing the interface monitoring event to obtain a monitoring result of the interface to be monitored.
In an optional implementation manner, the private network side may execute each interface monitoring event corresponding to each to-be-monitored interface of its own service at regular time, specifically, each interface monitoring event may have the same monitoring trigger time period, and may also set the monitoring trigger time period based on the requirement of each to-be-monitored interface.
In another optional implementation, the public network side may control execution of the monitoring event of each interface, so as to implement unified management of the monitoring function of each interface to be monitored. Specifically, the public network side manages a state identifier of each interface monitoring event, wherein the state identifier is used for identifying that the state of the corresponding interface monitoring event is an on state or an off state. Specifically, if the state identifier is in an on state, it indicates that the current private network side can execute the corresponding interface monitoring event, and if the state identifier is in an off state, it indicates that the current private network side prohibits execution of the corresponding interface monitoring event.
In practical application, before executing an interface monitoring event, the private network side first obtains a state identifier of the interface monitoring event from the public network side, and executes the interface monitoring event when the state identifier is in an open state, so as to obtain a monitoring result of a corresponding interface to be monitored.
S203: and when the monitoring result is determined to be an interface abnormal result, returning the monitoring result to the public network side.
In the embodiment of the application, after obtaining the monitoring result of the interface to be monitored, the private network side may determine whether the obtained monitoring result is abnormal, and if it is determined that the monitoring result is the interface abnormal result, it indicates that the interface corresponding to the monitoring result may have a problem, and at this time, it is necessary to further determine whether the interface to be monitored really has the abnormality, so that the private network side needs to return the monitoring result to the public network side.
It should be noted that, when the obtained monitoring result is normal, the monitoring result may also be sent to the public network side, so as to facilitate management of the to-be-monitored interface by the public network side.
In the embodiment of the application, the private network side executes the interface monitoring event without occupying the communication flow from the public network to the private network, so that the interface monitoring method provided by the embodiment of the application is not influenced by the flow limitation from the public network to the private network, and can realize the interface monitoring function of the platform constructed based on the public network and the private network.
In addition, the interface monitoring method provided by the embodiment of the application can monitor not only the single interface, but also the interface to be monitored with the front interface. The interface to be monitored with the pre-interface refers to a result value of a preset variable identifier corresponding to a preset pre-execution operation of the pre-interface for monitoring the interface to be monitored.
In practical application, the interface monitoring event corresponding to the interface to be monitored, in which the pre-interface exists, includes a corresponding relationship between a pre-execution operation and a preset variable identifier. Specifically, in the process of executing an interface monitoring event and obtaining a monitoring result of the interface to be monitored, the private network side may execute a pre-execution operation in the interface monitoring event to obtain a result value corresponding to a preset variable identifier having a corresponding relationship with the pre-execution operation, and then execute the interface monitoring event based on the result value to obtain the monitoring result of the interface to be monitored.
Taking the interface N to be monitored with the pre-interface M as an example, if the interface monitoring event of the interface N to be monitored is executed, the pre-execution operation of the pre-interface M needs to be executed first, for example, the pre-execution operation may be to search for a hypertension article through the pre-interface M, the preset variable identifier corresponding to the pre-execution operation is information such as a web address of the searched hypertension article, and the result value corresponding to the preset variable identifier includes view/cc139bfcaca 1116cf1750e 7cd184254b35effd16a.html. Therefore, the private network side executes the interface monitoring event of the interface N to be monitored based on the result value view/cc139bfca1116c175f0e7cd184254b35effd1a6b.html and the like, and obtains the monitoring result of the interface N to be monitored.
The above embodiment introduces the interface monitoring method from the private network side, and the present application further provides an interface monitoring method, which is introduced again from the perspective of the public network side. Referring to fig. 3, a flowchart of another interface monitoring method provided in the embodiment of the present application is shown. The method is applied to a public network side of a platform built based on a public network and a private network, and specifically comprises the following steps:
s301: and issuing an interface monitoring event to a private network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network.
In the embodiment of the application, the public network side uniformly manages the interface monitoring events of the private network and sends the corresponding interface monitoring events to the private network.
In practical application, the public network side can control the execution of the monitoring event of each interface so as to realize the unified management of the monitoring function of each interface to be monitored. Specifically, the public network side manages a state identifier of each interface monitoring event, wherein the state identifier is used for identifying that the state of the corresponding interface monitoring event is an on state or an off state. Specifically, if the state identifier is in an on state, it indicates that the current private network side can execute the corresponding interface monitoring event, and if the state identifier is in an off state, it indicates that the current private network side prohibits execution of the corresponding interface monitoring event. The private network side acquires the state identifier of the interface monitoring event from the public network side and determines whether to execute the interface monitoring event.
S302: and receiving a monitoring result obtained by executing the interface monitoring event at the private network side.
In the embodiment of the application, after the private network side executes the interface monitoring event to obtain the monitoring result, the monitoring result can be uploaded to the public network side, and the public network side analyzes the monitoring result.
In practical application, the public network side may receive the number of interface abnormality times and the total number of monitoring execution times of the interface to be monitored from the private network side. Specifically, the private network side may respectively count the number of interface abnormality times and the total number of detection execution times of the interface to be monitored, and send the statistical result to the public network side. And then, determining the stability of the service corresponding to the interface to be monitored by the public network side based on the interface abnormal times and the total monitoring execution times of the interface to be monitored.
In an optional implementation manner, the public network side may calculate a ratio of the number of interface abnormality times of the interface to be monitored to the total number of monitoring execution times, and if the ratio is greater than a preset threshold, it indicates that the stability of the service corresponding to the interface to be monitored is poor, and conversely, it indicates that the stability of the service corresponding to the interface to be monitored is good.
In the interface monitoring method provided by the embodiment of the application, the private network side executes the interface monitoring event without occupying the communication traffic from the public network to the private network, so that the interface monitoring method provided by the embodiment of the application is not influenced by the traffic limitation from the public network to the private network, and can realize the interface monitoring function of a platform constructed based on the public network and the private network.
In the application scenario, the public network side deploys the same service a for each private network in advance, and there is a need to monitor each interface of the service a, so that each interface of the service a can be monitored by using the interface monitoring method provided by the present application. Specifically, for the application scenarios, the embodiment of the present application provides an interface monitoring method based on the application scenarios. Referring to fig. 4, a data interaction diagram of an interface monitoring method provided in an embodiment of the present application is shown, where the method includes:
step S401: the public network side sets interface monitoring events for each interface of the service A in advance respectively, and manages each interface monitoring event by using a database.
Step S402: and the public network side deploys the interface monitoring event of each interface of the private network side push service A of the service A.
In the embodiment of the application, the public network side uniformly manages the interface monitoring event of the service A and uniformly issues the interface monitoring event of the service A to each private network side, so that the management efficiency of the interface monitoring event can be improved. Once the interface monitoring event of the service A has the requirements of increasing, deleting, modifying, checking and the like, the interface monitoring event is uniformly managed by the public network side and then issued again.
Step S403: after receiving the interface monitoring events of each interface of the service A, the private network side executes the interface monitoring events to obtain the monitoring results of the interfaces corresponding to the interface monitoring events when determining that the monitoring triggering conditions of any interface monitoring event are met.
In practical application, the interface monitoring event of each interface includes a monitoring trigger condition, and the interface monitoring event of the interface can be executed only after the monitoring trigger condition is met. In practical application, the monitoring triggering condition is a preset time period, and if the preset time period is 10s, the monitoring triggering condition indicates that the interface monitoring event of the interface is executed every 10 s.
In the embodiment of the application, the public network side does not need to issue the interface monitoring event of the service A again before the next update of the service A, and the private network side stores the interface monitoring event of the service A in the database after receiving the interface monitoring event of the service A, so that the corresponding interface monitoring event is obtained from the database after the monitoring triggering condition is met, and the monitoring of the interface is realized.
Step S404: the private network side determines whether the monitoring result of the interface is abnormal or not, and if so, the monitoring result is returned to the public network side so that the public network side can analyze the monitoring result.
In the embodiment of the application, if the private network side determines that the monitoring result of the interface is abnormal, it indicates that the interface may have a problem, and therefore, the private network side can alarm the responsible person through communication modes such as mails, short messages, voices and the like, so that the responsible person can handle the abnormality of the interface.
In the embodiment of the application, the public network side uniformly analyzes the abnormal monitoring results of each private network side, so that the accuracy of the monitoring results is improved.
Step S405: and each private network side carries out statistics on the monitoring execution times and the abnormal times of each interface of the service A at regular time to obtain a statistical result, and uploads the statistical result to the public network side so as to determine the stability of the service A deployed by the corresponding private network side based on the statistical result.
In practical application, the higher the ratio of the abnormal times to the monitoring execution times of any interface of the service a is, the higher the probability that the interface makes the service a unstable is, and a developer can update the service a according to the index.
In the embodiment of the application, in the platform constructed based on the public network and the private network, the private network side executes the interface monitoring event, so that the execution of the interface monitoring event does not need to occupy the communication flow from the public network to the private network.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Based on the above method embodiment, the present application further provides an interface monitoring apparatus, and referring to fig. 5, a schematic structural diagram of the interface monitoring apparatus provided in the embodiment of the present application is shown, the apparatus is applied to a private network side of a platform constructed based on a public network and a private network, and the apparatus includes:
a first receiving module 501, configured to receive an interface monitoring event issued by a public network side; wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network
A monitoring module 502, configured to execute the interface monitoring event to obtain a monitoring result of the interface to be monitored;
a returning module 503, configured to return the monitoring result to the public network side when it is determined that the monitoring result is an interface abnormal result.
In an optional embodiment, the interface monitoring event includes a pre-execution operation and a preset variable identifier;
accordingly, the monitoring module 502 includes:
the first execution submodule is used for executing a pre-execution operation in the interface monitoring event so as to obtain a result value corresponding to a preset variable identifier which has a corresponding relation with the pre-execution operation;
and the second execution submodule is used for executing the interface monitoring event based on the result value to obtain a monitoring result of the interface to be monitored.
In another optional embodiment, the apparatus further comprises:
the statistical module is used for adding 1 to the number of interface abnormity of the interface to be monitored and counting the total number of monitoring execution times of the interface to be monitored when the monitoring result is determined to be an interface abnormity result;
and the uploading module is used for uploading the interface abnormal times and the total monitoring execution times of the interface to be monitored to the public network side.
In another optional embodiment, the apparatus further comprises:
the acquisition module is used for acquiring the state identifier of the interface monitoring event from the public network side; the state identification is used for identifying that the state of the interface monitoring event is an opening state or a stopping state;
correspondingly, the monitoring module 502 is specifically configured to:
and when the state identifier is in an open state, executing the interface monitoring event to obtain a monitoring result of the interface to be monitored.
In the interface monitoring device provided by the embodiment of the application, in the platform constructed based on the public network and the private network, the private network side executes the interface monitoring event, so that the execution of the interface monitoring event does not need to occupy the communication flow from the public network to the private network.
In addition, the present application further provides an interface monitoring apparatus, referring to fig. 6, which is a schematic structural diagram of an interface monitoring apparatus provided in an embodiment of the present application, where the apparatus is applied to a public network side of a platform constructed based on a public network and a private network, and the apparatus includes:
the issuing module 601 is configured to issue an interface monitoring event to a private network side, where the interface monitoring event is used to monitor an interface to be monitored deployed in the private network;
a second receiving module 602, configured to receive a monitoring result obtained by the private network side executing the interface monitoring event.
In an alternative embodiment, the apparatus further comprises:
a third receiving module, configured to receive the number of interface exceptions and the total number of monitoring executions of the interface to be monitored from the private network side;
and the determining module is used for determining the stability of the service corresponding to the interface to be monitored based on the interface abnormal times and the total monitoring execution times of the interface to be monitored.
In another optional embodiment, the apparatus further comprises:
a sending module, configured to send a status identifier of the interface monitoring event to the private network side; the state identification is used for identifying that the state of the interface monitoring event is an opening state or a stopping state;
correspondingly, the second receiving module is specifically configured to:
and receiving a monitoring result obtained by executing the interface monitoring event when the state identifier of the private network side is in an open state.
In the interface monitoring device provided by the embodiment of the application, in the platform constructed based on the public network and the private network, the private network side executes the interface monitoring event, so that the execution of the interface monitoring event does not need to occupy the communication flow from the public network to the private network.
Based on the above method embodiment and apparatus embodiment, the present application further provides an interface monitoring system, refer to fig. 7, which is a schematic structural diagram of an interface monitoring system provided in the present application embodiment, where the system 700 is applied to a platform constructed based on a public network and a private network, and the system 700 includes a public network side 701 and a private network side 702;
the public network side 701 is configured to issue an interface monitoring event to the private network side, where the interface monitoring event is used to monitor a to-be-monitored interface deployed in the private network;
the private network side 702 is configured to execute the interface monitoring event, obtain a monitoring result of the interface to be monitored, and return the monitoring result to the public network side when it is determined that the monitoring result is an interface abnormal result.
It should be noted that, the public network side 701 in the interface monitoring system according to the embodiment of the present application may implement the functions of the interface monitoring method and apparatus applied to the public network side in the foregoing embodiments, and the private network side 702 in the interface monitoring system according to the embodiment of the present application may implement the functions of the interface monitoring method and apparatus applied to the private network side in the foregoing embodiments.
In the interface monitoring system provided by the embodiment of the application, the private network side executes the interface monitoring event, so that the execution of the interface monitoring event does not need to occupy the communication flow from the public network to the private network.
Based on the foregoing embodiment, the present application further provides an interface monitoring terminal device, and refer to fig. 8, which is a schematic diagram of an interface monitoring terminal device provided in the embodiment of the present application. As shown in fig. 8, the terminal device 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and operable on the processor 80. The processor 80 executes the computer program 82 to implement the steps in the above-mentioned various interface monitoring method embodiments, such as the steps S201 to S202 shown in fig. 2.
Illustratively, the computer program 82 may be divided into one or more modules/units, which are stored in the memory 81 and executed by the processor 80 to carry out the invention. One or more of the modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 82 in the terminal device 8.
The terminal device 8 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. Terminal device 8 may include, but is not limited to, a processor 80, a memory 81. Those skilled in the art will appreciate that fig. 8 is merely an example of a terminal device 8 and does not constitute a limitation of terminal device 8 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., terminal device 8 may also include input-output devices, network access devices, buses, etc.
The Processor 80 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 81 may be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk provided on the terminal device 8, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 81 may also include both an internal storage unit of the terminal device 8 and an external storage device. The memory 81 is used for storing computer programs and other programs and data required by the terminal device 8. The memory 81 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the steps of the above-described embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (6)

1. An interface monitoring method is applied to a private network side in a platform constructed based on a public network and a private network, and comprises the following steps:
receiving an interface monitoring event issued by a public network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network, and comprises an identifier and a monitoring parameter of the interface to be monitored and a monitoring triggering condition of the interface to be monitored;
acquiring the state identifier of the interface monitoring event from the public network side; the state identification is used for identifying that the state of the interface monitoring event is an opening state or a stopping state;
when the state identifier is in an open state and a monitoring trigger condition in the interface monitoring event is met, executing the interface monitoring event to obtain a monitoring result of the interface to be monitored;
when the monitoring result is determined to be an interface abnormal result, returning the monitoring result to the public network side;
the interface monitoring event comprises the corresponding relation between the preposed execution operation and the preset variable identification; the executing the interface monitoring event to obtain the monitoring result of the interface to be monitored includes:
executing a pre-execution operation in the interface monitoring event to obtain a result value corresponding to a preset variable identifier having a corresponding relation with the pre-execution operation;
executing the interface monitoring event based on the result value to obtain a monitoring result of the interface to be monitored;
the method further comprises the following steps:
when the monitoring result is determined to be an interface abnormal result, adding 1 to the interface abnormal times of the interface to be monitored, and counting the total monitoring execution times of the interface to be monitored;
and uploading the interface abnormal times and the total monitoring execution times of the interface to be monitored to the public network side.
2. An interface monitoring method is applied to a public network side in a platform constructed based on a public network and a private network, and comprises the following steps:
issuing an interface monitoring event to a private network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network, and comprises an identifier and a monitoring parameter of the interface to be monitored and a monitoring triggering condition of the interface to be monitored;
sending the state identifier of the interface monitoring event to the private network side; the state identification is used for identifying that the state of the interface monitoring event is an opening state or a stopping state;
receiving a monitoring result obtained by executing the interface monitoring event when the state identifier of the private network side is in an open state and a monitoring triggering condition in the interface monitoring event is met;
the method further comprises the following steps:
receiving the interface abnormal times and the total monitoring execution times of the interface to be monitored from the private network side;
and determining the stability of the service corresponding to the interface to be monitored based on the interface abnormal times and the total monitoring execution times of the interface to be monitored.
3. An interface monitoring device, wherein the device is deployed on a private network side of a platform constructed based on a public network and a private network, the device comprising:
the first receiving module is used for receiving an interface monitoring event issued by a public network side, wherein the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network, and the interface monitoring event comprises an identifier and a monitoring parameter of the interface to be monitored and a monitoring triggering condition of the interface to be monitored;
the acquisition module is used for acquiring the state identifier of the interface monitoring event from the public network side; the state identification is used for identifying that the state of the interface monitoring event is an opening state or a stopping state;
the monitoring module is used for executing the interface monitoring event to obtain a monitoring result of the interface to be monitored when the state identifier is in an open state and a monitoring triggering condition in the interface monitoring event is met;
the return module is used for returning the monitoring result to the public network side when the monitoring result is determined to be an interface abnormal result;
the interface monitoring event comprises the corresponding relation between the preposed execution operation and the preset variable identification; the monitoring module is specifically configured to: executing a pre-execution operation in the interface monitoring event to obtain a result value corresponding to a preset variable identifier having a corresponding relation with the pre-execution operation; executing the interface monitoring event based on the result value to obtain a monitoring result of the interface to be monitored;
the device further comprises:
the statistical module is used for adding 1 to the number of interface abnormity of the interface to be monitored and counting the total number of monitoring execution times of the interface to be monitored when the monitoring result is determined to be an interface abnormity result;
and the uploading module is used for uploading the interface abnormal times and the total monitoring execution times of the interface to be monitored to the public network side.
4. An interface monitoring apparatus, applied to a public network side of a platform constructed based on a public network and a private network, the apparatus comprising:
the system comprises an issuing module, a monitoring module and a monitoring module, wherein the issuing module is used for issuing an interface monitoring event to a private network side, the interface monitoring event is used for monitoring an interface to be monitored deployed in the private network, and the interface monitoring event comprises an identifier and a monitoring parameter of the interface to be monitored and a monitoring triggering condition of the interface to be monitored;
a sending module, configured to send a status identifier of the interface monitoring event to the private network side; the state identification is used for identifying that the state of the interface monitoring event is an opening state or a stopping state;
a second receiving module, configured to receive a monitoring result obtained by executing the interface monitoring event when the status identifier of the private network side is in an open status and a monitoring trigger condition in the interface monitoring event is met;
the device further comprises:
a third receiving module, configured to receive the number of interface exceptions and the total number of monitoring executions of the interface to be monitored from the private network side;
and the determining module is used for determining the stability of each piece of clothes corresponding to the interface to be monitored based on the interface abnormal times and the total monitoring execution times of the interface to be monitored.
5. An interface monitoring system is characterized in that the system is applied to a platform constructed based on a public network and a private network, and comprises a public network side and a private network side;
the public network side is used for issuing an interface monitoring event to the private network side, the interface monitoring event is used for monitoring a to-be-monitored interface deployed in the private network, and the interface monitoring event comprises an identifier and a monitoring parameter of the to-be-monitored interface and a monitoring triggering condition of the to-be-monitored interface; sending the state identifier of the interface monitoring event to the private network side; the state identification is used for identifying that the state of the interface monitoring event is an opening state or a stopping state; receiving a monitoring result obtained by the private network side executing the interface monitoring event; receiving the interface abnormal times and the total monitoring execution times of the interface to be monitored from the private network side; determining the stability of each piece of clothes corresponding to the interface to be monitored based on the interface abnormal times and the total monitoring execution times of the interface to be monitored;
the private network side is used for receiving the interface monitoring event issued by the public network side; acquiring the state identifier of the interface monitoring event from the public network side; when the state identifier is in an open state and a monitoring triggering condition in the interface monitoring event is met, executing the interface monitoring event to obtain a monitoring result of the interface to be monitored, returning the monitoring result to the public network side when the monitoring result is determined to be an interface abnormal result, adding 1 to the number of interface abnormal times of the interface to be monitored, and counting the total number of monitoring execution times of the interface to be monitored; and uploading the interface abnormal times and the total monitoring execution times of the interface to be monitored to the public network side.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 2.
CN201911107805.5A 2019-11-13 2019-11-13 Interface monitoring method, device and system and storage medium Active CN111130919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911107805.5A CN111130919B (en) 2019-11-13 2019-11-13 Interface monitoring method, device and system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911107805.5A CN111130919B (en) 2019-11-13 2019-11-13 Interface monitoring method, device and system and storage medium

Publications (2)

Publication Number Publication Date
CN111130919A CN111130919A (en) 2020-05-08
CN111130919B true CN111130919B (en) 2022-04-26

Family

ID=70495600

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911107805.5A Active CN111130919B (en) 2019-11-13 2019-11-13 Interface monitoring method, device and system and storage medium

Country Status (1)

Country Link
CN (1) CN111130919B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5647056A (en) * 1992-11-18 1997-07-08 Canon Information Systems, Inc. Method and apparatus for managing access to a networked peripheral
GB2413725A (en) * 2004-04-28 2005-11-02 Agilent Technologies Inc Network switch monitoring interface translates information from the switch to the format used by the monitoring system
CN101789890A (en) * 2010-02-05 2010-07-28 上海宝信软件股份有限公司 Configuration-based agent monitoring system capable of automatically realizing update and monitoring method thereof
US20140157405A1 (en) * 2012-12-04 2014-06-05 Bill Joll Cyber Behavior Analysis and Detection Method, System and Architecture
CN103107921B (en) * 2013-02-01 2015-12-02 大唐移动通信设备有限公司 Method for supervising and system
CN103500133A (en) * 2013-09-17 2014-01-08 华为技术有限公司 Fault locating method and device
CN110445637B (en) * 2019-07-05 2022-08-09 深圳壹账通智能科技有限公司 Event monitoring method, system, computer device and storage medium

Also Published As

Publication number Publication date
CN111130919A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN108600029B (en) Configuration file updating method and device, terminal equipment and storage medium
CN110362455B (en) Data processing method and data processing device
CN112311617A (en) Configured data monitoring and alarming method and system
CN110995497A (en) Method for unified operation and maintenance in cloud computing environment, terminal device and storage medium
CN113067875B (en) Access method, device and equipment based on dynamic flow control of micro-service gateway
CN110933698A (en) Monitoring management method, device and equipment for Internet of things card
CN113377626B (en) Visual unified alarm method, device, equipment and medium based on service tree
CN110661717A (en) Current limiting method and device and electronic equipment
CN114090366A (en) Method, device and system for monitoring data
CN111694677A (en) Message queue management method, device, terminal and computer-readable storage medium
CN111339466A (en) Interface management method and device, electronic equipment and readable storage medium
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium
CN111130919B (en) Interface monitoring method, device and system and storage medium
CN115729786A (en) Monitoring method, device, equipment and storage medium applied to multiple systems
CN115496470A (en) Full-link configuration data processing method and device and electronic equipment
CN114285647A (en) Method and device for detecting abnormal access of bucket in distributed object storage system
CN112491589B (en) Object storage network early warning method, system, terminal and storage medium
CN101964922B (en) Abnormal condition capturing method and device
CN111756836A (en) Information sending method and device based on event management model
CN110543470A (en) Message early warning method and device, storage medium and electronic device
CN110633165A (en) Fault processing method, device, system server and computer readable storage medium
CN112596922B (en) Communication management method, device, equipment and medium
CN115604668B (en) Short message sending and pushing monitoring method, device, equipment and storage medium
KR20180047079A (en) Method and apparatus for detrmining event level of monitoring result
CN117667374A (en) Data processing method, device and system

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