CN116932317A - Application program interface monitoring method, device, equipment and storage medium - Google Patents

Application program interface monitoring method, device, equipment and storage medium Download PDF

Info

Publication number
CN116932317A
CN116932317A CN202310639461.2A CN202310639461A CN116932317A CN 116932317 A CN116932317 A CN 116932317A CN 202310639461 A CN202310639461 A CN 202310639461A CN 116932317 A CN116932317 A CN 116932317A
Authority
CN
China
Prior art keywords
application program
monitoring
interface
fault
program interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310639461.2A
Other languages
Chinese (zh)
Inventor
李丹峰
赵同
芮阳
王梦竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310639461.2A priority Critical patent/CN116932317A/en
Publication of CN116932317A publication Critical patent/CN116932317A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The specification relates to the field of intelligent operation and maintenance, and can be used in the field of financial science and technology, and provides an application program interface monitoring method, an application program interface monitoring device and a storage medium, wherein the application program interface monitoring method comprises the following steps: acquiring busyness of each application program interface in a business system in real time; adding interface names of application program interfaces with busyness meeting preset conditions in the business system into a monitoring list; interface monitoring is carried out on the application program interfaces in the monitoring list; when the monitoring finds that the application program interface in the monitoring list has faults, determining the fault type of the faults; matching a fault processing script corresponding to the fault type from a fault knowledge base; and calling the fault processing script to repair the corresponding application program interface. The embodiment of the specification can reduce the resource overhead of the monitoring application program interface while improving the running stability of the service system.

Description

