CN113778985A - Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium - Google Patents

Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium Download PDF

Info

Publication number
CN113778985A
CN113778985A CN202110952969.9A CN202110952969A CN113778985A CN 113778985 A CN113778985 A CN 113778985A CN 202110952969 A CN202110952969 A CN 202110952969A CN 113778985 A CN113778985 A CN 113778985A
Authority
CN
China
Prior art keywords
node
micro
information
service
micro service
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
CN202110952969.9A
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.)
Dongpu Software Co Ltd
Original Assignee
Dongpu Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dongpu Software Co Ltd filed Critical Dongpu Software Co Ltd
Priority to CN202110952969.9A priority Critical patent/CN113778985A/en
Publication of CN113778985A publication Critical patent/CN113778985A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2462Approximate or statistical queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of pedestal operation and maintenance, and discloses a micro-service architecture monitoring method, a micro-service architecture monitoring device, computer equipment and a storage medium. The method comprises the steps of obtaining the calculation element version information and the node configuration information of a database; returning data to a database according to the computation element version information and the node configuration information; sending a request to a registration center to acquire the running state of a node; judging whether an abnormal condition exists at present according to the computational element version information, the node configuration information, the node list and the running state of each node, if so, triggering and executing an alarm, displaying detailed alarm information and outputting alarm information corresponding to the dimension information. The method realizes the regular updating and gives the grading alarm according to the difference of the functions and the operating conditions of the micro-service application in the system. The abnormal state can be timely fed back to maintenance personnel, so that the micro-service abnormal state is timely processed, and the user experience is improved.

