CN110224870B - Interface monitoring method and device, computing equipment and storage medium - Google Patents

Interface monitoring method and device, computing equipment and storage medium Download PDF

Info

Publication number
CN110224870B
CN110224870B CN201910533805.5A CN201910533805A CN110224870B CN 110224870 B CN110224870 B CN 110224870B CN 201910533805 A CN201910533805 A CN 201910533805A CN 110224870 B CN110224870 B CN 110224870B
Authority
CN
China
Prior art keywords
interface
target
server
target interface
calling
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
CN201910533805.5A
Other languages
Chinese (zh)
Other versions
CN110224870A (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.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Cloud Computing Beijing 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 Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Cloud Computing Beijing Co Ltd
Priority to CN201910533805.5A priority Critical patent/CN110224870B/en
Publication of CN110224870A publication Critical patent/CN110224870A/en
Application granted granted Critical
Publication of CN110224870B publication Critical patent/CN110224870B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • 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
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an interface monitoring method, an interface monitoring device, computing equipment and a storage medium, and belongs to the technical field of networks. The invention screens the interfaces with low flow from all the interfaces to be monitored, actively calls the interfaces with low flow every preset time to collect the return codes, can obtain the return codes in a timing manner, can expand the data volume of the return codes, counts the failure times of interface calling according to enough return codes, and then alarms according to the failure times, and can alarm in time when the interfaces with low flow are abnormal, thereby improving the efficiency and timeliness of monitoring the interfaces.

Description

Interface monitoring method and device, computing equipment and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to an interface monitoring method and apparatus, a computing device, and a storage medium.
Background
With the development of network technology, the required resources and services can be obtained from the server by calling the interface of the server. In order to ensure the usability of the interface, the interface needs to be monitored, and when the interface is abnormal, an alarm is given so as to timely position and solve the problem of the interface.
Currently, the process of monitoring the interface generally includes: the terminal calls an interface of the server, the server provides corresponding resources or services for the terminal according to the interface called by the terminal, and simultaneously sends a return code to the terminal to identify whether the calling is successful or failed. And after receiving the return code from the terminal, the monitoring platform monitors whether the interface is abnormal according to the received return code.
When the method is adopted to monitor the interface, the monitoring platform can obtain the return code once when the terminal calls the interface of the server once, so that for the interface with lower flow, namely for the interface which is rarely called by the terminal, the data volume of the return code which can be collected by the monitoring platform is too small, the monitoring timeliness can be influenced by monitoring the interface according to the too small return code, and the interface abnormity cannot be found in time.
Disclosure of Invention
The embodiment of the invention provides an interface monitoring method, an interface monitoring device, computing equipment and a storage medium, which can solve the problem that the abnormality of a low-flow interface cannot be detected in time in the related art. The technical scheme is as follows:
in one aspect, an interface monitoring method is provided, where the method includes:
selecting a target interface of a target server from one or more interfaces of one or more servers, wherein the flow of the target interface is lower than a flow threshold value;
calling the target interface of the target server every other preset time length;
receiving a return code from the target server, the return code indicating a success in invoking the target interface or a failure in invoking the target interface;
counting the failure times of calling the target interface according to the received return code each time;
and outputting alarm information when the failure times meet a preset condition, wherein the alarm information represents that the target interface is abnormal.
In one possible implementation, the invoking the target interface of the target server includes:
acquiring input parameters of the target interface from a configuration instruction;
generating a calling request according to the input parameters of the target interface;
and sending the calling request to the target server.
In a possible implementation, before the calling the target interface of the target server every preset time, the method further includes:
sending a negotiation message to the target server, wherein the negotiation message is used for negotiating and calling the target interface of the target server at regular time, and the negotiation message comprises a signature of a monitoring platform;
a negotiation validation message is received from the target server.
In another aspect, an interface monitoring apparatus is provided, the apparatus including:
the device comprises a selection module, a processing module and a processing module, wherein the selection module is used for selecting a target interface of a target server from one or more interfaces of one or more servers, and the flow of the target interface is lower than a flow threshold value;
the calling module is used for calling the target interface of the target server every other preset time;
a receiving module, configured to receive a return code from the target server, where the return code indicates that the target interface is successfully called or fails to be called;
the counting module is used for counting the failure times of calling the target interface according to the return code received each time;
and the output module is used for outputting alarm information when the failure times meet a preset condition, wherein the alarm information represents that the target interface is abnormal.
In one possible implementation, the selection module includes:
the obtaining submodule is used for obtaining the calling times of the interface in a target time period for each interface in the one or more interfaces of the one or more servers, wherein the time end point of the target time period is the current time point and the time length is the preset time length;
and the selection submodule is used for selecting an interface with the calling frequency lower than the preset frequency in the target time period from the one or more interfaces of the one or more servers according to the calling frequency of each interface of each server in the target time period to obtain the target interface.
In one possible implementation, the calling module includes:
the reading submodule is used for reading the historical input parameters of the target interface from the historical call log of the target interface;
the generation submodule is used for generating a calling request according to the historical input parameters of the target interface;
and the sending submodule is used for sending the calling request to the target server.
In a possible implementation, the reading sub-module is configured to select, from each call record of the historical call log, a call record closest to a current time point; and reading the historical input parameters of the target interface from the call record.
In one possible implementation, the calling module includes:
the acquisition submodule is used for acquiring the input parameters of the target interface from the configuration instruction;
the generation submodule is used for generating a calling request according to the input parameters of the target interface;
and the sending submodule is used for sending the calling request to the target server.
In a possible implementation, the reading sub-module is configured to count an occurrence frequency of each historical input parameter of the target interface according to a historical input parameter in each call record of the historical call log; and selecting the historical input parameter with the highest frequency of occurrence from a plurality of historical input parameters of the target interface according to the frequency of occurrence of each historical input parameter of the target interface.
In a possible implementation, the sending module is configured to send a negotiation message to the target server, where the negotiation message is used to negotiate to call the target interface of the target server at a fixed time, and the negotiation message includes a signature of a monitoring platform;
the receiving module is further configured to receive a negotiation confirmation message from the target server.
In a possible implementation, the obtaining module is configured to obtain one or more call chains in which a background server of the target application is located;
the receiving module is further configured to select each child node of the background server from the one or more call chains to obtain the one or more servers.
In one possible implementation, the apparatus further comprises: the detection module is used for detecting the state of the target interface;
the calling module is specifically configured to call the target interface every preset time length when the target interface is in an online state.
In one aspect, a computing device is provided and includes one or more processors and one or more memories, where at least one instruction is stored in the one or more memories, and the instruction is loaded and executed by the one or more processors to implement the above-mentioned interface monitoring method.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the above interface monitoring method.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
according to the method provided by the embodiment, the low-flow interfaces are screened out from the interfaces to be monitored, the low-flow interfaces are actively called every preset time, the return codes are collected, the return codes can be obtained regularly, the data volume of the return codes can be expanded, the failure times of interface calling are counted according to enough return codes, then warning is carried out according to the failure times, warning can be timely given out when the low-flow interfaces are abnormal, the timeliness of monitoring the low-flow interfaces is improved, a user is helped to timely find the unavailable condition of the low-flow interfaces, and the monitoring efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced 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 based on these drawings without creative efforts.
Fig. 1 is an architecture diagram of an interface monitoring system according to an embodiment of the present invention;
fig. 2 is a flowchart of an interface monitoring method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a probe call interface according to an embodiment of the present invention;
fig. 4 is a flowchart of a monitoring interface according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an interface monitoring apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The terms referred to in the present application are explained below:
hypertext Transfer Protocol (full English: hyper Text Transfer Protocol, short English: HTTP): is a protocol for transferring hypertext from a server of the world wide web to a local browser. HTTP is based on a Transmission Control Protocol (TCP)/Internet Protocol Address (IP) communication Protocol.
And (3) probe: a World Wide Web (Web for short) script program is a script file for detecting Server sensitive information through a Web page programming language, which can be but not limited to ASP (Active Server Pages, a Server-side script environment developed by MicroSoft corporation), a Hypertext Preprocessor (PHP), ASP.
ELK: abbreviations for three open source software, respectively: elasticsearch (search based server), logstack (open source data gathering engine, supporting real-time data pipe functions), kibana (open source analysis and visualization platform for use with Elasticsearch), ELK may be used to process logs.
FileBeat: the Log processing tool is a lightweight log processing tool, the Filebeat occupies less resources, and the Log processing tool is suitable for collecting logs on each server and transmitting the logs to Logstash.
Hereinafter, the system architecture of the present application is exemplarily described.
Fig. 1 is an architecture diagram of an interface monitoring system according to an embodiment of the present application. The interface monitoring system includes: an application server 101, a monitoring platform 102, a third party server 103 and a terminal 104.
The terminal 104 is connected to the application server 101 through a wireless network or a wired network. The terminal 104 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player or an MP4 (Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, and a laptop computer. The terminal 104 may be installed and run with an application, and the application server 101 is used to provide a background service for the application. Illustratively, the terminal 104 may be a terminal used by a user, and an account registered by the user on the application server 101 is logged in an application running in the terminal 104. The application program can be any one of a shopping application program, an audio program, a video program, a social contact application program, an instant messaging application program, a translation application program, a browser program, a payment program, a financial program and a traffic program.
The application server 101 is connected to the monitoring platform 102 via a wireless or wired network and to the third party server 103 via a wireless or wired network. The application server 101 and the monitoring platform 102 may be configured to perform the methods provided by the embodiments described below. Specifically, the application server 101 may be configured to perform the following steps 201, 202, 203, 205, and 206, and the monitoring platform 102 may be configured to perform the following steps 207 and 208.
The application server 101 may include at least one of a server, a plurality of servers, a cloud computing platform, or a virtualization center. The application server 101 may be one or more. When the application servers 101 are multiple, there are at least two application servers 101 for providing different services, and/or there are at least two application servers 101 for providing the same service, for example, providing the same service in a load balancing manner, which is not limited in the embodiment of the present application. In some possible embodiments, the application server 101 may be an Elastic Cloud Server (ECS), a virtual machine, a container, an application running in a cloud environment, a service, or a micro-service.
The monitoring platform 102 may include a monitoring server 1021 and a database 1022. The monitoring server 1021 may be at least one of a server, a plurality of servers, a cloud computing platform, or a virtualization center. The form of the monitoring server 1021 can be the same as that of the application server 101, and will not be described herein. The monitoring server 1021 is connected to the database 1022 through a wireless network or a wired network. The database 1022 is used to store one or more items of return codes obtained after the interface is called, failure times of calling the interface, or historical call logs of the interface. The database 1022 may be located on one storage device or may be distributed across multiple storage devices. The database 1022 may be implemented by a cloud storage service, for example, the database 1022 may be an object storage service (OBS), a cloud hard disk, or the like. The monitoring platform 102 may, without limitation, operate in any of a cloud environment, edge environment, or terminal environment, such as on a public cloud, private cloud, or hybrid cloud. The monitoring platform 102 may be provided to the user as an interface monitoring service.
The third party server 103 may be used to provide third party services to the terminal 104. Specifically, the application program running in the terminal 104 may be loaded with a third-party application, and the third-party server may be a background server of the third-party application. The third party application may be, but is not limited to, a social security card service, a public deposit inquiry service, a passport pass endorsement reservation service, and the like. Specifically, when a user accesses the third-party application, the terminal 104 sends a call instruction to the application server 101, the call instruction requests to call an interface of the third-party server 103, when the application server 101 receives the call instruction, the call request may be generated, and the call request is sent to the third-party server 103, and when the third-party server 103 receives the call request, a service corresponding to the third-party application may be provided.
Those skilled in the art will appreciate that fig. 1 is only illustrated by the example that the application server 101 and the monitoring platform 102 are separately disposed on different devices, and in other possible embodiments, the application server 101 and the monitoring platform 102 may be integrated together, and the application server 101 and the monitoring platform 102 may be disposed on the same device.
Those skilled in the art will appreciate that the number of application servers 101, monitoring platforms 102, third party servers 103, or terminals 104 may be greater or fewer. For example, the number of the application server 101, the monitoring platform 102, the third-party server 103, or the terminal 104 may be only one, or the number of the application server 101, the monitoring platform 102, the third-party server 103, or the terminal 104 may be several tens or hundreds, or more, in this case, the interface monitoring system further includes other application servers 101, monitoring platforms 102, third-party servers 103, or terminals 104. The number and the device type of the application server 101, the monitoring platform 102, the third-party server 103 or the terminal 104 are not limited in the embodiment of the present application.
The method flow of the present application is exemplarily described below.
Fig. 2 is a flowchart of an interface monitoring method according to an embodiment of the present invention, where for example, an execution subject includes an application server, a monitoring platform, and a target server, the method includes:
201. the application server selects a target interface of a target server from one or more interfaces of one or more servers, and the flow of the target interface is lower than a flow threshold value.
The application server may be a background server of the target application, each of the one or more servers may be a third-party server, and the third-party server may be configured to provide a third-party service for the target application, and the user may access the third-party server through the application server during the use of the target application. For example, the third-party application may be an embedded application, such as an applet, loaded on the target application, and the third-party server may be a background server of the embedded application, illustratively, the target application may be an instant messaging application, the embedded application may be a social security card application loaded on the target application, and then the application server may be a background server of the instant messaging application, and the server may be a background server of the social security card application.
The target server is a server of the one or more servers having a target interface, the target interface being a low-traffic interface. Wherein low flow may be identified by the flow being below a flow threshold. The flow threshold may be a preset threshold, the flow threshold may be pre-stored in the application server, the flow threshold may be set according to requirements, experiments, or experience, and the specific numerical value of the flow threshold is not limited in this embodiment.
In some possible embodiments, the application server may detect traffic for each interface of each server; for any interface of any server, the application server may determine whether the traffic of the interface is lower than a traffic threshold; when the traffic of an interface is below a threshold, the application server may select the interface as a target interface and select a server including the target interface as a target server.
By the method, different monitoring modes can be adopted for interfaces with different flow rates, and the method provided by the embodiment is adopted to monitor the flow rate aiming at the low-flow rate interface, so that the method of the embodiment can be applied to products with lower flow rate and needing to monitor the quality of the interface in time, such as city service applications of social security cards, public deposit fund inquiry, passport pass endorsement reservation, resident certificate registration and the like.
Regarding the specific process of detecting the traffic of the interface, in some possible embodiments, for each interface of the one or more interfaces of the one or more servers, the application server may obtain the number of calls of the interface in the target time period, and the application server may select, according to the number of calls of each interface of each server in the target time period, an interface whose number of calls in the target time period is lower than a preset number from among the one or more interfaces of the one or more servers, to obtain the target interface. Alternatively, the target time period may be the latest statistical period, for example, the time end point of the target time period is the current time point and the duration is the preset duration, for example, if the preset duration is 1 minute, the target time period is the latest 1 minute, and if the preset duration is 1 hour, the target time period is the latest 1 hour.
Regarding the manner of determining the one or more servers, in some possible embodiments, a third party server list may be configured on the application server, the third party server list indicating the one or more third party servers to be monitored, for example, may include an identification of the one or more third party servers. The application server may retrieve the one or more servers from a list of third party servers. In other possible embodiments, the application server may obtain the one or more servers by obtaining a background server of each third-party application associated with the target application. Illustratively, the application server may obtain one or more call chains in which the background server (i.e., the application server) of the target application is located; the application server may select each child node of the application server from one or more call chains, resulting in one or more servers. Illustratively, if the call chain is: server a calls server B, server B calls server C and server C, and the application server is server B in the call chain, then server C and server D are child nodes of the application server, so the application server can select server C and server D as a third party server.
In this way, since the third-party server is a server that the application server can call, the third-party server is a child node of the application server in the call chain, and thus the third-party server can be accurately and automatically screened out in this way.
In some possible embodiments, the application server may pre-store a signature of the monitoring platform, where the signature of the monitoring platform is used to verify the authenticity of the application server, and the application server may generate a negotiation message before invoking the target interface of the target server, and send a negotiation message to the target server, where the negotiation message is used to negotiate to invoke the target interface of the target server at regular time, and the negotiation message includes the signature of the monitoring platform. The target server may prestore a signature of the monitoring platform, after receiving the negotiation message, may compare the signature in the negotiation message with the prestored signature, and when the signature in the negotiation message is consistent with the prestored signature, it indicates that the application server passes the authentication, the target server sends a negotiation confirmation message to the application server, and the application server may receive the negotiation confirmation message from the target server, and then executes the following process of regularly invoking the target interface.
By negotiating based on the signature of the monitoring platform, the application server can prove the reliability of the application server to the target server in advance, and the situation that the target server does not respond to the call request of the application server because the target interface of the target server is called regularly and is judged as a malicious server by the target server is avoided.
202. The application server detects the state of the target interface.
Illustratively, an online interface list may be configured in advance, where the online interface list includes interface names of one or more interfaces in an online state, and it may be determined whether the interface name of an interface belongs to the online interface list, and if the interface name of an interface belongs to the online interface list, it is determined that the interface is in the online state. By the method, the interface monitoring process is more time-efficient, the value of monitoring the interface is not high for the third party interface which stops providing the service, and by the method, the application server can stop monitoring and calling the target interface when the interface is in the offline state, so that the monitoring of the offline third party interface can be avoided, and the waste of the monitoring process on computing resources is avoided.
203. And when the target interface is in an online state, the application server calls the target interface every preset time.
In this embodiment, the application server may keep a certain heartbeat and regularly call the target interface of the target server, so as to find out an abnormal condition of the target interface in time. Specifically, the application server may start a timer, generate a call request according to an input parameter of the target interface whenever a preset time length elapses, and send the call request to the target server, thereby calling the target interface.
The preset time duration may be configured on the application server in advance, and the preset time duration may be set according to requirements, experience, or experiments, for example, the preset time duration may be 1 minute, and the application server may call an interface of the target server once per minute. The call request is used to request to call the target interface of the target server, for example, the call request may include an interface name of the target interface, and the interface name may be stored in the application server in advance. The invocation request may be an HTTP request.
The application server can achieve the aim of changing the passive mode into the active mode by calling the target interface of the target server at regular time. Specifically, in the related art, when a terminal initiates a call request, a monitoring platform can obtain a return code of the call, that is, only one time of data can be obtained from the call request of the terminal, so that the collected data is too little, and the monitoring and early warning cannot be effectively performed in time due to the fact that the monitoring and early warning are performed according to too little data. In the embodiment, the application server can actively call the target interface of the target server every time when the preset time duration elapses along with the lapse of time, so that the monitoring platform can collect more return codes, and therefore, the monitoring and early warning can be performed according to enough data, and the timeliness of the early warning can be improved.
Regarding the specific procedure of calling the interface, in some possible embodiments, the application server may read the historical input parameters of the target interface from the historical call log of the target interface; the application server can generate a calling request according to the historical input parameters of the target interface; the application server may send a call request to the target server.
The historical calling log is used for recording the historical calling condition of the target interface, such as historical input parameters of the target interface when the target interface is called historically, time points of the target interface is called historically, time consumed for calling the target interface historically, and the like. Specifically, when receiving a call request of the terminal, the application server may obtain an input parameter of the target interface from the call request of the terminal, generate a call record including the history input parameter of the target interface by using the obtained input parameter of the target interface as the history input parameter, and write the call record into the history call log. Then, in the process of monitoring the target interface, since the history input parameter of the target interface is recorded in the history call log in advance, the application server may read the history input parameter of the target interface from the history call log.
In this way, the process of the application server invoking the interface of the target server may be similar to performing interface replay. Specifically, because the input parameters of the interface in the call request sent by the application server are the input parameters used when the target interface is called historically, the call request sent by the application server is similar to the call request sent when the target interface is called historically, and then the process of calling the interface by the application server can be simulated to become a process that the client requests the target server to provide the third-party service again, so that the data returned by the target server is ensured to be more accurate.
In some possible embodiments, the application server may select, from each call record of the historical call logs, a call record closest to the current time point according to the current time point; and reading the historical input parameters of the target interface from the call records closest to the current time point.
By the method, the target interface is called again continuously along with the lapse of time, the input parameter used for calling the target interface is updated every time, the historical input parameter in the latest calling record in the historical calling log is updated accordingly, the latest historical input parameter of the interface is obtained according to the latest calling record every time, and then the interface is called, so that the calling request sent by the application server every time can be changed dynamically, and the process of calling the interface by a real client last time can be simulated.
In some possible embodiments, the application server may count the occurrence frequency of each historical input parameter of the target interface according to the historical input parameter in each call record of the historical call log; and selecting the input parameter of the target interface from a plurality of historical input parameters of the target interface according to the occurrence frequency of each historical input parameter of the target interface. The input parameter of the target interface is a historical input parameter with the highest frequency of occurrence in the plurality of historical input parameters. The occurrence frequency of any historical input parameter may be a ratio of the occurrence frequency of the historical input parameter to the occurrence frequency of all historical input parameters of the corresponding target interface, and all historical input parameters of the target interface may be each historical input parameter of the target interface recorded by the historical call log in the latest statistical period.
The calling request is generated by utilizing the historical input parameters which appear at high frequency in the historical calling log, and the historical input parameters which appear at high frequency are the historical input parameters which are used at high frequency recently, so that the actual service of the third-party application can be reflected, the calling request can simulate the process of calling the third-party application by a real user recently, and the data returned by the target server is more accurate.
In other possible embodiments, the application server may also receive a configuration instruction, where the configuration instruction includes input parameters of the target interface, and the application server may obtain the input parameters of the target interface from the configuration instruction. The application server can generate a calling request according to the preset input parameters; the application server may send a call request to the target server. The configuration instruction can be triggered according to the input operation of a developer. In this way, the input parameters of the interface in the call request are preset, so that the call request sent by the application server every time can be the same.
204. The target server sends a return code to the application server.
205. The application server receives the return code from the target server.
The return code indicates a success or failure of the calling interface. Specifically, the return code may include a success return code indicating that the call interface is successful and a failure return code indicating that the call interface is successful, and the success return code and the failure return code may be represented by different numbers.
The target server can receive the call request from the application server, determine the interface called by the application server according to the call request, provide the third-party service corresponding to the interface, generate a response message according to the result of providing the service, send the response message to the application server, and the application server can receive the response message and obtain the return code from the response message. And if the target server does not successfully provide the non-three-party service, the target server generates a response message comprising a failure return code. In addition, the response message may also include information reflecting the quality of the interface, such as the time taken to call the interface, etc.
It should be noted that the above steps 203 to 205 are a circular execution flow, that is, each time the preset time duration elapses, the application server and the target server execute the steps 203 to 205 again, so as to achieve the purpose of detecting the target interface at regular time.
206. And the application server sends the received return code to the monitoring platform each time.
And after the application server receives the return code, the application server can report the return code to the monitoring platform.
It should be noted that, the process of reporting the return code by the application server and the above steps 203 to 205 may be executed asynchronously, that is, the application server does not need to wait for the end of reporting the return code obtained this time, and then executes the next steps 203 to 205, but may execute the next steps 203 to 205 while reporting the return code this time.
Another point to be described is that the application server may report the return code to the monitoring platform in real time, or may record the return code in the historical call log through the log processing tool, and send the historical call log to the monitoring platform, so that the monitoring platform may obtain the return code from the historical call log. Wherein, the log processing tool can be, but not limited to, ELK system, filetreat, etc., and the log processing tool can be provided as a log agent (log agent) module of the application server.
207. And the monitoring platform counts the failure times of calling the target interface according to the return code received each time.
The monitoring platform can judge whether the return code is a successful return code, if the return code is not the successful return code, the target interface calling is judged to be failed, and the target interface calling failure can be recorded; if the return code is a successful return code, the calling target interface is judged to be successful, and the calling target interface is recorded to be successful. During the process that the target interface is called regularly, the application server can count the failure times of calling the target interface. For example, the application server may set a statistical period, and every statistical period, obtain the failure times of calling the target interface in the statistical period from the record of calling the interface of the target server, determine whether the failure times of calling the target interface satisfy a preset condition, and when the failure times satisfy the preset condition, determine that the target interface is abnormal, and execute step 208 described below.
208. And when the failure times meet the preset conditions, the monitoring platform outputs alarm information.
The number of failures satisfying the preset condition may be, without being limited to, any one of the following cases (1) to (2):
(1) The number of failures satisfies a number threshold.
(1) The failure times are greater than the failure time threshold value, and the failure times are greater than or equal to the failure time threshold value. The failure number threshold may be configured on the application server in advance. The failure number threshold may be set according to experience, experiment, or requirement, for example, may be set to 3 times, and the specific value of the failure number threshold is not limited in this embodiment. Optionally, (1) it may be determined that the interface is abnormal when the number of consecutive failures satisfies the number threshold, that is, the interface is invoked multiple times consecutively and the number of consecutive failures of the interface is invoked satisfies the number threshold.
(2) The failure rate satisfies a failure rate threshold.
(2) Both cases may be included where the failure rate is greater than the failure rate threshold and the failure rate is greater than or equal to the failure rate threshold. The failure rate threshold may be pre-configured on the application server. The failure rate threshold may be set according to experience, experiment, or requirement, and the specific value of the failure rate threshold is not limited in this embodiment.
The alarm information indicates that the target interface is abnormal. For example, the alert information may indicate that the target interface is not available. The application server can output the alarm information in any form, for example, the monitoring platform can send a short message to a terminal of a developer, and the short message comprises the alarm information; for another example, the monitoring platform may send an email to an email address of the developer, where the email includes the alarm information, and the form of outputting the alarm information is not limited in this embodiment. By outputting the alarm information, developers can know the quality of the target interface at the first time, so that the situation that the target interface is unavailable can be dealt with in time, and physical examination of users is improved.
In some possible embodiments, a probe may be deployed on the application server, and the flow of interface monitoring may be performed by the probe. Specifically, referring to fig. 3, the flow of the probe calling the one-time interface may include the following steps one to eleven.
Step one, starting timing calling.
Step two, judging whether the interface is off-line, if the interface is not off-line, executing step three, if the interface is off-line, executing
And step three, generating and sending a calling request to the third-party server according to the input parameters of the interface.
And step four, receiving a return code of the third-party server.
And step five, judging whether the return code is a preset successful return code, if not, executing step six, and if the return code is the preset successful return code, executing step six.
And step six, marking the calling failure of the third-party interface.
And step seven, reporting the monitoring platform.
And step eight, counting the calling failure rate of the target interface.
Step nine, judging whether the calling failure rate of the target interface is greater than a set threshold value, if the calling failure rate is greater than the set threshold value, executing step ten, and if the calling failure rate is less than or equal to the set threshold value, executing step eleven.
And step ten, sending early warning information to developers.
And step eleven, finishing the calling process.
Schematically, referring to fig. 4, a flow of the passive monitoring interface triggered by the terminal is shown above a dashed box of fig. 4, and includes the following steps 1 to 4:
step 1, the terminal sends a call request to an application server.
And 2, the application server calls an interface of the third-party server.
And 3, the third-party server returns data to the application server, wherein the data comprises a return code.
And step 4, the application server asynchronously reports the quality of the interface of the third-party server to the monitoring platform.
The flow of the monitoring interface actively triggered by the application server is shown in the dashed box of fig. 4, which includes the following steps 2 to 4:
and 2, simulating an HTTP (hyper text transport protocol) protocol by the probe service, and calling an interface of a third-party server by sending a preset access request to the third-party interface.
And 3, the third-party server returns data to the application server, wherein the data comprises a return code.
And 4, the probe service acquires a return code from the data, judges whether the return code is a preset successful return code or not, if the return code is not the preset successful return code, the probe service marks the calling failure of the third-party interface, reports the calling failure of the interface to the monitoring platform, the monitoring platform circularly counts the number of the calling failure of the interface, and if the interface is judged to be abnormal, sends a short message or a mail to a developer.
It should be noted that, this embodiment is only described as an example in which the flow of the monitoring interface is dispersed in the application server and the monitoring platform to be executed, in other possible embodiments, the application server and the monitoring platform may also be integrated into the same device, and the device may be any computing device that executes each step executed by the application server and the monitoring platform in the foregoing embodiments. Additionally, if the application server and the monitoring platform are integrated, step 206 may not need to be performed.
According to the method provided by the embodiment, the low-flow interfaces are screened out from the interfaces to be monitored, the low-flow interfaces are actively called every preset time, the return codes are collected, the return codes can be obtained regularly, the data volume of the return codes can be expanded, the failure times of interface calling are counted according to enough return codes, then an alarm is given according to the failure times, the alarm can be given in time when the low-flow interfaces are abnormal, the monitoring timeliness is improved, a user is helped to find out the condition that the low-flow interfaces are unavailable in time, and the monitoring efficiency is improved.
Fig. 5 is a schematic structural diagram of an interface monitoring apparatus according to an embodiment of the present invention, and referring to fig. 5, the apparatus includes:
a selecting module 501, configured to select a target interface of a target server from one or more interfaces of one or more servers, where a traffic of the target interface is lower than a traffic threshold;
a calling module 502, configured to call the target interface of the target server every preset time;
a receiving module 503, configured to receive a return code from the target server, where the return code indicates that the target interface is successfully called or fails to be called;
a counting module 504, configured to count the number of failures to call the target interface according to the received return code each time;
and an output module 505, configured to output alarm information when the failure times meet a preset condition, where the alarm information indicates that the target interface is abnormal.
In one possible implementation, the selecting module 501 includes:
the acquisition submodule is used for acquiring the calling times of the interface in a target time period for each interface in the one or more interfaces of the one or more servers, wherein the time end point of the target time period is the current time point and the time length is preset time length;
and the selection submodule is used for selecting an interface with the calling frequency lower than the preset frequency in the target time period from the one or more interfaces of the one or more servers according to the calling frequency of each interface of each server in the target time period to obtain the target interface.
In one possible implementation, the calling module 502 includes:
the reading submodule is used for reading the historical input parameters of the target interface from the historical call log of the target interface;
the generation submodule is used for generating a calling request according to the historical input parameters of the target interface;
and the sending submodule is used for sending the calling request to the target server.
In a possible implementation, the reading sub-module is configured to select, from each call record of the historical call log, a call record closest to the current time point; and reading the historical input parameters of the target interface from the call record.
In one possible implementation, the calling module 502 includes:
the acquisition submodule is used for acquiring the input parameters of the target interface from the configuration instruction;
the generation submodule is used for generating a calling request according to the input parameters of the target interface;
and the sending submodule is used for sending the calling request to the target server.
In a possible implementation, the reading sub-module is configured to count an occurrence frequency of each historical input parameter of the target interface according to a historical input parameter in each call record of the historical call log; and selecting the historical input parameter with the highest frequency of occurrence from a plurality of historical input parameters of the target interface according to the frequency of occurrence of each historical input parameter of the target interface.
In one possible implementation, the apparatus further comprises: a sending module, configured to send a negotiation message to the target server, where the negotiation message is used to negotiate and call the target interface of the target server at regular time, and the negotiation message includes a signature of the monitoring platform;
the receiving module 503 is further configured to receive a negotiation validation message from the target server.
In one possible implementation, the apparatus further comprises: the acquisition module is used for acquiring one or more call chains where a background server of the target application is located;
the receiving module 503 is further configured to select each child node of the background server from the one or more call chains to obtain the one or more servers.
In one possible implementation, the apparatus further comprises: the detection module is used for detecting the state of the target interface;
the invoking module 502 is specifically configured to invoke the target interface every preset time length when the target interface is in an online state.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
It should be noted that: the interface monitoring apparatus provided in the foregoing embodiment is only illustrated by dividing the functional modules when monitoring the interface, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the computing device is divided into different functional modules to complete all or part of the functions described above. In addition, the interface monitoring apparatus and the interface monitoring method provided in the foregoing embodiments belong to the same concept, and specific implementation processes thereof are described in detail in the method embodiments and are not described herein again.
The interface monitoring method provided by the present invention may be executed by a computing device, and the computing device may be implemented as a terminal, for example, fig. 6 is a schematic structural diagram of a terminal provided in an embodiment of the present invention. Fig. 6 shows a block diagram of a terminal according to an embodiment of the present invention. The terminal 600 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 600 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 600 includes: a processor 601 and a memory 602.
The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 602 is used to store at least one instruction for execution by the processor 601 to implement the interface monitoring method provided by the method embodiments herein.
In some embodiments, the terminal 600 may further optionally include: a peripheral interface 603 and at least one peripheral. The processor 601, memory 602 and peripherals interface 603 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a touch screen display 605, a camera 606, an audio circuit 607, a positioning component 608, and a power supply 609.
The peripheral interface 603 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, memory 602, and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral interface 603 may be implemented on separate chips or circuit boards, which is not limited by the present embodiment.
The Radio Frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 604 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 604 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 604 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 604 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display 605 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to capture touch signals on or above the surface of the display screen 605. The touch signal may be input to the processor 601 as a control signal for processing. At this point, the display 605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 605 may be one, providing the front panel of the terminal 600; in other embodiments, the display 605 may be at least two, respectively disposed on different surfaces of the terminal 600 or in a folded design; in still other embodiments, the display 605 may be a flexible display disposed on a curved surface or a folded surface of the terminal 600. Even more, the display 605 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 605 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 606 is used to capture images or video. Optionally, camera assembly 606 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, the main camera and the wide-angle camera are fused to realize panoramic shooting and a VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 607 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 601 for processing or inputting the electric signals to the radio frequency circuit 604 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 600. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The loudspeaker can be a traditional film loudspeaker and can also be a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 607 may also include a headphone jack.
The positioning component 608 is used for positioning the current geographic Location of the terminal 600 to implement navigation or LBS (Location Based Service). The Positioning component 608 can be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 609 is used to provide power to the various components in terminal 600. The power supply 609 may be ac, dc, disposable or rechargeable. When the power supply 609 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 600 also includes one or more sensors 610. The one or more sensors 610 include, but are not limited to: acceleration sensor 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 615, and proximity sensor 616.
The acceleration sensor 611 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 600. For example, the acceleration sensor 611 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 601 may control the touch screen display 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 612 may detect a body direction and a rotation angle of the terminal 600, and the gyro sensor 612 and the acceleration sensor 611 may cooperate to acquire a 3D motion of the user on the terminal 600. The processor 601 may implement the following functions according to the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 613 may be disposed on a side frame of the terminal 600 and/or on a lower layer of the touch display screen 605. When the pressure sensor 613 is disposed on the side frame of the terminal 600, a user's holding signal of the terminal 600 can be detected, and the processor 601 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed at the lower layer of the touch display screen 605, the processor 601 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 605. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 614 is used for collecting a fingerprint of a user, and the processor 601 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 614 may be disposed on the front, back, or side of the terminal 600. When a physical button or vendor Logo is provided on the terminal 600, the fingerprint sensor 614 may be integrated with the physical button or vendor Logo.
The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, processor 601 may control the display brightness of touch display 605 based on the ambient light intensity collected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 605 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is turned down. In another embodiment, the processor 601 may also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
A proximity sensor 616, also known as a distance sensor, is typically disposed on the front panel of the terminal 600. The proximity sensor 616 is used to collect the distance between the user and the front surface of the terminal 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 gradually decreases, the processor 601 controls the touch display 605 to switch from the bright screen state to the dark screen state; when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 becomes gradually larger, the touch display 605 is controlled by the processor 601 to switch from the message screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is not intended to be limiting of terminal 600 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
The interface monitoring method provided by the present invention may be executed by a computing device, which may be implemented as a server, for example, fig. 7 is a schematic structural diagram of a server provided by an embodiment of the present invention, and the server 700 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 701 and one or more memories 702, where the one or more memories 702 store at least one instruction, and the at least one instruction is loaded and executed by the one or more processors 701 to implement the interface monitoring method provided by each method embodiment described above. Of course, the server may also have a wired or wireless network interface, an input/output interface, and other components to facilitate input and output, and the server may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, including instructions executable by a processor to perform the interface monitoring method in the above-described embodiments is also provided. For example, the computer readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. An interface monitoring method, the method comprising:
selecting a target interface of a target server from one or more interfaces of one or more servers, wherein the flow of the target interface is lower than a flow threshold value;
calling the target interface of the target server every other preset time length;
receiving a return code from the target server, the return code indicating a success in invoking the target interface or a failure in invoking the target interface;
counting the failure times of calling the target interface according to the received return code each time;
and outputting alarm information when the failure times meet a preset condition, wherein the alarm information represents that the target interface is abnormal.
2. The method of claim 1, wherein selecting the target interface of the target server from the one or more interfaces of the one or more servers comprises:
for each interface in the one or more interfaces of the one or more servers, acquiring the calling times of the interface in a target time period, wherein the time end point of the target time period is the current time point and the time length is the preset time length;
and according to the calling times of each interface of each server in the target time period, selecting an interface of which the calling times in the target time period are lower than preset times from the one or more interfaces of the one or more servers to obtain the target interface.
3. The method of claim 1, wherein said invoking said target interface of said target server comprises:
reading a historical input parameter of the target interface from a historical call log of the target interface;
generating a calling request according to the historical input parameters of the target interface;
and sending the calling request to the target server.
4. The method of claim 3, wherein reading the historical input parameters of the target interface from the historical call log of the target interface comprises:
selecting a calling record closest to the current time point from each calling record of the historical calling log;
and reading the historical input parameters of the target interface from the call record.
5. The method of claim 3, wherein reading the historical input parameters of the target interface from the historical call log of the target interface comprises:
counting the occurrence frequency of each historical input parameter of the target interface according to the historical input parameter in each calling record of the historical calling log;
and selecting the historical input parameter with the highest frequency of occurrence from a plurality of historical input parameters of the target interface according to the frequency of occurrence of each historical input parameter of the target interface.
6. The method of claim 1, wherein prior to selecting the target interface of the target server from the one or more interfaces of the one or more servers, the method further comprises:
acquiring one or more call chains where a background server of a target application is located;
and selecting each child node of the background server from the one or more call chains to obtain the one or more servers.
7. The method of claim 1,
before the calling the target interface of the target server, the method further includes:
detecting the state of the target interface;
the calling the target interface of the target server every preset time length comprises the following steps:
and when the target interface is in an online state, calling the target interface at intervals of preset time length.
8. An interface monitoring apparatus, the apparatus comprising:
the device comprises a selection module, a processing module and a processing module, wherein the selection module is used for selecting a target interface of a target server from one or more interfaces of one or more servers, and the flow of the target interface is lower than a flow threshold value;
the calling module is used for calling the target interface of the target server every other preset time;
a receiving module, configured to receive a return code from the target server, where the return code indicates that the target interface is successfully called or fails to be called;
the counting module is used for counting the failure times of calling the target interface according to the return code received each time;
and the output module is used for outputting alarm information when the failure times meet a preset condition, wherein the alarm information represents that the target interface is abnormal.
9. A computing device comprising one or more processors and one or more memories having stored therein at least one instruction that is loaded and executed by the one or more processors to implement the interface monitoring method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored therein at least one instruction which is loaded and executed by a processor to implement the interface monitoring method of any one of claims 1 to 7.
CN201910533805.5A 2019-06-19 2019-06-19 Interface monitoring method and device, computing equipment and storage medium Active CN110224870B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910533805.5A CN110224870B (en) 2019-06-19 2019-06-19 Interface monitoring method and device, computing equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910533805.5A CN110224870B (en) 2019-06-19 2019-06-19 Interface monitoring method and device, computing equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110224870A CN110224870A (en) 2019-09-10
CN110224870B true CN110224870B (en) 2023-03-24

Family

ID=67814049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910533805.5A Active CN110224870B (en) 2019-06-19 2019-06-19 Interface monitoring method and device, computing equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110224870B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708339B (en) * 2019-11-06 2021-06-22 四川长虹电器股份有限公司 Correlation analysis method based on WEB log
CN111339466A (en) * 2020-02-25 2020-06-26 天津满运软件科技有限公司 Interface management method and device, electronic equipment and readable storage medium
CN112583819B (en) * 2020-12-08 2023-03-24 支付宝(杭州)信息技术有限公司 Network interface state detection method, device and equipment
CN113328906B (en) * 2021-04-22 2023-01-06 成都欧珀通信科技有限公司 Flow real-time monitoring method and device, storage medium and electronic equipment
CN113296982B (en) * 2021-05-27 2024-06-14 北京京东振世信息技术有限公司 Interface calling method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104065725A (en) * 2014-06-25 2014-09-24 北京思特奇信息技术股份有限公司 System real-time monitoring method based on hyper text transfer protocol (HTTP) and system
CN105591821A (en) * 2016-01-06 2016-05-18 北京京东尚科信息技术有限公司 Monitoring system and business system
US9374660B1 (en) * 2012-05-17 2016-06-21 Amazon Technologies, Inc. Intentional monitoring
CN108134708A (en) * 2016-12-01 2018-06-08 腾讯科技(深圳)有限公司 The method and apparatus for monitoring third party's interface
CN109558299A (en) * 2018-11-26 2019-04-02 武汉掌游科技有限公司 Business monitoring and the method, apparatus of early warning, equipment and storage medium
CN109597759A (en) * 2018-11-09 2019-04-09 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of business software
CN109597729A (en) * 2018-10-29 2019-04-09 深圳壹账通智能科技有限公司 A kind of monitoring method and device based on analog subscriber test
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9374660B1 (en) * 2012-05-17 2016-06-21 Amazon Technologies, Inc. Intentional monitoring
CN104065725A (en) * 2014-06-25 2014-09-24 北京思特奇信息技术股份有限公司 System real-time monitoring method based on hyper text transfer protocol (HTTP) and system
CN105591821A (en) * 2016-01-06 2016-05-18 北京京东尚科信息技术有限公司 Monitoring system and business system
CN108134708A (en) * 2016-12-01 2018-06-08 腾讯科技(深圳)有限公司 The method and apparatus for monitoring third party's interface
CN109597729A (en) * 2018-10-29 2019-04-09 深圳壹账通智能科技有限公司 A kind of monitoring method and device based on analog subscriber test
CN109597759A (en) * 2018-11-09 2019-04-09 深圳壹账通智能科技有限公司 Test method and device, storage medium, the computer equipment of business software
CN109558299A (en) * 2018-11-26 2019-04-02 武汉掌游科技有限公司 Business monitoring and the method, apparatus of early warning, equipment and storage medium
CN109857667A (en) * 2019-02-03 2019-06-07 苏州市龙测智能科技有限公司 Automatic interface testing method, test device, test equipment and storage medium

Also Published As

Publication number Publication date
CN110224870A (en) 2019-09-10

Similar Documents

Publication Publication Date Title
CN110224870B (en) Interface monitoring method and device, computing equipment and storage medium
CN110209952B (en) Information recommendation method, device, equipment and storage medium
CN110674022B (en) Behavior data acquisition method and device and storage medium
CN111339086A (en) Block processing method, and data query method and device based on block chain
CN111177013A (en) Log data acquisition method and device, computer equipment and storage medium
CN112420217B (en) Message pushing method, device, equipment and storage medium
CN111061550A (en) Task processing method, device, equipment and storage medium
CN114064450A (en) Application program testing method and device, electronic equipment and storage medium
CN111338933A (en) Buried point verification method, device, equipment and storage medium
CN111131392A (en) Method, device, electronic equipment and medium for processing message
CN110909264A (en) Information processing method, device, equipment and storage medium
CN112231666A (en) Illegal account processing method, device, terminal, server and storage medium
CN110768843B (en) Network problem analysis method, device, terminal and storage medium
CN111258683A (en) Detection method, detection device, computer equipment and storage medium
CN111881423A (en) Method, device and system for limiting function use authorization
CN111682983A (en) Interface display method and device, terminal and server
CN110781032A (en) Data transmission method, device, electronic equipment and medium
CN113591090B (en) Program bug reporting method, device, equipment and storage medium
CN114900559A (en) Management system, terminal, management method, and storage medium
CN111131619B (en) Account switching processing method, device and system
CN114219112A (en) Health service reservation method, device, server and storage medium
CN110417931B (en) Domain name resolution record acquisition method and device, computer equipment and storage medium
CN114140105A (en) Resource transfer method, device, equipment and computer readable storage medium
CN113051485A (en) Group searching method, device, terminal and storage medium
CN114385939A (en) Application display method, application display system, application display device and application display equipment

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