Application program interface monitoring method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of intelligent operation and maintenance, and may be used in the field of financial technology, in particular, to a method, an apparatus, a device, and a storage medium for monitoring an application program interface.
Background
With the increase and complexity of various business scenarios, the number of application program interfaces (Application Programming Interface, APIs) of business systems is increasing. In order to maintain stable operation of the service system, the service system generally needs to be monitored. However, as the technology of the operation and maintenance personnel corresponding to the application program interface is not familiar, the fault is often difficult to remove in time when the fault is found, so that the stable operation of the service system is affected to a certain extent. Meanwhile, the number of the application program interfaces is excessive, the full monitoring is performed in real time, and a large amount of resources of the service system are occupied.
Disclosure of Invention
An object of the embodiments of the present disclosure is to provide a method, an apparatus, a device, and a storage medium for monitoring an application program interface, so as to reduce resource overhead of monitoring the application program interface while improving operation stability of a service system.
To achieve the above object, in one aspect, an embodiment of the present disclosure provides an application program interface monitoring method, including:
acquiring busyness of each application program interface in a business system in real time;
adding interface names of application program interfaces with busyness meeting preset conditions in the business system into a monitoring list;
interface monitoring is carried out on the application program interfaces in the monitoring list;
when the monitoring finds that the application program interface in the monitoring list has faults, determining the fault type of the faults;
matching a fault processing script corresponding to the fault type from a fault knowledge base;
and calling the fault processing script to repair the corresponding application program interface.
In the application program interface monitoring method of the embodiment of the present disclosure, after the corresponding application program interface is repaired by calling the fault processing script, the method further includes:
performing interface availability test on the repaired application program interface;
and when the repaired application program interface fails the interface availability test, outputting a fault repair failure notification to a user side of a target operation and maintenance person so as to prompt the target operation and maintenance person to carry out coping treatment.
The application program interface monitoring method in the embodiment of the present disclosure further includes:
and when the monitoring of one round is finished, clearing the monitoring list so as to facilitate the monitoring of the next round.
In the method for monitoring an application program interface in the embodiment of the present disclosure, the interface monitoring of the application program interface in the monitoring list includes:
matching interface message information in an interface message library according to the interface names in the monitoring list;
and monitoring the target performance index of the corresponding application program interface according to the interface message information.
In the application program interface monitoring method of the embodiment of the present disclosure, determining the fault type of the fault includes:
analyzing the interface error report log corresponding to the fault to obtain error report keywords;
and matching the fault type corresponding to the error reporting keyword from a relation table corresponding to the fault type and the error reporting keyword.
In the method for monitoring application program interfaces according to the embodiment of the present disclosure, the obtaining, in real time, the busyness of each application program interface in the service system includes:
acquiring the interface access quantity of each application program interface in a service system in real time;
acquiring the interface concurrency number of each application program interface in the service system in real time; and/or the number of the groups of groups,
and acquiring the interface access quantity system duty ratio of each application program interface in the service system in real time.
In the method for monitoring an application program interface according to the embodiment of the present disclosure, the target performance index includes any one or more of availability, correctness, response time, availability, failure rate, correctness, average availability, average correctness, average response time, total time of error, total time of failure, and total time of failure.
On the other hand, the embodiment of the specification also provides an application program interface monitoring device, which comprises:
the acquisition module is used for acquiring the busyness of each application program interface in the service system in real time;
the joining module is used for joining the interface names of the application program interfaces with busyness meeting preset conditions in the business system into a monitoring list;
the monitoring module is used for carrying out interface monitoring on the application program interfaces in the monitoring list;
the determining module is used for determining the fault type of the fault when the monitoring finds that the application program interface in the monitoring list has the fault;
the matching module is used for matching the fault processing script corresponding to the fault type from a fault knowledge base;
and the calling module is used for calling the fault processing script to repair the corresponding application program interface.
In another aspect, embodiments of the present disclosure further provide a computer device including a memory, a processor, and a computer program stored on the memory, which when executed by the processor, performs the instructions of the above method.
In another aspect, embodiments of the present disclosure also provide a computer storage medium having stored thereon a computer program which, when executed by a processor of a computer device, performs instructions of the above method.
As can be seen from the technical solutions provided in the embodiments of the present disclosure, since only the application program interfaces with busyness meeting the preset conditions in the service system are monitored, compared with monitoring the total number of application program interfaces in the service system, the resource overhead for monitoring the application program interfaces can be greatly reduced, thereby reducing the monitoring cost; in addition, when a fault is monitored, the fault processing script corresponding to the fault type can be matched from the fault knowledge base, and the corresponding application program interface can be automatically repaired by calling the fault processing script, so that the problem that an operation and maintenance person is difficult to remove the fault in time is effectively relieved to a certain extent, namely the situation that the application program interface is unavailable for a long time is avoided, and the running stability of a service system is further improved. Therefore, the embodiment of the specification can reduce the resource overhead of the monitoring application program interface while improving the running stability of the service system.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 illustrates an application scenario diagram of application program interface monitoring in some embodiments of the present description;
FIG. 2 illustrates a flow chart of an application program interface monitoring method in some embodiments of the present description;
FIG. 3 is a flow chart illustrating a method of monitoring an application program interface in further embodiments of the present description;
FIG. 4 illustrates a flowchart of interface monitoring of an application program interface in a monitoring list in an application program interface monitoring method according to some embodiments of the present disclosure;
FIG. 5 illustrates a flow chart of determining a fault type of a fault in an application program interface monitoring method of some embodiments of the present description;
FIG. 6 illustrates a block diagram of an application program interface monitoring device in some embodiments of the present description;
fig. 7 illustrates a block diagram of a computer device in some embodiments of the present description.
[ reference numerals description ]
10. A business system;
20. monitoring nodes;
30. a fault knowledge base;
61. an acquisition module;
62. adding a module;
63. a monitoring module;
64. a determining module;
65. a matching module;
66. calling a module;
702. a computer device;
704. a processor;
706. a memory;
708. a driving mechanism;
710. an input/output interface;
712. an input device;
714. an output device;
716. a presentation device;
718. a graphical user interface;
720. a network interface;
722. a communication link;
724. a communication bus.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
An application scenario diagram of application program interface monitoring according to some embodiments of the present disclosure is shown in fig. 1, where a monitoring node 20 may obtain, in real time, a busyness of each application program interface in a service system 10; adding interface names of application program interfaces with busyness meeting preset conditions in the business system 10 into a monitoring list; interface monitoring is carried out on the application program interfaces in the monitoring list; when the monitoring finds that the application program interface in the monitoring list has faults, determining the fault type of the faults; matching fault handling scripts corresponding to the fault types from a fault knowledge base 30; and calling the fault processing script to repair the corresponding application program interface. The embodiment of the specification can reduce the resource overhead of the monitoring application program interface while improving the running stability of the service system.
In some embodiments, business system 10 may be a business system with multiple application program interfaces under any application scenario (e.g., banking system, financial business system, e-commerce platform, etc.). These business systems 10 may be distributed systems or clustered systems.
In some embodiments, monitoring node 20 may be an interface monitoring server independent of the outside of business system 10, which may be an electronic device with computing and network interaction functions; software running in the electronic device that provides business logic for data processing and network interactions may also be used. In other embodiments, monitoring node 20 may also be part of business system 10. The monitoring node 20 may be configured with one or a plurality of monitoring nodes according to actual needs.
In some embodiments, fault knowledge base 30 may be a relational database that records various fault types and their corresponding fault handling scripts. The content of the fault knowledge base 30 will be described in detail below.
The embodiment of the present disclosure provides an application program interface monitoring method, which may be applied to the monitoring node side described above, and referring to fig. 2, in some embodiments, the application program interface monitoring method may include the following steps:
step 201, obtaining busyness of each application program interface in the business system in real time.
Step 202, adding interface names of application program interfaces with busyness meeting preset conditions in the business system into a monitoring list.
And 203, performing interface monitoring on the application program interfaces in the monitoring list.
And 204, when the monitoring finds that the application program interface in the monitoring list has faults, determining the fault type of the faults.
Step 205, matching the fault processing script corresponding to the fault type from a fault knowledge base.
And 206, calling the fault processing script to repair the corresponding application program interface.
In the embodiment of the specification, as only the application program interfaces with busyness meeting the preset conditions in the service system are monitored, compared with the monitoring of the whole application program interfaces of the service system, the method can greatly reduce the resource expenditure for monitoring the application program interfaces, thereby reducing the monitoring cost; in addition, when a fault is monitored, the fault processing script corresponding to the fault type can be matched from the fault knowledge base, and the corresponding application program interface can be automatically repaired by calling the fault processing script, so that the problem that an operation and maintenance person is difficult to remove the fault in time is effectively relieved to a certain extent, namely the situation that the application program interface is unavailable for a long time is avoided, and the running stability of a service system is further improved. Therefore, the embodiment of the specification can reduce the resource overhead of the monitoring application program interface while improving the running stability of the service system.
The step of obtaining the busyness of each application program interface in the business system in real time is as follows: and acquiring the busyness of each application program interface in the full application program interfaces in the business system in real time. The busyness is used for representing busyness or load condition of the application program interface. Generally, for a business system, the higher the busyness of an application program interface, the higher the importance of the application program interface to the system, and the higher the failure probability of the application program interface. Therefore, the selection of which application program interfaces to bring into the monitoring range can be determined according to the busyness of the application program interfaces, so that the application program interfaces can be effectively monitored, and the monitoring cost can be reduced.
In some embodiments, the busyness may be specifically via an interface access amount, a concurrency amount, and/or an interface access amount system duty cycle, etc. In this scenario, acquiring the busyness of each application program interface in the service system in real time may refer to: acquiring the interface access quantity of each application program interface in a service system in real time; acquiring the interface concurrency number of each application program interface in the service system in real time; and/or acquiring the interface access volume system ratio of each application program interface in the service system in real time.
In some embodiments, real-time may refer to strong real-time, quasi real-time or weak real-time according to the difference of response time in microsecond, millisecond and second, and may be customized according to application scenarios and needs when in specific implementation.
The busy degree meeting the preset condition means that: the busyness of the application program interface reaches a set threshold. For example, if the busyness is represented by the interface access amount, the busyness satisfying the preset condition means that: the current interface access amount of the application program interface reaches an access amount threshold; if the busyness is represented by the concurrency, the busyness satisfying the preset condition means that: the current concurrency number of the application program interface reaches a concurrency number threshold; if the busyness is represented by the system duty ratio of the interface access amount, the busyness meeting the preset condition means that: the current interface access amount of the application program interface has a duty ratio in the total interface access amount of the system reaching a duty ratio threshold.
The monitoring list is a list dynamically maintained by the monitoring node and used for representing the monitoring range; in some embodiments, the monitoring list may be emptied after completing one round of monitoring in order to facilitate the next round of monitoring. Thus, the monitored list content may be different under different rounds of monitoring. Wherein, the round of monitoring means: and finishing one-time traversal monitoring on all the application program interfaces in the current monitoring list. For example, assuming that there are three application program interfaces API1, API2, and API3 in the current monitoring list, when one traversal monitoring of API1, API2, and API3 is completed, one round of monitoring is completed.
In some embodiments, as shown in fig. 4, the interface monitoring on the application program interfaces in the monitoring list may include the following steps:
step 401, matching interface message information in the interface message library according to the interface name in the monitoring list.
Interface message information (including request messages and response messages) of the full application program interfaces of the service system is recorded in the interface message library; each interface message mainly comprises an interface name and two fields of the message.
And step 402, monitoring a target performance index of a corresponding application program interface according to the interface message information.
The target performance index is a specified performance monitoring index, and may be set in advance. For example, in some embodiments, the target performance index may be availability. Obviously, this is merely an example, and in other embodiments, the target performance index may be any one or more of availability, correctness (declaring correct), response time, availability, failure rate, correct rate, average availability, average correct rate, average response time, total duration of error, total number of errors, total duration of failure, total number of failures, etc. according to need, and the embodiments of the present disclosure are not limited thereto.
For example, in an exemplary embodiment, taking an example that the target performance index is availability, monitoring the target performance index of the corresponding application program interface according to the interface message information refers to: for any one application program interface in the monitoring list, judging whether the returned result in the response message is the expected returned result of the request message; if the expected return result is obtained, the application program interface is considered to be normal; otherwise, the application program interface is considered to be faulty. In actual implementation, the available definitions may also be different according to different monitoring modes of the monitoring nodes. For example, when monitoring is performed by adopting a single monitoring node, monitoring is available once, and the application program interface is considered to be normal; one monitoring is not available, the application program interface is considered to be faulty. When monitoring is performed by adopting a plurality of monitoring nodes, in one monitoring, all monitoring nodes are available or most of the monitoring nodes are available, so that the application program interface is normal; otherwise, the application program interface may be considered to be faulty. In the embodiments of the present disclosure, a fault includes a situation where there is an error indication but there is no fault in practice.
As shown in connection with fig. 5, in some embodiments, determining the fault type of the fault may include the steps of:
and step 501, analyzing the interface error report log corresponding to the fault to obtain an error report keyword.
When the application program interface of the service system fails, a corresponding interface error report log is generated and stored in the service system. Therefore, when the fault of the application program interface in the monitoring list is monitored, the corresponding interface error report log can be obtained, and log analysis is carried out on the interface error report log, so that error report keywords in the interface error report log can be obtained. The misinformation keyword may be a word or phrase (i.e., phrase) for indicating the reason of misinformation.
For example, in one exemplary embodiment, the interface error log is: { "error_msg": "Failed to invoke com.icbc.spcp.dsf.HAPersonalCustRiskServ/1.0/ExploreRiskAccountList, cause:", "error_code": "500200", "return_msg": "Failed to invoke com.xxx.spcp.dsf.HAPersonalCustRisk Serv/1.0/ExploreRiskAccountList," return_code ":" -500200"}; the misreported keyword "invoke" can be extracted from the parsed keyword.
For another example, in another exemplary embodiment, the interface error log is: { "PUBLIC": { "STATUS": "1", "TRANSSEQNO": "10100000027009", "ERRMSG": "interface number error [ P0439102]", "APPNAME": "SPCP", "ERRCODE": "93000002" }, "PRIVATE": { }; the error reporting keyword 'interface number is wrong' can be extracted from the analysis.
Step 502, matching the fault type corresponding to the error reporting keyword from the relation table of the fault type and the error reporting keyword.
In the corresponding relation table of the fault types and the error reporting keywords, the corresponding relations of different fault types and the error reporting keywords are recorded. Therefore, the fault type corresponding to the error reporting keyword can be matched from the relation table of the fault type and the error reporting keyword. Wherein, a fault type may correspond to one or more fault keywords. For example, in an exemplary embodiment, taking the foregoing error reporting keyword "invoke" as an example, by querying the correspondence table between the fault types and the error reporting keywords, it may be confirmed that the corresponding fault type is 002 (here, the fault type 002 is an exemplary example).
In a very small number of cases, when the extracted error reporting keyword is not matched with all fault types in the fault type and error reporting keyword corresponding relation table, a new type fault alarm can be output, namely, the new type fault alarm is output to a user side of a target operation and maintenance person so as to prompt the target operation and maintenance person to conduct coping. In some embodiments, the user terminal may be a mobile terminal (i.e., a smart phone), a display, a desktop computer, a tablet computer, a notebook computer, a digital assistant, or a smart wearable device. Wherein, intelligent wearable equipment can include intelligent bracelet, intelligent wrist-watch, intelligent glasses or intelligent helmet etc.. Of course, the user side is not limited to the electronic device with a certain entity, and may also be software running in the electronic device.
As described above, the call interfaces of the various fault types and their corresponding fault handling scripts are recorded in the fault knowledge base. The fault processing script is a coping logic script which is pre-written according to fault type characteristics and historical processing experience thereof. For example, in an exemplary embodiment, the fault type and fault handling script correspondence may be as shown in table 1 below.
TABLE 1
Fault type Fault typeRemarks Fault handling script
001 Registry address errors restartzk.sh
002 Connection background high-timeliness online cluster failure updatepw.sh
003 DDS registry address configuration error updatedds.sh3
As can be seen from the correspondence between the types of faults and the fault handling scripts shown in table 1 above:
the processing script corresponding to the fault type 001 is restartzk.sh, the script mainly relates to address update of a registry, an interface configuration knowledge base can be called through an interface, and parameters corresponding to the registry address of the interface are updated through an update statement; the relevant update statement may be, for example, "update spcp_config setzk_ wgq = 'XXXX'".
The processing script corresponding to the fault type 002 is updatepw.sh, and the fault is mainly caused by error reporting caused by error of configured account numbers and passwords when the related interfaces are connected with the background high-efficiency online cluster. By connecting the background interface configuration information repository, an update of the highly aged online cluster login account and password is performed, and the related update statement may be, for example, "update spcp_config set env_cps_grp_kva_pwd= ' SPCPXXX ' update spcp_config set env_pwd_encypt= ' spcp".
The processing script corresponding to the fault type 003 is an update dds.sh, the error reporting is mainly that the gateway address of the data distribution service (Data Distribution Service, DDS) connected by the interface is wrong, the error reporting is realized by updating the HML parameter in the background database, the related update statement can be, for example, "update spcp_config setHML= 'dsf-app-XXXXX'", and the related error reporting can be repaired after the update is finished.
Therefore, after the fault type is obtained, the fault processing script corresponding to the fault type can be matched from the fault knowledge base, and then the fault problem of the corresponding application program interface can be generally repaired through the fault processing script corresponding to the fault type, so that the timeliness of fault repair is greatly improved, and the running stability of a service system is further improved.
The embodiment of the present disclosure further provides another application program interface monitoring method, which may be applied to the monitoring node side described above, and referring to fig. 3, in some embodiments, the application program interface monitoring method may include the following steps:
step 301, obtaining busyness of each application program interface in the service system in real time.
And 302, adding the interface names of the application program interfaces with busyness meeting preset conditions in the business system into a monitoring list.
Step 303, performing interface monitoring on the application program interfaces in the monitoring list.
And 304, determining the fault type of the fault when the monitoring finds that the application program interface in the monitoring list has the fault.
Step 305, matching the fault processing script corresponding to the fault type from the fault knowledge base.
And step 306, calling the fault processing script to repair the corresponding application program interface.
Step 307, performing an interface availability test on the repaired application program interface.
Step 308, judging whether the repaired application program interface fails the interface availability test. If so, step 303 is performed, namely, monitoring is performed on the next application program interface in the monitoring list; if not, step 309 is performed.
And 309, outputting a fault repair failure notification to a user side of the target operation and maintenance personnel to prompt the target operation and maintenance personnel to carry out coping process.
Compared to the embodiment of the application program interface monitoring method shown in fig. 2, in the embodiment of the application program interface monitoring method shown in fig. 3, after the corresponding application program interface is repaired by calling the fault processing script corresponding to the fault type, the method further includes: carrying out subsequent processing steps such as interface availability test and the like on the repaired application program interface; therefore, the repairing effect can be checked in time, namely whether the application program interface is recovered from the fault state to the normal state is judged, and if the application program interface is recovered to the normal state, the next application program interface in the monitoring list is monitored; if the operation state is not recovered to the normal state, a fault repair failure notification can be output to the user side of the target operation and maintenance personnel so as to prompt the target operation and maintenance personnel to carry out the coping process (namely, the manual intervention process is needed at the moment).
Of course, after the corresponding application program interface is repaired by the fault processing script corresponding to the fault type is called, if the application program interface is still not recovered to be in a normal state, after the fault repair failure notification is output to the user side of the target operation and maintenance personnel, the next application program interface in the monitoring list can be monitored without waiting for manual repair, so that timeliness of monitoring of the application program interface is guaranteed.
While the process flows described above include a plurality of operations occurring in a particular order, it should be apparent that the processes may include more or fewer operations, which may be performed sequentially or in parallel (e.g., using a parallel processor or a multi-threaded environment).
Corresponding to the above-mentioned application program interface monitoring method, the embodiment of the present disclosure further provides an application program interface monitoring device, referring to fig. 6, in some embodiments, the application program interface monitoring device may include:
an obtaining module 61, configured to obtain, in real time, a busyness of each application program interface in the service system;
a joining module 62, configured to join, in the service system, an interface name of an application program interface whose busyness degree satisfies a preset condition into a monitoring list;
the monitoring module 63 is configured to perform interface monitoring on the application program interfaces in the monitoring list;
a determining module 64, configured to determine a fault type of the fault when the monitoring finds that the application program interface in the monitoring list has a fault;
a matching module 65, configured to match the fault handling script corresponding to the fault type from a fault knowledge base;
and the calling module 66 is used for calling the fault processing script to repair the corresponding application program interface.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
In the embodiments of the present disclosure, the user information (including, but not limited to, user device information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) are information and data that are authorized by the user and are sufficiently authorized by each party.
Embodiments of the present description also provide a computer device. As shown in fig. 7, in some embodiments of the present description, the computer device 702 may include one or more processors 704, such as one or more Central Processing Units (CPUs) or Graphics Processors (GPUs), each of which may implement one or more hardware threads. The computer device 702 may also include any memory 706 for storing any kind of information, such as code, settings, data, etc., and in a particular embodiment, a computer program on the memory 706 and executable on the processor 704 that, when executed by the processor 704, performs the instructions of the application program interface monitoring method described in any of the embodiments above. For example, and without limitation, the memory 706 may include any one or more of the following combinations: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may store information using any technique. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 702. In one case, the computer device 702 can perform any of the operations of the associated instructions when the processor 704 executes the associated instructions stored in any memory or combination of memories. The computer device 702 also includes one or more drive mechanisms 708, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like, for interacting with any memory.
The computer device 702 may also include an input/output interface 710 (I/O) for receiving various inputs (via an input device 712) and for providing various outputs (via an output device 714). One particular output mechanism may include a presentation device 716 and an associated graphical user interface 718 (GUI). In other embodiments, input/output interface 710 (I/O), input device 712, and output device 714 may not be included as just one computer device in a network. The computer device 702 can also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the above-described components together.
Communication link 722 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the internet), a point-to-point connection, etc., or any combination thereof. Communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name monitoring nodes, etc., governed by any protocol or combination of protocols.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), computer-readable storage media and computer program products according to some embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processor to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processor, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processor to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processor to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computer device. Computer readable media, as defined in the specification, does not include transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description embodiments may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present embodiments may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processors that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
It should also be understood that, in the embodiments of the present specification, the term "and/or" is merely one association relationship describing the association object, meaning that three relationships may exist. For example, a and/or B may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the embodiments of the present specification. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. An application program interface monitoring method, comprising:
acquiring busyness of each application program interface in a business system in real time;
adding interface names of application program interfaces with busyness meeting preset conditions in the business system into a monitoring list;
interface monitoring is carried out on the application program interfaces in the monitoring list;
when the monitoring finds that the application program interface in the monitoring list has faults, determining the fault type of the faults;
matching a fault processing script corresponding to the fault type from a fault knowledge base;
and calling the fault processing script to repair the corresponding application program interface.
2. The application program interface monitoring method according to claim 1, further comprising, after invoking the fault handling script to repair the corresponding application program interface:
performing interface availability test on the repaired application program interface;
and when the repaired application program interface fails the interface availability test, outputting a fault repair failure notification to a user side of a target operation and maintenance person so as to prompt the target operation and maintenance person to carry out coping treatment.
3. The application program interface monitoring method as claimed in claim 1, further comprising:
and when the monitoring of one round is finished, clearing the monitoring list so as to facilitate the monitoring of the next round.
4. The application program interface monitoring method according to claim 1, wherein performing interface monitoring on the application program interfaces in the monitoring list comprises:
matching interface message information in an interface message library according to the interface names in the monitoring list;
and monitoring the target performance index of the corresponding application program interface according to the interface message information.
5. The application program interface monitoring method of claim 1, wherein determining the fault type of the fault comprises:
analyzing the interface error report log corresponding to the fault to obtain error report keywords;
and matching the fault type corresponding to the error reporting keyword from a relation table corresponding to the fault type and the error reporting keyword.
6. The method for monitoring application program interfaces according to claim 1, wherein the step of obtaining the busyness of each application program interface in the service system in real time comprises:
acquiring the interface access quantity of each application program interface in a service system in real time;
acquiring the interface concurrency number of each application program interface in the service system in real time; and/or the number of the groups of groups,
and acquiring the interface access quantity system duty ratio of each application program interface in the service system in real time.
7. The application program interface monitoring method of claim 4, wherein the target performance metrics include any one or more of availability, correctness, response time, availability, failure rate, correctness, average availability, average correctness, average response time, total duration of error, total number of errors, total duration of failure, and total number of failures.
8. An application program interface monitoring device, comprising:
the acquisition module is used for acquiring the busyness of each application program interface in the service system in real time;
the joining module is used for joining the interface names of the application program interfaces with busyness meeting preset conditions in the business system into a monitoring list;
the monitoring module is used for carrying out interface monitoring on the application program interfaces in the monitoring list;
the determining module is used for determining the fault type of the fault when the monitoring finds that the application program interface in the monitoring list has the fault;
the matching module is used for matching the fault processing script corresponding to the fault type from a fault knowledge base;
and the calling module is used for calling the fault processing script to repair the corresponding application program interface.
9. A computer device comprising a memory, a processor, and a computer program stored on the memory, characterized in that the computer program, when being executed by the processor, performs the instructions of the method according to any of claims 1-7.
10. A computer storage medium having stored thereon a computer program, which, when executed by a processor of a computer device, performs the instructions of the method according to any of claims 1-7.
CN202310639461.2A 2023-05-31 2023-05-31 Application program interface monitoring method, device, equipment and storage medium Pending CN116932317A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310639461.2A CN116932317A (en) 2023-05-31 2023-05-31 Application program interface monitoring method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310639461.2A CN116932317A (en) 2023-05-31 2023-05-31 Application program interface monitoring method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116932317A true CN116932317A (en) 2023-10-24