Description

Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of pedestal operation and maintenance, in particular to a micro-service architecture monitoring method, a micro-service architecture monitoring device, computer equipment and a storage medium.
Background
The micro-service architecture is an architecture style and a design mode, advocates to divide the application into a series of small services, each service is concentrated on a single service function, operates in an independent process, the boundaries between the services are clear, and a lightweight communication mechanism is adopted to realize complete application by mutual communication and cooperation, so that the requirements of services and users are met. The application micro-service architecture can completely modularize and servitize a business system, the micro-service is concentrated on business logic, the service function is simple, the boundary is clear, the complexity is low, the interface is clear, and the application development and deployment are facilitated. Meanwhile, each service is independently expanded and freely stretched, the deployment scale of each service can be dynamically adjusted in real time according to actual business requirements, different instances of the same service are quickly started to meet burst flow or calculated amount, each service has a clear boundary and is not limited by programming languages and databases. And searching an available service instance by querying the service registry, logging out when the service is closed, and simultaneously, operating configuration files in each service are also managed by the Nacos in a centralized way, and the configured modification history can be tracked. The service calling is realized by adopting Spring Cloud Feign and is mainly responsible for defining and realizing the calling depending on the service interface. In the service development, only one interface needs to be created and configured in an annotation mode, the interface binding of the service provider can be completed, and the development amount is simplified.
With the development of business, more and more enterprises adopt micro-service architectures to develop application systems, but if a problem occurs in a certain micro-service, some corresponding specific detailed functions are affected, the overall function is not easy to find, and although the influence caused by service faults is reduced on the surface, the difficulty and the period for finding the problem are increased, so that how to effectively perform health monitoring on the micro-services is a technical problem which needs to be solved at present.
Disclosure of Invention
In view of the above, it is necessary to provide a method and an apparatus for monitoring a micro service architecture, a computer device, and a storage medium for solving the technical problems that the number of micro service applications in a micro service system is large and it is difficult to know the operating states of all the micro service applications in real time.
A monitoring method of a micro-service architecture comprises the steps of obtaining the calculation element version information and the node configuration information of a database; returning data to a database according to the computation element version information and the node configuration information; sending a request to a registration center to acquire the running state of a node; returning a node list and the running state of each node to a health monitoring center of the micro service system according to the running state of the nodes; judging whether an abnormal condition exists at present according to the computing element version information, the node configuration information, the node list and the running state of each node; and if the abnormal condition exists, triggering and executing the alarm and displaying detailed alarm information.
In one embodiment, the determining whether an abnormal condition exists currently according to the operand version information, the node configuration information, the node list, and the operating state of each node includes: if the number of the nodes with the healthy running state of one computing element is less than two, judging the nodes to be abnormal; acquiring an operation log from an automation deployment component Jenkins; and checking the running log when the running state of the node is abnormal.
In one embodiment, after triggering execution of the alarm and displaying detailed alarm information if an abnormal condition exists, the method further includes: acquiring the running condition of the node, and returning the node state and the statistical data; acquiring a background log of the node, and returning log data; and displaying the node state, the statistical data and the log data.
In one embodiment, after triggering execution of the alarm and displaying detailed alarm information if an abnormal condition exists, the method further includes: acquiring a micro-service list, wherein the micro-service list comprises all currently available micro-services and index information;
judging whether the current micro service instance number contained in the micro service list is inconsistent with the preset micro service instance number or not according to the preset micro service instance number and the micro service list; if the micro service list does not include the micro service to be monitored, judging the micro service list to be abnormal; and if the number of the current micro service instances contained in the micro service list is less than the number of the micro service instances of the preset configuration, judging that the micro service list is abnormal.
In one embodiment, the determining that the condition is abnormal further includes: the IP address of the domain name mapping is switched to the IP of the k8s platform.
In one embodiment, the determining that the condition is abnormal further includes: acquiring a micro-service list to obtain index information returned by each micro-service, wherein the index information comprises request quantity, concurrency number, throughput rate, response time, average response time and 99% response time; determining dimension information of the index information, wherein the dimension information comprises a data access dimension, a data processing dimension and a data output dimension; and outputting alarm information corresponding to the dimension information when the monitoring result is judged to be abnormal.
A microservice architecture monitoring device, the microservice architecture monitoring device comprising: the acquisition module is used for acquiring the calculation element version information and the node configuration information of the database; the data returning module is used for returning data to a database according to the computational element version information and the node configuration information; the request module is used for sending a request to the registration center to acquire the running state of the node; the return module is used for returning the node list and the running state of each node to the micro service system health monitoring center according to the running state of the node; the judging module is used for judging whether an abnormal condition exists at present according to the computing element version information, the node configuration information, the node list and the running state of each node; and the triggering module is used for triggering and executing the alarm and displaying detailed alarm information if the abnormal condition exists.
In one embodiment, the determining module further includes: the judgment submodule is used for judging that the number of the nodes with the healthy running state of one computational element is less than two, and the abnormal situation is judged; the acquisition submodule is used for acquiring the running log from the automation deployment component Jenkins; and the viewing submodule is used for viewing the running log when the running state of the node is abnormal.
A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the above-described microservice architecture monitoring method.
A storage medium having stored thereon computer-readable instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of the above-described microservice architecture monitoring method.
According to the micro-service architecture monitoring method, the micro-service architecture monitoring device, the computer equipment and the storage medium, the calculation element version information and the node configuration information of the database are obtained; returning data to a database according to the computation element version information and the node configuration information; sending a request to a registration center to acquire the running state of a node; returning a node list and the running state of each node to a health monitoring center of the micro service system according to the running state of the nodes; judging whether abnormal conditions exist at present according to the version information and the node configuration information of the computational elements, the node list and the running state of each node, if the number of the nodes with healthy running state of one computational element is less than two, triggering to execute alarm and displaying detailed alarm information if the abnormal conditions exist, further obtaining a micro-service list, and obtaining index information returned by each micro-service, wherein the index information comprises request amount, concurrency number, throughput rate, response time, average response time and 99% response time; determining dimension information of the index information, wherein the dimension information comprises a data access dimension, a data processing dimension and a data output dimension; and outputting alarm information corresponding to the dimension information when the monitoring result is judged to be abnormal. The health monitoring is realized to master the operation general situation of the whole micro-service system, the monitoring condition is updated at regular time, and the grading alarm is given according to the different functions and operation conditions of the micro-service application in the system. When only one node of the micro service application runs and the cluster is not formed, the state of the micro service application is warning, and when all the nodes in the micro service system run normally, the health conditions of the micro service application and the micro service system are normal. The abnormal state can be timely fed back to maintenance personnel, so that the micro-service abnormal state is timely processed, and the user experience is improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention.
FIG. 1 is a diagram of a microservice architecture monitoring method according to an embodiment of the present invention;
FIG. 2 is a diagram of a microservice architecture monitoring method according to an embodiment of the present invention;
FIG. 3 is a diagram of a microservice architecture monitoring method according to an embodiment of the present invention;
FIG. 4 is a diagram of an embodiment of a microservice architecture monitor device in accordance with the present invention;
fig. 5 is a schematic diagram of an embodiment of a determining module in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" include plural referents unless the context clearly dictates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
As shown in fig. 1, in an embodiment, a micro service architecture monitoring method is provided, which includes the following steps:
step 101, obtaining the calculation element version information and the node configuration information of a database;
microservice architectures are becoming more widely used. The micro-service architecture is split into a plurality of services which can be independently developed, designed, operated and maintained, each service can be independently deployed and isolated from each other, and the services are called through Application Programming Interfaces (APIs). And the user is served by calling between services, so that the requirements of the user are met. In a business service system built based on a micro-service architecture, a plurality of micro-services are usually required to be mutually matched to complete business services. In order to obtain the health state of each microservice and determine whether the service is stable and reliable, the network state of each microservice needs to be monitored. In the microservice architecture, the registry is one of the basic services of the core.
The health monitoring is realized to master the operation profile of the whole micro-service system, the monitoring condition is updated at regular time, and the grading alarm is given according to the difference of the action and the operation condition of the micro-service application in the system, for example, the micro-service application of the basic information of an express sender and a receiver is the micro-service application which must be deployed in the system, and when the micro-service application is stopped, the health conditions of the micro-service application and the micro-service system are both wrong. When only one node of the micro service application runs and the cluster is not formed, the state of the micro service application is warning, and when all the nodes in the micro service system run normally, the health conditions of the micro service application and the micro service system are normal. The abnormal state can be timely fed back to maintenance personnel, so that the micro-service abnormal state is timely processed, and the user experience is improved.
The micro-service system health monitoring center (module) acquires the calculation element version information and the node configuration information of the database. Metadata (metadata) is most commonly defined as "structural data about data", or simply "information about data", and legends, library directory cards, business cards, and the like in daily life can be regarded as metadata. In a relational database management system (DBMS), metadata describes the structure and meaning of data. For example, when managing and maintaining SQL Server or developing database application, we often need to obtain some information related to the database architecture: the number and name of tables and views in a database; the number of columns in a certain table or view, and the name, data type, length, precision, description, etc. of each column; constraints defined on a certain table; an index defined on a certain table and information of primary/foreign keys. The method for obtaining the metadata comprises the steps of obtaining the metadata, and using a system storage process and a system function to access the metadata, wherein the most common method for obtaining the metadata is to use the system storage process and the system function provided by SQL Server. The system storage process and the system function provide an abstraction layer between the system table and the metadata, so that the metadata of the current database object can be obtained without directly querying the system table. After the user logs in the server of the application program through the user name and the password, the user can send a data acquisition request to the server of the application program, the server can send corresponding data to the terminal device, and the terminal device can display the data. In addition, in order to perform information prompt on each information prompt node, the terminal device may search, through the user identifier, corresponding node configuration information in the node configuration information pre-stored in the server, and may pull the searched node configuration information from the server to the terminal device through a preset program interface (such as an RPC interface).
102, returning data to a database according to the computation element version information and the node configuration information;
and the micro-service system health monitoring center returns data to the database according to the calculation element version information and the node configuration information.
Step 103, sending a request to a registry to acquire the running state of the node;
the micro-service system health monitoring center sends a request to the registration center to acquire the running state of the node.
104, returning a node list and the running state of each node to the health monitoring center of the micro service system according to the running state of the nodes;
and according to the node running state, the registration center returns the node list and the running state of each node to the micro service system health monitoring center.
105, judging whether an abnormal condition exists at present according to the computation element version information, the node configuration information, the node list and the running state of each node;
and the micro-service system health monitoring center judges whether an abnormal condition exists at present according to the version information of the computational element, the node configuration information, the node list and the running state of each node. .
And step 106, if an abnormal condition exists, triggering and executing the alarm and displaying detailed alarm information.
If the abnormal condition exists, the micro service system health monitoring center triggers and executes the alarm and displays the detailed alarm information to the operation and maintenance personnel.
In one embodiment, as shown in fig. 2, determining whether there is an abnormal condition currently according to the operand version information, the node configuration information, the node list, and the running state of each node includes:
step 201, if the number of nodes with healthy running state of one computational element is less than two, judging the abnormal condition;
the micro-service architecture has a large quantity of projects, if the micro-service system is started and upgraded by using the traditional manual packing, packet sending and shutdown upgrading method, the workload of deployment is large and hard to imagine, and the user experience is poor due to long-time shutdown when the system is upgraded. The micro-service architecture has a large number of projects, in order to ensure the healthy operation of the micro-service system to realize continuous integrated deployment, the micro-service architecture system integrates Jenkins to realize automatic testing, continuous integration and continuous delivery, supports one-key packaging starting of the micro-service application, observes the operating conditions of all the micro-service applications in the system in real time, is provided with a one-key testing function to confirm whether the micro-service application is successfully started, and can help operation and maintenance personnel to perform fault troubleshooting on the micro-service application which is failed to start, supports rolling upgrading, is simple and easy to operate in the upgrading process, and ensures the safety and effectiveness of the upgrading result.
Step 202, acquiring an operation log from an automation deployment component Jenkins;
the micro-service architecture system judges the health condition of the system according to a check rule, for example, each computational element needs to adopt a cluster deployment mode to ensure high availability during operation, namely, nodes deployed by each computational element are more than or equal to two, the micro-service architecture system sends a request to the registration center to acquire the running state of the nodes, if the number of the nodes with the running state of one computational element being healthy is less than two, the abnormal condition is judged, the running log of the node is checked when the running state of the node is wrong, and the log is acquired from an automatic deployment component Jenkins.
And step 203, checking the running log when the running state of the node is abnormal.
Jenkins is an open source software project, is a continuous integration tool developed based on Java, is used for monitoring continuous and repeated work, and aims to provide an open and easy-to-use software platform to enable continuous integration of software. Jenkins is a powerful application that allows for continuous integration and continuous delivery of items, regardless of the platform used. This is a free source code that can handle any type of build or persistent integration. Integrated Jenkins can be used for some testing and deployment technologies. Jenkins is a software that allows for continued integration. Jenkins is installed on a service where also central construction takes place. Jenkins is an extensible persistent integration engine. For continuously, automatically building/testing a software project; some tasks that are performed regularly are monitored.
In an embodiment, as shown in fig. 3, if there is an abnormal condition, after triggering execution of an alarm and displaying detailed alarm information, the method further includes:
step 301, acquiring a node running condition, and returning a node state and statistical data;
step 302, acquiring a node background log and returning log data;
step 303, displaying the node state, the statistical data and the log data.
The micro-service system sets a timing task, for example, a request is sent to a component EUREKA in the Spring Cloud set every minute to acquire node operation data, cache data of the node operation state is put into Redis, and when operation and maintenance personnel refresh the node operation state, node health state data is acquired from the Redis.
In one embodiment, if there is an abnormal condition, after triggering execution of an alarm and displaying detailed alarm information, the method further includes:
step 401, acquiring a micro service list, wherein the micro service list comprises all currently available micro services and index information;
in the microservice architecture, the registry is one of the most central basic services. The registry essentially decouples the service provider and the service caller, and mainly involves three roles: service provider, service consumer, registry. Nacos is an abbreviation for Dynamic Naming and Configuration Service, and Chinese means a Dynamic Naming and Configuration Service, which is a registry + Configuration center of an Alice open source. The Nacos serves as a registration center and can support the service number of 10W, the example registration number of 110W, and the cluster operation is stable continuously. By adopting 4C 32G five server cluster deployment, the possibility that 2 instances are hung up at most does not influence the cluster availability is achieved.
Step 402, judging whether the current micro service instance number contained in the micro service list is inconsistent with the micro service instance number of the preset configuration according to the micro service instance number of the preset configuration and the micro service list;
a set of Nacos clusters are respectively deployed in the K8s environment and the virtual machine environment, and 5 instances are respectively deployed. And starting the Nacos Sync synchronization service to synchronize the service lists and the instance lists on the two sides, and keeping the number of the services on the two sides consistent with that of the instances. And adding a monitoring task to the micro-service administration platform, regularly monitoring whether the service number registered by the Nacos cluster in the virtual machine environment and the k8s environment is consistent with the instance number, and alarming if the service number is inconsistent with the instance number.
Step 403, if the micro service list does not include the micro service to be monitored, determining that the micro service list is abnormal;
the synchronization process realizes full automation, and avoids service information omission caused by manual operation. The service is registered to the virtual machine environment cluster through the domain name, if the Nacos cluster of the virtual machine environment is abnormal, only the ip mapped by the domain name is required to be modified to the ip of the k8s environment by contacting a network group, and the service is switched without sensing.
In step 404, if the number of the current micro service instances included in the micro service list is smaller than the number of the pre-configured micro service instances, it is determined that the micro service list is abnormal.
And accessing the Nacos service instance node to an ARMS monitoring platform of a company, and monitoring the performance indexes of the Nacos service instance in real time, such as request quantity, average response time and the like. The healthy running state of the instance is monitored in real time. If the instances of the nacos cluster are abnormal, the early warning of the nail and the early warning of the telephone are triggered.
Through the deployment and design scheme, the Nacos registry provides high availability and high performance, 536 services are produced, and 1844 instances access the Nacos registry. The Nacos registration center has the advantages that the Nacos registration center is high in availability, 5 instances of a single cluster are deployed, at most two instances can be supported to be disconnected, and the availability of the cluster is not affected. And the design of the double-living cluster can realize that the single cluster can be quickly switched to the standby cluster under the condition that the single cluster is unavailable. High performance, service and instance information registered on the Nacos are cached in a memory, and the average response time of an instance registration interface is within 1ms according to ARMS real-time monitoring data. High throughput, Nacos registry can support 10W + number of services, 100W + instances registered simultaneously.
In one embodiment, the determining of the abnormal condition further includes:
and step 501, switching the IP address mapped by the domain name to the IP of the k8s platform.
The service is registered to the virtual machine environment cluster through the domain name, if the Nacos cluster of the virtual machine environment is abnormal, only the ip mapped by the domain name is required to be modified to the ip of the k8s environment by contacting a network group, and the service is switched without sensing.
In one embodiment, the determining of the abnormal condition further includes:
601, acquiring a micro service list to obtain index information returned by each micro service, wherein the index information comprises request quantity, concurrency number, throughput rate, response time, average response time and 99% response time; the concurrency number refers to the number of clients simultaneously requesting service at the same time point. For example, in a common situation, if ten thousand users visit a website at the same time, all the users can normally obtain the service. Without a timeout or connection rejection occurring. Throughput rate refers to the efficiency of the service in processing requests, and is calculated as (total number of requests processed/total time consumed). The throughput rate of the HTTP service is generally in units of RPS (Requests Per Second). The higher the throughput, the more efficient the representative service processing. In other words, the higher the performance of the web site. The response time refers to the total time consumed by the user from the sending of the request to the completion of the receiving of the response, and is composed of a plurality of parts, such as network transmission time consumption, service processing time consumption and the like. Typically in milliseconds (ms). In relation to the number of concurrencies, generally, as the number of concurrencies increases, the response time of a single user generally increases. The average response time refers to the average time taken for all requests, if there are 100 requests, 98 of which take 1ms and the other two 100 ms. Then the average response time is (98 x 1+2 x 100)/100.0-2.98 ms. Percentile (Percentile) is a statistical noun. Taking the response time as an example, the percentile response time of 99%, which means the request response time of 99%, is below this value. Taking the above response times, the overall average response time is 2.98ms, but the 99% percentile response time is 100 ms.
Step 602, determining dimension information of the index information, wherein the dimension information comprises a data access dimension, a data processing dimension and a data output dimension;
the dimension information may include data access dimensions, data processing dimensions, data output dimensions. In practical applications, the process of generating the index information may include processes of data access, data processing, data output, and the like, and one or more communication links may be involved in the generating process, and then after any one piece of index information is determined, the communication link corresponding to the index information may be determined.
Step 603, outputting alarm information corresponding to the dimension information when the monitoring result is judged to be abnormal.
Judging whether abnormal conditions exist at present according to the version information of the computational elements, the node configuration information, the node list and the running state of each node, if the number of the nodes with healthy running state of one computational element is less than two, if the abnormal conditions exist, triggering to execute alarm and displaying detailed alarm information, further obtaining the micro-service list, and obtaining index information returned by each micro-service, wherein the index information comprises request quantity, concurrency number, throughput rate, response time, average response time and 99% response time; determining dimension information of the index information, wherein the dimension information comprises a data access dimension, a data processing dimension and a data output dimension; and outputting alarm information corresponding to the dimension information when the monitoring result is judged to be abnormal. The health monitoring is realized to master the operation general situation of the whole micro-service system, the monitoring condition is updated at regular time, and the grading alarm is given according to the different functions and operation conditions of the micro-service application in the system.
In one embodiment, as shown in fig. 4, there is provided a micro service architecture monitoring apparatus including: the acquisition module is used for acquiring the calculation element version information and the node configuration information of the database; the data returning module is used for returning data to the database according to the calculation element version information and the node configuration information; the request module is used for sending a request to the registration center to acquire the running state of the node; the return module is used for returning the node list and the running state of each node to the micro service system health monitoring center according to the running state of the nodes; the judging module is used for judging whether an abnormal condition exists at present according to the computing element version information, the node configuration information, the node list and the running state of each node; and the triggering module is used for triggering and executing the alarm and displaying detailed alarm information if the abnormal condition exists.
In one embodiment, as shown in fig. 5, the determining module further includes: the judgment submodule is used for judging that the number of the nodes with the healthy running state of one computational element is less than two, and the abnormal situation is judged; the acquisition submodule is used for acquiring the running log from the automation deployment component Jenkins; and the viewing submodule is used for viewing the running log when the running state of the node is abnormal.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein computer-readable instructions which, when executed by the processor, cause the processor to perform the following steps when executing the computer-readable instructions: acquiring the computation element version information and the node configuration information of a database; returning data to a database according to the computation element version information and the node configuration information; sending a request to a registration center to acquire the running state of a node; returning a node list and the running state of each node to a health monitoring center of the micro service system according to the running state of the nodes; judging whether an abnormal condition exists at present according to the computing element version information, the node configuration information, the node list and the running state of each node; and if the abnormal condition exists, triggering and executing the alarm and displaying detailed alarm information.
In one embodiment, the determining whether an abnormal condition exists currently according to the operand version information, the node configuration information, the node list, and the operating state of each node includes: if the number of the nodes with the healthy running state of one computing element is less than two, judging the nodes to be abnormal; acquiring an operation log from an automation deployment component Jenkins; and checking the running log when the running state of the node is abnormal.
In an embodiment, after triggering execution of an alarm and displaying detailed alarm information if an abnormal condition exists, the method further includes: acquiring the running condition of the node, and returning the node state and the statistical data; acquiring a background log of the node, and returning log data; and displaying the node state, the statistical data and the log data.
In an embodiment, after triggering execution of an alarm and displaying detailed alarm information if an abnormal condition exists, the method further includes: acquiring a micro-service list, wherein the micro-service list comprises all currently available micro-services and index information; judging whether the current micro service instance number contained in the micro service list is inconsistent with the preset micro service instance number or not according to the preset micro service instance number and the micro service list; if the micro service list does not include the micro service to be monitored, judging the micro service list to be abnormal; and if the number of the current micro service instances contained in the micro service list is less than the number of the micro service instances of the preset configuration, judging that the micro service list is abnormal.
In one embodiment, the determining that the condition is abnormal further includes: the IP address of the domain name mapping is switched to the IP of the k8s platform.
In one embodiment, the determining that the condition is abnormal further includes: acquiring a micro-service list to obtain index information returned by each micro-service, wherein the index information comprises request quantity, concurrency number, throughput rate, response time, average response time and 99% response time; determining dimension information of the index information, wherein the dimension information comprises a data access dimension, a data processing dimension and a data output dimension; and outputting alarm information corresponding to the dimension information when the monitoring result is judged to be abnormal.
In one embodiment, a storage medium is presented having computer-readable instructions stored thereon which, when executed by one or more processors, cause the one or more processors to perform the steps of: acquiring the computation element version information and the node configuration information of a database; returning data to a database according to the computation element version information and the node configuration information; sending a request to a registration center to acquire the running state of a node; returning a node list and the running state of each node to a health monitoring center of the micro service system according to the running state of the nodes; judging whether an abnormal condition exists at present according to the computing element version information, the node configuration information, the node list and the running state of each node; and if the abnormal condition exists, triggering and executing the alarm and displaying detailed alarm information.
In one embodiment, the determining whether an abnormal condition exists currently according to the operand version information, the node configuration information, the node list, and the operating state of each node includes: if the number of the nodes with the healthy running state of one computing element is less than two, judging the nodes to be abnormal; acquiring an operation log from an automation deployment component Jenkins; and checking the running log when the running state of the node is abnormal.
In an embodiment, after triggering execution of an alarm and displaying detailed alarm information if an abnormal condition exists, the method further includes: acquiring the running condition of the node, and returning the node state and the statistical data; acquiring a background log of the node, and returning log data; and displaying the node state, the statistical data and the log data.
In an embodiment, after triggering execution of an alarm and displaying detailed alarm information if an abnormal condition exists, the method further includes: acquiring a micro-service list, wherein the micro-service list comprises all currently available micro-services and index information; judging whether the current micro service instance number contained in the micro service list is inconsistent with the preset micro service instance number or not according to the preset micro service instance number and the micro service list; if the micro service list does not include the micro service to be monitored, judging the micro service list to be abnormal; and if the number of the current micro service instances contained in the micro service list is less than the number of the micro service instances of the preset configuration, judging that the micro service list is abnormal.
In one embodiment, the determining that the condition is abnormal further includes: the IP address of the domain name mapping is switched to the IP of the k8s platform.
In one embodiment, the determining that the condition is abnormal further includes: acquiring a micro-service list to obtain index information returned by each micro-service, wherein the index information comprises request quantity, concurrency number, throughput rate, response time, average response time and 99% response time; determining dimension information of the index information, wherein the dimension information comprises a data access dimension, a data processing dimension and a data output dimension; and outputting alarm information corresponding to the dimension information when the monitoring result is judged to be abnormal.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express some exemplary embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A monitoring method for micro service architecture is characterized by comprising the following steps:
acquiring the computation element version information and the node configuration information of a database;
returning data to a database according to the computation element version information and the node configuration information;
sending a request to a registration center to acquire the running state of a node;
returning a node list and the running state of each node to a health monitoring center of the micro service system according to the running state of the nodes;
judging whether an abnormal condition exists at present according to the computing element version information, the node configuration information, the node list and the running state of each node;
and if the abnormal condition exists, triggering and executing the alarm and displaying detailed alarm information.
2. The monitoring method of micro service architecture according to claim 1, wherein the determining whether there is an abnormal condition at present according to the operand version information and node configuration information, the node list and the operating state of each node comprises:
if the number of the nodes with the healthy running state of one computing element is less than two, judging the nodes to be abnormal;
acquiring an operation log from an automation deployment component Jenkins;
and checking the running log when the running state of the node is abnormal.
3. The monitoring method of micro service architecture according to claim 1, wherein after triggering execution of an alarm and displaying detailed alarm information if an abnormal condition exists, the method further comprises:
acquiring the running condition of the node, and returning the node state and the statistical data;
acquiring a background log of the node, and returning log data;
and displaying the node state, the statistical data and the log data.
4. The monitoring method of micro service architecture according to claim 1, wherein after triggering execution of an alarm and displaying detailed alarm information if an abnormal condition exists, the method further comprises:
acquiring a micro-service list, wherein the micro-service list comprises all currently available micro-services and index information;
judging whether the current micro service instance number contained in the micro service list is inconsistent with the preset micro service instance number or not according to the preset micro service instance number and the micro service list;
if the micro service list does not include the micro service to be monitored, judging the micro service list to be abnormal;
and if the number of the current micro service instances contained in the micro service list is less than the number of the micro service instances of the preset configuration, judging that the micro service list is abnormal.
5. The monitoring method of micro service architecture according to claim 4, wherein the determining is an abnormal condition, further comprising:
the IP address of the domain name mapping is switched to the IP of the k8s platform.
6. The monitoring method of micro service architecture according to claim 4, wherein the determining is an abnormal condition, further comprising:
acquiring a micro-service list to obtain index information returned by each micro-service, wherein the index information comprises request quantity, concurrency number, throughput rate, response time, average response time and 99% response time;
determining dimension information of the index information, wherein the dimension information comprises a data access dimension, a data processing dimension and a data output dimension;
and outputting alarm information corresponding to the dimension information when the monitoring result is judged to be abnormal.
7. A microservice architecture monitoring apparatus, the microservice architecture monitoring apparatus comprising:
the acquisition module is used for acquiring the calculation element version information and the node configuration information of the database;
the data returning module is used for returning data to a database according to the computational element version information and the node configuration information;
the request module is used for sending a request to the registration center to acquire the running state of the node;
the return module is used for returning the node list and the running state of each node to the micro service system health monitoring center according to the running state of the node;
the judging module is used for judging whether an abnormal condition exists at present according to the computing element version information, the node configuration information, the node list and the running state of each node;
and the triggering module is used for triggering and executing the alarm and displaying detailed alarm information if the abnormal condition exists.
8. The microservice architecture monitoring device of claim 7, wherein the determining module further comprises:
the judgment submodule is used for judging that the number of the nodes with the healthy running state of one computational element is less than two, and the abnormal situation is judged;
the acquisition submodule is used for acquiring the running log from the automation deployment component Jenkins;
and the viewing submodule is used for viewing the running log when the running state of the node is abnormal.
9. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the microservice architecture monitoring method of any of claims 1-6.
10. A storage medium having computer-readable instructions stored thereon which, when executed by one or more processors, cause the one or more processors to perform the steps of the microservice architecture monitoring method of any of claims 1-6.
CN202110952969.9A 2021-08-19 2021-08-19 Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium Pending CN113778985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110952969.9A CN113778985A (en) 2021-08-19 2021-08-19 Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110952969.9A CN113778985A (en) 2021-08-19 2021-08-19 Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113778985A true CN113778985A (en) 2021-12-10

