CN114968710A - Unit monitoring method and device based on distributed architecture - Google Patents

Unit monitoring method and device based on distributed architecture Download PDF

Info

Publication number
CN114968710A
CN114968710A CN202210524593.6A CN202210524593A CN114968710A CN 114968710 A CN114968710 A CN 114968710A CN 202210524593 A CN202210524593 A CN 202210524593A CN 114968710 A CN114968710 A CN 114968710A
Authority
CN
China
Prior art keywords
unit
call chain
information
deployment
chain log
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
CN202210524593.6A
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.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202210524593.6A priority Critical patent/CN114968710A/en
Publication of CN114968710A publication Critical patent/CN114968710A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • 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/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/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/02Banking, e.g. interest calculation or account maintenance

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Mathematical Physics (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure relates to the field of distributed architectures, and in particular, to a method and an apparatus for monitoring units based on a distributed architecture. The method comprises the steps of generating a call chain log with deployment group information according to a call relation among the micro services; according to the deployment group information, determining unit information related to the deployment group information from a preset unit deployment relationship; attaching the unit information to the call chain log to generate a call chain log with unit information; and aggregating and calculating the call chain log with the unit information to obtain unit monitoring index data. The invention realizes a real-time monitoring system with units as visual angles, monitors and displays information such as three indexes of each unit through the steps of information acquisition, analysis, source pasting processing, index pre-polymerization calculation and the like of micro-service calling, and displays the health index of each unit by taking the units as granularity so as to provide a basis for the expansion and switching of the units.

Description

Unit monitoring method and device based on distributed architecture
Technical Field
The present disclosure relates to the field of finance, and in particular, to a method and an apparatus for monitoring units based on a distributed architecture.
Background
In the large-scale enterprise business such as banks, a large amount of data and a large amount of transaction requests in daily business put high requirements on business monitoring. At present, a part of business products adopt a 'micro service + unitized' deployment architecture. Under a unitized deployment architecture, service data is divided into a plurality of units, each transaction is routed to a specific unit according to certain customer elements, and service flow needs to be reasonably distributed among the units; in addition, when a failure occurs in a certain cell, cell switching is also required. These "operation and maintenance" operations with units as targets often need to be based on "unit monitoring".
In the prior art, the service monitoring generally uses a product or a product micro service as an object for monitoring, cannot realize the monitoring of a unit as a granularity, and cannot provide a basis for the expansion and switching of the unit.
For the problem that the monitoring of unit granularity cannot be realized in the prior art, a unit monitoring method and a unit monitoring device based on a distributed architecture are needed.
Disclosure of Invention
To solve the above problems in the prior art, embodiments herein provide a method, an apparatus, a computer device, a storage medium, and a computer program product for monitoring a unit based on a distributed architecture.
The embodiment of the invention provides a unit monitoring method based on a distributed architecture, which comprises the following steps: generating a call chain log with deployment group information according to the call relation among the microservices; according to the deployment group information, determining unit information related to the deployment group information from a preset unit deployment relationship; attaching the unit information to the call chain log to generate a call chain log with unit information; and aggregating and calculating the call chain log with the unit information to obtain unit monitoring index data.
According to one aspect of embodiments herein, prior to generating the call chain log with deployment group information, comprising: presetting a unit deployment relationship, wherein the unit deployment relationship comprises a mapping relationship among an application system, a unit, a micro service and a deployment group.
According to an aspect of embodiments herein, the generating a call chain log having deployment group information according to a call relationship between microservices includes: generating an initial call chain log corresponding to each micro service according to the call relation among the micro services; acquiring deployment group information corresponding to each micro-service according to the initial call chain log, wherein the deployment group information comprises a plurality of server instances of each micro-service and a deployment group identifier to which the server instances belong; and pasting the deployment group information to the initial call chain log to generate a call chain log with the deployment group information.
According to one aspect of embodiments herein, the tagging the unit information to the call chain log, the generating the call chain log with unit information comprising: analyzing the call chain log with the deployment group information into structured data; acquiring a deployment group identifier in the deployment group information from the structured data; inquiring the unit deployment relation related to the deployment group identification according to the deployment group identification; and attaching the inquired unit deployment relationship to the analyzed call chain log to generate the call chain log with unit information.
According to an aspect of embodiments herein, aggregating and calculating the call chain log with unit information, obtaining unit monitoring index data includes: dividing the call chain log with the unit information into a plurality of levels according to the deployment relationship in the unit deployment relationship, wherein the levels comprise an application system, a unit and a micro-service; and respectively calculating monitoring indexes corresponding to a plurality of levels in the call chain log with the unit information, wherein the monitoring indexes comprise an application system monitoring index, a unit monitoring index and a micro-service monitoring index.
According to one aspect of embodiments herein, calculating a unit monitoring metric includes: selecting an entrance micro-service from all micro-services corresponding to the unit; and calculating the monitoring index of each unit by using the call chain log of the inlet micro service.
According to one aspect of embodiments herein, the method further comprises: and determining whether to utilize the unit to be switched to carry the task of the fault unit or not according to the monitoring indexes of the fault unit and the unit to be switched.
An embodiment herein provides a unit monitoring apparatus based on a distributed architecture, including: the call chain log generating unit is used for generating a call chain log with deployment group information according to the call relation among the microservices; the unit information determining unit is used for determining unit information related to the deployment group information from a preset unit deployment relationship according to the deployment group information in the call chain log; the new call chain log determining unit is used for attaching the unit information to the call chain log to generate a call chain log with unit information; and the unit monitoring index data determining unit is used for aggregating and calculating the call chain logs with the unit information to obtain unit monitoring index data.
Embodiments herein also provide a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a distributed architecture based unit monitoring method when executing the computer program.
Embodiments herein also provide a computer-readable storage medium storing a computer program which, when executed by a processor, implements a distributed architecture-based unit monitoring method.
A computer program product is also provided herein, comprising a computer program which, when executed by a processor, implements a distributed architecture based unit monitoring method.
The invention realizes a unit monitoring method based on a distributed architecture, which can monitor and display information such as three indexes of success rate, call quantity, average call time consumption and the like of each unit through the steps of micro-service call information acquisition, Tracelog analysis and source pasting processing, index pre-polymerization calculation, index storage, visual display and the like, and display health indexes of each unit by taking the unit as granularity so as to provide basis for the expansion and switching of the unit. And three indexes of each application system and each micro-service under the unit can be drilled down, and the observability of the unit is improved. By calculating and displaying the three indexes of the unit, the operation and maintenance personnel can be helped to sense the health state of each unit in each region and each available area in real time, faults can be found in time, and the operation and maintenance efficiency is improved. When a certain unit fails and prepares to switch units, the flow information of each unit can be checked in real time, whether the switched unit can bear the switched flow or not is known, and a basis is provided for unit switching.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for monitoring units based on a distributed architecture according to an embodiment of the present disclosure;
FIG. 2 is a flowchart illustrating a method for generating a call chain log with deployment group information according to an embodiment of the disclosure;
FIG. 3 is a flowchart illustrating a method for generating a call chain log with unit information according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of a method for obtaining unit monitoring indicator data according to an embodiment herein;
FIG. 5 is a flow chart illustrating a method for calculating a unit monitoring indicator according to an embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram illustrating a unit monitoring apparatus based on a distributed architecture according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram illustrating a specific structure of a unit monitoring apparatus based on a distributed architecture according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram illustrating a unitized deployment relationship according to an embodiment herein;
FIG. 9 is a schematic illustration of an interface display of a unit monitoring indicator according to an embodiment of the disclosure;
fig. 10 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure.
Description of the figures the symbols:
601. a call chain log generating unit;
6011. deploying a group information source module;
602. a unit information determination unit;
603. a new call chain log determining unit;
6031. a deployment group identification acquisition module;
6032. a unitized deployment information query module;
604. a unit monitoring index data determination unit;
6041. an entrance micro-service selection module;
1002. a computer device;
1004. a processor;
1006. a memory;
1008. a drive mechanism;
1010. an input/output module;
1012. an input device;
1014. an output device;
1016. a presentation device;
1018. a graphical user interface;
1020. a network interface;
1022. a communication link;
1024. a communication bus.
Detailed Description
In order to make the technical solutions in the present specification better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments herein without making any creative effort, shall fall within the scope of protection.
It should be noted that the terms "first," "second," and the like in the description and claims herein and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments herein described are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or device.
The present specification provides method steps as described in the examples or flowcharts, but may include more or fewer steps based on routine or non-inventive labor. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual system or apparatus product executes, it can execute sequentially or in parallel according to the method shown in the embodiment or the figures.
It should be noted that the unit monitoring method based on the distributed architecture can be used in the field of distributed technology, and can also be used in other fields besides distributed technology, and the application field of the unit monitoring method based on the distributed architecture and the device thereof is not limited herein.
The unit is taken as a basic unit of system deployment, namely a unitized architecture. A plurality of units are deployed in all computer rooms of a partially usable area of a plurality of places, the number of the units in each computer room is variable, and any one unit deploys all core service applications required by the system. A cell, also called a Data Center Node (DCN), refers to a set that can perform all core service operations, and includes all services required by the core service and Data allocated to the cell. Taking a banking service as an example, one unit is an online virtual branch of a bank, the virtual branch only bears a part of customers of a certain service of the bank, and different data are divided into different units through certain data slicing keys (such as a customer number, an organization number, a service field and the like) and slicing rules (such as segmentation, Hash, randomness, minimum customer volume and the like).
Fig. 1 is a flowchart of a unit monitoring method based on a distributed architecture according to an embodiment of the present disclosure, which specifically includes the following steps:
step 101, generating a call chain log with deployment group information according to the call relation between the micro services. There are a variety of application systems in a distributed service scenario. A service request in an application system may cause a call to occur between multiple microservices. Therefore, the initial call chain log corresponding to each service request can be generated according to the call relation among the micro services. Specifically, the TSF platform acquires the calling relation among the micro services based on the zipkin embedded point. And the calling relation among the microservices is sent to the monitoring platform in the form of a tracelog calling chain log so as to facilitate the further processing of the monitoring platform. This step further includes posting source deployment group information in the call chain log such that the initial call chain log has the deployment group information. The specific steps for generating the call chain log with deployment group information are described in detail in fig. 2.
In some embodiments of the present description, the deployment group performs the logical concept of application bulk deployment for TSFs. A deployment group includes a plurality of application instances, each of which runs the same application program. Before generating the call chain log with the deployment group information, the method further comprises the following steps: presetting a unit deployment relationship, wherein the unit deployment relationship comprises a mapping relationship among an application system, a unit, a micro service and a deployment group. In distributed services, an application system is deployed in multiple units, and multiple application systems are deployed in each unit. The unit and the application system are in a many-to-many relationship. The unit includes multiple microservices, with one microservice deploying multiple instances (i.e., servers or IPs). The micro service is further deployed into a deployment group, where the deployment group is a set of IPs, and may also be understood as a set of multiple servers. Therefore, the mapping relationship among the application systems, the units, the micro-services and the deployment groups can be determined in advance in the form of a unitized deployment relationship.
And 102, determining unit information related to the deployment group information from a preset unit deployment relationship according to the deployment group information. As can be seen from step 101, the unitized deployment information includes the relationship among the application systems, units, microservices, and deployment groups. Further, the unitized deployment information also includes the IP of the application system, the unit, and the microservices associated with the unit or the application system.
Because one micro service corresponds to one deployment group, the unitized deployment information further includes a deployment group identifier, also referred to as a deployment group ID, of the micro service, and the deployment group identifier or the deployment group ID is used for distinguishing different deployment groups. Therefore, the unit information related to the deployment group information can be determined from the unitized deployment relationship according to the deployment group information in the call chain log. The detailed description of the call chain log for generating the e-mail unit information is described in fig. 3.
And 103, attaching the unit information to the call chain log to generate the call chain log with the unit information. Attaching the unit information determined in step 102 to the call chain log, so that the call chain log originally having the deployment group information is added with field information related to the unit. So as to use the call chain log for subsequent processing.
And step 104, aggregating and calculating the call chain logs with the unit information to obtain unit monitoring index data. The call chain log with unit information has a traffic field at the unit level. By aggregating a large number of call chain logs with element information, an element monitoring index at the element level can be calculated. The unit monitoring index data comprises average call time, success rate and call volume of the unit, wherein the call volume is also called transaction volume.
Fig. 2 is a flowchart illustrating a method for generating a call chain log with deployment group information according to an embodiment of the present disclosure, including the following steps:
step 201, according to the calling relationship among the micro services, generating an initial calling chain log corresponding to each micro service. In this step, when the caller sends a server request to the system, a call chain log generated by the call is generated. And acquiring a call chain log of the microservice through a log acquisition tool, wherein the call chain log is an initial call chain log. The initial call chain log records information of the caller and the callee, middleware information, and the like.
Step 202, acquiring deployment group information corresponding to each micro service according to the initial call chain log, wherein the deployment group information comprises a plurality of server instances of each micro service and a deployment group identifier to which the server instances belong. In this step, the initial call chain log includes service instances of the respective microservices of the caller and the callee, that is, IP addresses of the respective microservices. Since one micro service corresponds to a plurality of server instances, one micro service is deployed on one deployment group, which may also be understood as one micro service deployed on all IPs in the deployment group. Further, a deployment group has a unique deployment group identification (or deployment group ID). Therefore, the deployment group information is composed of a plurality of server instances of the micro service and the deployment group identification to which the micro service belongs. For example, there are 5 server instances corresponding to the microservice S1, IP1, IP2, IP3, IP4, IP 5. These 5 server instances form an IP set, i.e. a deployment group, whose deployment group id is: group a is deployed. For another example, microservice S2 has 3 server instances, IP001, IP002, and IP003, respectively. These 3 server instances form an IP set, i.e. a deployment group, whose deployment group identifier is: group B is deployed.
Step 203, attaching the deployment group information to the initial call chain log, and generating a call chain log with deployment group information. And pasting the deployment group information in the step 202 into the initial call chain log, so that the initial call chain log has the deployment group information. Specifically, the TSF platform posts the deployment group information to the initial call chain log, and then pushes the call chain log with the deployment group information to the kafka of the monitoring platform.
Fig. 3 is a flowchart illustrating a method for generating a call chain log with unit information according to an embodiment of the present disclosure, including the following steps:
step 301, parsing the call chain log with deployment group information into structured data. In the step, the call chain log with the deployment group information is analyzed, and a complete call chain log code is analyzed into a plurality of structured data. The structured data contains fields of different dimensions of the deployment group, and the fields comprise: the method comprises the following steps of calling, called, log collection time, an application system to which the micro-service belongs, a region to which the log belongs, an available region to which the log belongs, a deployment group identifier, a server instance contained in the deployment group and other structured fields.
Step 302, obtaining the deployment group identifier in the deployment group information from the structured data. And acquiring the data of the deployment group identification from the analyzed various structured data. For example, the call chain logs of the microservice S1 and the microservice S2 with deployment group information are analyzed, and the deployment group identifiers corresponding to the microservice S1 and the microservice S2 are acquired from the analyzed structured data and are respectively a deployment group a and a deployment group B.
Step 303, querying the unitized deployment relationship related to the deployment group identifier according to the deployment group identifier. The deployment group identifier is obtained from the call chain log with the deployment group information in step 302, and the unit deployment information related to the deployment group identifier is further queried from the unit deployment relationship according to the deployment group identifier. As described above, the deployment mapping relationship of the application system, the unit, the micro service, and the deployment group is recorded in the unitized deployment information. For example, unit 1 of a certain computer room in a certain area corresponds to three application systems, namely application system a, application system b and application system c. Wherein, the application system A has 3 micro-services A, B, C respectively; the application system B respectively corresponds to the micro-services D and E; the application systems C respectively correspond to the application systems F and G. The micro service A is provided with 3 corresponding IPs and belongs to a deployment group 1; the micro service B corresponds to 2 IPs and belongs to a deployment group 2; the micro service C corresponds to 4 IPs and belongs to a deployment group 3, and the micro service D, E respectively corresponds to 3 IPs and belongs to a deployment group 4 and a deployment group 5; the micro service F corresponds to 2 IPs and belongs to a deployment group 6, and the micro service G corresponds to 5 IPs and belongs to a deployment group 7. Therefore, the relation among the application system A, the application system B, the micro-service and the deployment group corresponding to the unit can be obtained.
And 304, attaching the queried unitized deployment relationship to the analyzed call chain log to generate the call chain log with the unit information. And pasting the relation among the units, the application systems, the micro services and the deployment groups in the unitized deployment information into the call chain log with the deployment group information so that the call chain log has the unit information.
Fig. 4 is a flowchart of a method for obtaining unit monitoring index data according to an embodiment of the present disclosure, including the following steps:
step 401, according to the deployment relationship in the unit deployment relationship, dividing the call chain log with unit information into a plurality of levels, where the levels include an application system, a unit, and a microservice. In this step, the current call chain log includes information of which deployment group the micro-service belongs to, which application system the deployment group belongs to, and which unit the application system corresponds to. Therefore, the call chain log with unit information currently has three levels of information of an application system, a unit and a microservice.
Step 402, respectively calculating monitoring indexes corresponding to multiple levels in the call chain log with the unit information, wherein the monitoring indexes comprise application system monitoring indexes, unit monitoring indexes and micro-service monitoring indexes. In this step, the monitoring index of the microservice can be calculated according to a large number of call logs. The monitoring indexes of the micro service include: the transaction amount/call amount of the micro-service in a period of time, the transaction success rate of the micro-service in the same period of time and the transaction average response time of the micro-service in the same period of time.
Therefore, according to the call chain log with the unit information corresponding to the micro-service belonging to the same unit, the monitoring index of the unit can be calculated, wherein the monitoring index comprises the call quantity of the unit in a period of time, the transaction success rate of the unit in the same period of time and the average call time consumption of the unit in the same period of time. Specifically, the call volume of a unit in a period of time may be understood as the sum of the transaction volume/call volume of a plurality of micro services corresponding to the unit in the same period of time. Then the call volume of the application system corresponding to the plurality of units is: and the sum of the call volumes of a plurality of units corresponding to the application system in the same time period. For example, cell 1 has microservice a and microservice B. According to the call chain logs of the microservices A and B, the call volumes of the microservices A and B in 1 minute can be calculated to be 10 and 20 respectively. The calling amount of the unit 1 in 1 minute is the sum of the calling amounts of the micro service A and the micro service B, and is 30. Correspondingly, the unit calls 30 in a period of time.
Fig. 5 is a flowchart of a method for calculating a unit monitoring index according to an embodiment of the present disclosure, including the following steps:
step 501, selecting an entry micro-service from all micro-services corresponding to the cell. In this step, each cell corresponds to at least one microservice. When a micro-service belonging to a certain unit calls a micro-service belonging to another different unit, the calling micro-service and the called micro-service recorded in the call chain log of the micro-service corresponding to each unit belong to different units. The portal microservice may be understood as: the microservice at the entrance in each cell, i.e., the first microservice of each cell.
For example, cell 1 has microservice S1 and microservice S2 under it. Under cell 2 there is microservice S3 and microservice S4. The microservice S1 calls the microservice S2, the microservice S2 calls the microservice S3, the microservice S3 calls the microservice S4, and 4 microservices sequentially form a call chain relationship. Here, microservice 2 in cell 1 is the caller of microservice 3, and microservice S3 in cell 2 is the callee. Since microservice 2 and microservice 3 belong to different cells, microservice S1 is the ingress microservice for cell 1 and S3 is the ingress microservice for cell 2.
And 502, calculating the monitoring index of each unit by using the call chain log of the portal microservice. In this step, the cell interior corresponds to a plurality of microservices, and each microservice records information of the caller microservice and the callee microservice. If the monitoring index of a certain unit is calculated by using the call chain logs of all the microservices in the unit, the monitoring index of the unit is repeatedly calculated.
For example, cell 2 corresponds to microservice S3 and microservice S4. The information recorded by the call chain log of the microservice S3 is: the caller is micro service S2, the unit to which the caller belongs is Unit 1, the callee is micro service S3, and the unit to which the callee belongs is Unit 2. And the information recorded by the call chain log of the microservice S4 is: the caller is micro service S3, the cell to which the caller belongs is cell 2, the callee is micro service S4, and the cell to which the callee belongs is cell 2. Then microservice S3 is the entry microservice for unit 1 when computing the monitoring index for unit 2. Since the call chain log of the microservice S3 has different units to which the caller and callee belong, the monitoring index of the unit can be calculated using the call chain log information of the microservice S3. Since the cells of the caller and the callee in the call chain log of the microservice S4 are the same, if the monitoring index of the cell is calculated using the call chain log of the microservice S4, the cell monitoring index is repeatedly calculated. Based on this, the monitoring index of the unit is calculated by using the call chain log of the portal microservice. When the unit to which the caller belongs is different from the unit to which the callee belongs, the call chain log of the entry microservice is used for calculating the number of times of unit calls of the callee, and the average call time of the unit.
In some embodiments of the present specification, the method further includes determining whether to utilize the unit to be switched to carry over the task of the faulty unit according to monitoring indexes of the faulty unit and the unit to be switched. Wherein, unit switching refers to rerouting the access request of the user from one unit to another unit. For example, if a failure occurs in the unit a, the access traffic of the unit a needs to be switched to the unit B. Before switching the access flow of the unit A to the unit B, whether the indexes such as the call times per minute of the unit B exceed the alarm threshold value or not needs to be further judged through the monitoring indexes of the unit B, so that an alarm is generated. And if the monitoring index of the unit B gives an alarm, stopping switching the unit A to the unit B. And whether the switched unit can bear the switched flow or not is known, and a basis is provided for unit switching. In addition, when the access traffic of the unit a is switched to the unit B, it can be observed whether the call volume of the unit B increases and whether the call volume of the unit a gradually decreases to 0.
Fig. 6 is a schematic structural diagram of a unit monitoring apparatus based on a distributed architecture according to an embodiment of the present disclosure, and in this diagram, a basic structure of the unit monitoring apparatus based on the distributed architecture is described, where functional units and modules may be implemented in a software manner, or implemented by using a general chip or a specific chip, so as to implement unit monitoring based on the distributed architecture, where the apparatus specifically includes:
a call chain log generating unit 601, configured to generate a call chain log with deployment group information according to a call relationship between microservices;
a unit information determining unit 602, configured to determine, according to deployment group information in the call chain log, unit information related to the deployment group information from a preset unitized deployment relationship;
a new call chain log determining unit 603, configured to attach the unit information to the call chain log, and generate a call chain log with unit information;
and a unit monitoring index data determining unit 604, configured to aggregate and calculate the call chain log with the unit information, so as to obtain unit monitoring index data.
The invention realizes a real-time monitoring system with units as visual angles, can monitor and display information such as three indexes of success rate, call quantity, average call time consumption and the like of each unit through the steps of micro-service call information acquisition, Tracelog analysis and source pasting processing, index pre-polymerization calculation, index storage, visual display and the like, and displays the health degree index of each unit with the units as granularity so as to provide a basis for the expansion and switching of the units. And three indexes of each application system and each micro-service under the unit can be drilled down, and the observability of the unit is improved. By calculating and displaying the three indexes of the unit, the operation and maintenance personnel can be helped to sense the health state of each unit in each region and each available area in real time, faults can be found in time, and the operation and maintenance efficiency is improved. When a certain unit fails to prepare for unit switching, the flow information of each unit can be checked in real time, whether the switched unit can bear the switched flow or not is known, and a basis is provided for unit switching.
As an embodiment herein, refer to a schematic structural diagram of a unit monitoring apparatus based on a distributed architecture in this embodiment as shown in fig. 7.
As an embodiment herein, the call chain log generating unit 601 further includes: a deployment group information posting source module 6011, configured to source the deployment group information posting source to the initial call chain log, and generate a call chain log with deployment group information;
as an embodiment herein, the new call chain log determining unit 603 further includes:
a deployment group identifier obtaining module 6031, configured to obtain a deployment group identifier in the deployment group information from the structured data;
a unitized deployment information query module 6032, configured to query, according to the deployment group identifier, a unitized deployment relationship related to the deployment group identifier;
as an embodiment herein, the unit monitoring index data determining unit 604 further comprises:
an entry micro-service selection module 6041, configured to select an entry micro-service from all micro-services corresponding to the cell.
Fig. 8 is a schematic diagram illustrating a unitized deployment relationship according to an embodiment of the present disclosure. The figure shows the distribution of units in a certain available area machine room in area A, including unit 1 to unit N. The application systems deployed under the units may be the same or partially or totally different. A plurality of micro-services are deployed under each application system. The number and the type of the micro-services deployed under each application system may be the same or different. The method comprises the steps that when the micro services A-1 to A-N are distributed under an application system A, the micro services A-N are distributed; and micro-services B-1 to B-N and the like are deployed under the application system B.
Fig. 9 is a schematic view of an interface display of a unit monitoring indicator according to an embodiment of the present disclosure. The unit indexes of a certain available area 1 machine room and an available area 2 machine room in area a are shown in the figure. Each available area respectively displays unit identifiers (namely unit names) of 6 different units and monitoring indexes corresponding to the units, including success rate, average call time consumption and call quantity.
Fig. 10 is a diagram illustrating a computer device provided in an embodiment of the present disclosure. The unit monitoring method based on the distributed architecture is applied to the computer equipment. The computer device 1002 may include one or more processors 1004, such as one or more Central Processing Units (CPUs), each of which may implement one or more hardware threads. The computer device 1002 may also include any memory 1006 for storing any kind of information, such as code, settings, data, etc. For example, and without limitation, the memory 1006 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 1002. In one case, when the processor 1004 executes the associated instructions, which are stored in any memory or combination of memories, the computer device 1002 can perform any of the operations of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 808, such as a hard disk drive mechanism, an optical disk drive mechanism, etc., for interacting with any memory.
Computer device 1002 may also include an input/output module 1010(I/O) for receiving various inputs (via input device 1012) and for providing various outputs (via output device 1014). One particular output mechanism may include a presentation device 1016 and an associated Graphical User Interface (GUI) 1018. In other embodiments, input/output module 1010(I/O), input device 1012, and output device 1014 may also be excluded, as only one computer device in a network. Computer device 1002 can also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the above-described components together.
Communication link 1022 may be implemented in any manner, such as over a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. Communications link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
Corresponding to the methods in fig. 1 to 5, the embodiments herein also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the above-described method.
Embodiments herein also provide computer readable instructions, wherein when executed by a processor, a program thereof causes the processor to perform the method as shown in fig. 1-5.
Embodiments herein also provide a computer program product comprising a computer program which, when executed by a processor, implements the method as shown in fig. 1 to 5.
It should be understood that, in various embodiments herein, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments herein.
It should also be understood that, in the embodiments herein, the term "and/or" is only one kind of association relation describing an associated object, meaning that three kinds of relations may exist. For example, a and/or B, may represent: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided herein, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may also be an electric, mechanical or other form of connection.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments herein.
In addition, functional units in the embodiments herein may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present invention may be implemented in a form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The principles and embodiments of this document are explained herein using specific examples, which are presented only to aid in understanding the methods and their core concepts; meanwhile, for the general technical personnel in the field, according to the idea of this document, there may be changes in the concrete implementation and the application scope, in summary, this description should not be understood as the limitation of this document.

Claims (11)

1. A unit monitoring method based on a distributed architecture is characterized by comprising the following steps:
generating a call chain log with deployment group information according to the call relation among the microservices;
according to the deployment group information, determining unit information related to the deployment group information from a preset unit deployment relationship;
attaching the unit information to the call chain log to generate a call chain log with unit information;
and aggregating and calculating the call chain log with the unit information to obtain unit monitoring index data.
2. The method for monitoring the units based on the distributed architecture according to claim 1, before generating the call chain log with the deployment group information, comprising:
presetting a unit deployment relationship, wherein the unit deployment relationship comprises a mapping relationship among an application system, a unit, a micro service and a deployment group.
3. The method for monitoring units based on the distributed architecture according to claim 2, wherein the generating a call chain log with deployment group information according to the call relationship between the microservices comprises:
generating an initial call chain log corresponding to each micro service according to the call relation among the micro services;
acquiring deployment group information corresponding to each micro-service according to the initial call chain log, wherein the deployment group information comprises a plurality of server instances of each micro-service and a deployment group identifier to which the server instances belong;
and pasting the deployment group information to the initial call chain log to generate a call chain log with the deployment group information.
4. The method of claim 1, wherein the attaching the unit information to the call chain log, and the generating the call chain log with the unit information comprises:
analyzing the call chain log with the deployment group information into structured data;
acquiring a deployment group identifier in the deployment group information from the structured data;
inquiring the unit deployment relation related to the deployment group identification according to the deployment group identification;
and attaching the inquired unit deployment relationship to the analyzed call chain log to generate the call chain log with the unit information.
5. The method according to claim 1, wherein aggregating and calculating the call chain log with unit information to obtain unit monitoring index data comprises:
dividing the call chain log with the unit information into a plurality of levels according to the deployment relationship in the unit deployment relationship, wherein the levels comprise an application system, a unit and a micro-service;
and respectively calculating monitoring indexes corresponding to a plurality of levels in the call chain log with the unit information, wherein the monitoring indexes comprise an application system monitoring index, a unit monitoring index and a micro-service monitoring index.
6. The distributed architecture-based unit monitoring method of claim 5, wherein calculating a unit monitoring metric comprises:
selecting an entrance micro-service from all micro-services corresponding to the unit;
and calculating the monitoring index of each unit by using the call chain log of the inlet micro service.
7. The method of distributed architecture based unit monitoring according to claim 1, the method further comprising:
and determining whether to utilize the unit to be switched to carry the task of the fault unit or not according to the monitoring indexes of the fault unit and the unit to be switched.
8. A unit monitoring apparatus based on a distributed architecture, comprising:
the call chain log generating unit is used for generating a call chain log with deployment group information according to the call relation among the microservices;
the unit information determining unit is used for determining unit information related to the deployment group information from a preset unit deployment relationship according to the deployment group information;
the new call chain log determining unit is used for attaching the unit information to the call chain log to generate a call chain log with unit information;
and the unit monitoring index data determining unit is used for aggregating and calculating the call chain logs with the unit information to obtain unit monitoring index data.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 7.
11. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN202210524593.6A 2022-05-13 2022-05-13 Unit monitoring method and device based on distributed architecture Pending CN114968710A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210524593.6A CN114968710A (en) 2022-05-13 2022-05-13 Unit monitoring method and device based on distributed architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210524593.6A CN114968710A (en) 2022-05-13 2022-05-13 Unit monitoring method and device based on distributed architecture

Publications (1)

Publication Number Publication Date
CN114968710A true CN114968710A (en) 2022-08-30

Family

ID=82984206

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210524593.6A Pending CN114968710A (en) 2022-05-13 2022-05-13 Unit monitoring method and device based on distributed architecture

Country Status (1)

Country Link
CN (1) CN114968710A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115733733A (en) * 2022-11-16 2023-03-03 中国工商银行股份有限公司 Monitoring alarm method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115733733A (en) * 2022-11-16 2023-03-03 中国工商银行股份有限公司 Monitoring alarm method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US9369521B2 (en) Naming of distributed business transactions
US10116534B2 (en) Systems and methods for WebSphere MQ performance metrics analysis
CN108833184A (en) Service fault localization method, device, computer equipment and storage medium
CN101707632A (en) Method for dynamically monitoring performance of server cluster and alarming real-timely
US8141151B2 (en) Non-intrusive monitoring of services in a service-oriented architecture
CN107133231B (en) Data acquisition method and device
CN113536054A (en) Business monitoring method, device, equipment and storage medium based on graph data
CN111400189A (en) Code coverage rate monitoring method and device, electronic equipment and storage medium
CN114172949A (en) Micro-service link monitoring and tracking method and system
CN114745295A (en) Data acquisition method, device, equipment and readable storage medium
CN114968710A (en) Unit monitoring method and device based on distributed architecture
CN115812298A (en) Block chain management of supply failure
US8850321B2 (en) Cross-domain business service management
CN108632086A (en) A kind of concurrent job operation troubles localization method
CN114706827A (en) Automatic generation method and device for transaction link topology
CN110083512A (en) The method and device of cluster monitoring
CN109818808A (en) Method for diagnosing faults, device and electronic equipment
CN113760634A (en) Data processing method and device
CN111158979A (en) Service dial testing method, system, device and storage medium
CN112764992B (en) Thread pool monitoring method, device and equipment
CN110928750A (en) Data processing method, device and equipment
CN110994796B (en) Power dispatching operation panoramic visualization device and method
CN114385498A (en) Performance test method, system, computer equipment and readable storage medium
CN113688012A (en) Call chain monitoring system and method
CN113419852A (en) Request response method, device, equipment and storage medium of microservice

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