Family

ID=88390296

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310639461.2A Pending CN116932317A (en) 2023-05-31 2023-05-31 Application program interface monitoring method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116932317A (en)

Similar Documents

Publication Publication Date Title
CN108322351B (en) Method and device for generating topological graph and method and device for determining faults
CN105988862B (en) Distributed transaction processing method and device
CN111667267A (en) Block chain transaction risk identification method and device
CN107622060B (en) Order tracking analysis method and device
CN107153646B (en) Data processing method and equipment
CN110347593B (en) Flow testing method and device
CN107832446B (en) Configuration item information searching method and computing device
CA3059719C (en) Payment processing method, device, medium and electronic device
US20230267035A1 (en) System and methods for application failover automation
CN110728498A (en) Information interaction method and device
CN113220540A (en) Service management method, device, computer equipment and storage medium
CN114282011B (en) Knowledge graph construction method and device, and graph calculation method and device
CN112437155B (en) Service data processing method and device and server device
CN112286790B (en) Full link testing method, device, equipment and storage medium
US11120513B2 (en) Capital chain information traceability method, system, server and readable storage medium
CN112561506A (en) Live broadcast data processing method, system, device and medium based on virtual currency
CN109274533B (en) Web service fault positioning device and method based on rule engine
CN116932317A (en) Application program interface monitoring method, device, equipment and storage medium
CN115037653B (en) Service flow monitoring method, device, electronic equipment and storage medium
CN111522680A (en) Method, device and equipment for automatically repairing abnormal task node
CN113869989B (en) Information processing method and device
CN115080449A (en) Test method, device, equipment, medium and program product
CN112711466B (en) Hanging affair inspection method and device, electronic equipment and storage medium
CN114564358A (en) Method, apparatus, device, medium and product for checking compliance of change operations
US11582345B2 (en) Context data management interface for contact center

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