Family

ID=78838317

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110952969.9A Pending CN113778985A (en) 2021-08-19 2021-08-19 Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113778985A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500306A (en) * 2021-12-21 2022-05-13 上海赛可出行科技服务有限公司 Monitoring service automatic sampling verification method based on dimensionality
CN114500027A (en) * 2022-01-21 2022-05-13 杭州玳数科技有限公司 Method and system for service registration and service invocation based on Nacos
CN115437888A (en) * 2022-10-24 2022-12-06 华能信息技术有限公司 Monitoring and early warning method based on micro-service
CN115941701A (en) * 2022-10-13 2023-04-07 华能信息技术有限公司 Dynamic configuration method based on micro-service architecture
CN116192611A (en) * 2023-03-03 2023-05-30 阿维塔科技(重庆)有限公司 Unified alarm method, system and equipment based on multiple micro-service scenes
CN116302862A (en) * 2023-05-18 2023-06-23 浙江华东工程数字技术有限公司 Monitoring alarm method and system under micro-service architecture
WO2023155591A1 (en) * 2022-02-18 2023-08-24 苏州浪潮智能科技有限公司 Progress information management and control method, micro-service apparatus, electronic device, and storage medium
CN117453257A (en) * 2023-12-25 2024-01-26 深圳万物安全科技有限公司 Upgrading method based on hierarchical management, terminal equipment and readable storage medium
CN114996098B (en) * 2022-06-24 2024-04-09 中电金信软件有限公司 Exception handling method and device
CN117873733A (en) * 2024-03-11 2024-04-12 成都中科合迅科技有限公司 Multi-scene-oriented micro-service switching operation control method and system

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500306A (en) * 2021-12-21 2022-05-13 上海赛可出行科技服务有限公司 Monitoring service automatic sampling verification method based on dimensionality
CN114500306B (en) * 2021-12-21 2024-01-09 上海赛可出行科技服务有限公司 Dimension-based monitoring service automatic sampling verification method
CN114500027B (en) * 2022-01-21 2024-01-12 杭州玳数科技有限公司 Nacos-based service registration and service invocation method and system
CN114500027A (en) * 2022-01-21 2022-05-13 杭州玳数科技有限公司 Method and system for service registration and service invocation based on Nacos
WO2023155591A1 (en) * 2022-02-18 2023-08-24 苏州浪潮智能科技有限公司 Progress information management and control method, micro-service apparatus, electronic device, and storage medium
CN114996098B (en) * 2022-06-24 2024-04-09 中电金信软件有限公司 Exception handling method and device
CN115941701A (en) * 2022-10-13 2023-04-07 华能信息技术有限公司 Dynamic configuration method based on micro-service architecture
CN115941701B (en) * 2022-10-13 2023-06-23 华能信息技术有限公司 Dynamic configuration method based on micro-service architecture
CN115437888A (en) * 2022-10-24 2022-12-06 华能信息技术有限公司 Monitoring and early warning method based on micro-service
CN115437888B (en) * 2022-10-24 2023-03-28 华能信息技术有限公司 Monitoring and early warning method based on micro-service
CN116192611A (en) * 2023-03-03 2023-05-30 阿维塔科技(重庆)有限公司 Unified alarm method, system and equipment based on multiple micro-service scenes
CN116302862B (en) * 2023-05-18 2023-08-11 浙江华东工程数字技术有限公司 Monitoring alarm method and system under micro-service architecture
CN116302862A (en) * 2023-05-18 2023-06-23 浙江华东工程数字技术有限公司 Monitoring alarm method and system under micro-service architecture
CN117453257A (en) * 2023-12-25 2024-01-26 深圳万物安全科技有限公司 Upgrading method based on hierarchical management, terminal equipment and readable storage medium
CN117453257B (en) * 2023-12-25 2024-03-26 深圳万物安全科技有限公司 Upgrading method based on hierarchical management, terminal equipment and readable storage medium
CN117873733A (en) * 2024-03-11 2024-04-12 成都中科合迅科技有限公司 Multi-scene-oriented micro-service switching operation control method and system
CN117873733B (en) * 2024-03-11 2024-05-17 成都中科合迅科技有限公司 Multi-scene-oriented micro-service switching operation control method and system

Similar Documents

Publication Publication Date Title
CN113778985A (en) Microservice architecture monitoring method, microservice architecture monitoring device, computer equipment and storage medium
CN112653586B (en) Time-space big data platform application performance management method based on full link monitoring
CN108234170B (en) Monitoring method and device for server cluster
Castelli et al. Proactive management of software aging
US7805482B2 (en) Method of correlating events in data packet streams
CN111078504A (en) Distributed call chain tracking method and device, computer equipment and storage medium
CN111209011A (en) Cross-platform container cloud automatic deployment system
JP2002542525A (en) Method and apparatus for dynamic filtering and routing of events
CN106059825A (en) Distributed system and configuration method
CN112162821B (en) Container cluster resource monitoring method, device and system
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
US9998544B2 (en) Synchronization testing of active clustered servers
CN109324942B (en) Double-activity processing method, device, system, equipment and storage medium for microservice
CN117130730A (en) Metadata management method for federal Kubernetes cluster
US9201685B2 (en) Transactional cache versioning and storage in a distributed data grid
CN111404737B (en) Disaster recovery processing method and related device
CN112883119A (en) Data synchronization method and device, computer equipment and computer readable storage medium
CN116521664A (en) Data monitoring method and device for data warehouse, computing equipment and storage medium
CN114500289B (en) Control plane recovery method, device, control node and storage medium
CN112685486B (en) Data management method and device for database cluster, electronic equipment and storage medium
CN116264541A (en) Multi-dimension-based database disaster recovery method and device
CN116668269A (en) Arbitration method, device and system for dual-activity data center
CN112256489A (en) Data acquisition method and device of cloud development platform and data storage architecture
CN111382022B (en) Method, device, electronic equipment and storage medium for monitoring real-time stream computing platform
CN111143475B (en) State management method and device for Storm data analysis

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