CN110324209B - Micro-service system monitoring method and device, electronic equipment and computer readable medium - Google Patents

Micro-service system monitoring method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN110324209B
CN110324209B CN201910712338.2A CN201910712338A CN110324209B CN 110324209 B CN110324209 B CN 110324209B CN 201910712338 A CN201910712338 A CN 201910712338A CN 110324209 B CN110324209 B CN 110324209B
Authority
CN
China
Prior art keywords
monitoring
microservice
micro service
file
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910712338.2A
Other languages
Chinese (zh)
Other versions
CN110324209A (en
Inventor
张�杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group 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 Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201910712338.2A priority Critical patent/CN110324209B/en
Publication of CN110324209A publication Critical patent/CN110324209A/en
Application granted granted Critical
Publication of CN110324209B publication Critical patent/CN110324209B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0681Configuration of triggering conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/14Arrangements for monitoring or testing data switching networks using software, i.e. software packages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0266Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using meta-data, objects or commands for formatting management information, e.g. using eXtensible markup language [XML]

Abstract

The disclosure relates to a micro service system monitoring method, a micro service system monitoring device, electronic equipment and a computer readable medium. The microservice system comprises a plurality of microservice units, and the method comprises the following steps: determining a monitoring archive file and a corresponding monitoring configuration file based on the microservice unit; loading the monitoring archive file into a project of the microservice unit; initializing the micro service unit to enable the monitoring archive file to load the monitoring configuration file; and after the micro service system is loaded, monitoring the micro service unit through a specified monitoring application program. The monitoring method, the monitoring device, the electronic equipment and the computer readable medium of the micro service system can enable the micro service system to efficiently and quickly monitor micro service units which are not registered in a registration center.

Description

Micro-service system monitoring method and device, electronic equipment and computer readable medium
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a method and an apparatus for monitoring a microservice system, an electronic device, and a computer-readable medium.
Background
With the rapid development of the internet, more and more systems are provided in the enterprise group, and the business becomes more and more complex. A single system cannot fulfill the business needs of a company. And mutual calling among systems is required to complete the realization of the service. The distributed service administration framework which is popular at present is a micro service system framework, and can be a Spring Cloud framework for example. In the spring cloud framework, different business departments in an enterprise group are respectively used as micro service units to carry out unified management, and information among different micro service units is transmitted through interfaces. At present, monitoring information of all systems in a Spring Cloud framework is uniformly monitored and managed through a Spring Boot Admin system.
Because the Spring Boot admin monitoring system can only monitor the micro service units registered in the registration of the micro service system, the micro service units not connected with the registration center cannot monitor, so that in a plurality of micro service units in an enterprise group, only a part of the registered micro service units are likely to be monitored, and the unregistered micro service units are not monitored. This situation causes the workload of developers to be increased greatly, each time a new microservice unit comes online, by manually calling a program to determine whether other monitored microservice units are working properly.
The micro-service unit brought into the registry checks the health condition of the connection through the Spring Boot admin, and the condition that the micro-service unit not brought into the registry needs to be checked manually has a great defect. Therefore, a new monitoring method, device, electronic device and computer readable medium for micro service system are needed.
The above information disclosed in this background section is only for enhancement of understanding of the background of the disclosure and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present disclosure provides a method and an apparatus for monitoring a micro service system, an electronic device, and a computer readable medium, which enable the micro service system to efficiently and quickly monitor a micro service unit that is not registered in a registration center.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, a monitoring method for a micro service system is provided, where the micro service system includes a plurality of micro service units, and the method includes: determining a monitoring archive file and a corresponding monitoring configuration file based on the microservice unit; loading the monitoring archive file into a project of the micro service system; initializing the micro service system to enable the monitoring archive file to load the monitoring configuration file; and after the micro service system is loaded, monitoring the micro service unit through a specified monitoring application program.
In one embodiment, determining a monitoring archive file and its corresponding monitoring configuration file based on the microservice unit comprises: determining the monitoring archive file and a corresponding monitoring configuration file according to a monitoring protocol of the microservice unit; the monitoring protocol comprises the following steps: HTTP, TELNET, SSH, FTP, SFTP.
In one embodiment, determining a monitoring archive file and its corresponding monitoring profile based on the microservice unit further comprises: storing the monitoring archive file in a system folder of the micro-service system; and/or storing the monitoring configuration file in a resource folder of the microservice system.
In one embodiment, loading the monitoring archive file into the engineering of the microservice system comprises: and loading the monitoring archive file into the project of the micro service system through a repair management description file.
In one embodiment, performing initialization of the microservice system to cause the monitoring archive to load the monitoring configuration file comprises: initializing the micro service system according to a user instruction; analyzing the monitoring configuration file in an initialization process; and the monitoring configuration file after the monitoring archive file is loaded and analyzed.
In one embodiment, the monitoring the archive file loading the parsed monitoring configuration file comprises: acquiring a target protocol, a target address and a target port from the analyzed monitoring configuration file; and the class file in the monitoring document file realizes the calling of a target port of a target address through the target protocol.
In one embodiment, the monitoring of the microservice unit by the microservice system via a designated monitoring application after loading comprises: and the monitoring application program appointed in the micro service system receives the monitoring information from the micro service unit through an appointed interface.
In one embodiment, the receiving, by a monitoring application designated in the microservice system, monitoring information from the microservice unit via a designated interface includes: and the Spring Boot admin application program monitors the micro service unit by inheriting the health indicator interface class.
In one embodiment, further comprising: acquiring an alarm threshold value through the monitoring configuration file; and the micro-service system monitors the micro-service units based on the alarm threshold.
In one embodiment, further comprising: acquiring a modified monitoring configuration file; and initializing the microservice unit to update the monitoring profile in the microservice system.
According to an aspect of the present disclosure, a monitoring apparatus for a microservice system is provided, the microservice system including a plurality of microservice units, the apparatus comprising: the file module is used for determining a monitoring filing file and a corresponding monitoring configuration file based on the micro service unit; the loading module is used for loading the monitoring archive file into the project of the micro service unit; the initialization module is used for initializing the micro service unit so that the monitoring archive file loads the monitoring configuration file; and the monitoring module is used for monitoring the micro service unit by the micro service system through a specified monitoring application program after the micro service unit is loaded.
According to an aspect of the present disclosure, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the disclosure, a computer-readable medium is proposed, on which a computer program is stored, which program, when being executed by a processor, carries out the method as above.
According to the monitoring method and device of the micro-service system, the electronic equipment and the computer readable medium, the micro-service unit which is not registered in the registration center can be efficiently and quickly monitored by the micro-service system through the monitoring filing file and the monitoring configuration file corresponding to the filing file.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are merely some embodiments of the present disclosure, and other drawings may be derived from those drawings by those of ordinary skill in the art without inventive effort.
Fig. 1 is a system scenario block diagram illustrating a micro service system monitoring method and apparatus according to an exemplary embodiment.
Fig. 2 is a flow chart illustrating a microservice system monitoring method according to an example embodiment.
Fig. 3 is a flowchart illustrating a microservice system monitoring method according to another exemplary embodiment.
Fig. 4 is a schematic diagram illustrating a microservice system monitoring method according to another exemplary embodiment.
Fig. 5 is a block diagram illustrating a microservice system monitoring apparatus in accordance with an exemplary embodiment.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 7 is a schematic diagram illustrating a computer-readable storage medium according to an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the disclosed concept. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It is to be understood by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present disclosure and are, therefore, not intended to limit the scope of the present disclosure.
Fig. 1 is a system block diagram illustrating a method and apparatus for monitoring a microservice system according to an exemplary embodiment.
As shown in fig. 1, system architecture 100 may include microservice servers 101, 102, 103, network 104, and microservice system server 105. Network 104 is used to provide a medium for communication links between service unit servers 101, 102, 103 and microservice system server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the microservice server 101, 102, 103 to interact with the microservice server 105 over the network 104 to receive or send messages or the like. The microservice servers 101, 102, 103 may have installed thereon various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, and the like.
The microservice servers 101, 102, 103 may be servers that provide various services, such as backend servers that provide support for query data provided by users. The microservice server 101 (or 102, 103) may perform analysis and other processes on the received query data, and during the analysis process, the microservice server 101 may also exchange data with the microservice server 102 or 103, for example, through the microservice system server 105 to generate user response data and feed the user response data back to the user.
The microservice system server 105 may be a server that provides various services for the microservice servers 101, 102, 103, such as a backend server that provides data support between the microservice servers 101, 102, 103; the microservice server 105 may also perform data monitoring and security support for the microservice servers 101, 102, 103, for example.
The software architecture of a microservice is a system organization comprising various organizations including Web servers, application servers, databases, storage, communication layers, which may be related to each other or the environment. The goal of the system architecture is to address the concerns of stakeholders. In the microservice system, different microservices can be called through a unified program or platform, and the following operations can be performed before the microservice server 105 monitors the microservice servers 101, 102 and 103, wherein the microservice server 105 is simply called the microservice system 105, and the microservice servers 101, 102 and 103 are simply called the microservice units 101, 102 and 103:
determining a monitoring archive file and a corresponding monitoring configuration file based on the micro-service unit 101 (or 102, 103); loading the monitoring archive file into a project of micro-service system 105; performing initialization of the microservice system 105 to cause the monitoring archive to load the monitoring configuration file; and after loading, micro service system 105 monitors micro service unit 101 through the designated monitoring application.
The microservice server 105 may also obtain alarm thresholds, for example, from the monitoring profile; and the microservice system 105 monitors the microservice unit 101 based on the alarm threshold.
After the configuration file of the micro service unit 101 is modified, acquiring a modified monitoring configuration file; and initializing microservice unit 101 to update the monitoring profile in microservice system 105.
The microservice server 105 and the microservice servers 101, 102, 103 may be a single entity server, or may be composed of a plurality of servers, for example, it should be noted that the microservice monitoring method provided by the embodiment of the present disclosure may be executed by the microservice server 105 and/or the microservice servers 101, 102, 103, and accordingly, the microservice monitoring apparatus may be disposed in the microservice server 105 and/or the microservice servers 101, 102, 103. And the requesting end that provides the user with the query request input or other request input is typically located in the microservice server 101, 102, 103.
According to the monitoring method and the monitoring device for the micro service system, the micro service units which are not registered in the registration center can be efficiently and quickly monitored by the micro service system through the mode of monitoring the filing files and the corresponding monitoring configuration files to monitor the micro service units which are not brought into the registration center.
Fig. 2 is a flow chart illustrating a microservice system monitoring method according to an example embodiment. The microservice system monitoring method 20 includes at least steps S202 to S208.
As shown in fig. 2, in S202, a monitoring archive file and its corresponding monitoring configuration file are determined based on the microservice unit.
In one embodiment, the monitoring archive file and the corresponding monitoring configuration file may be determined according to a monitoring protocol of the microservice unit; the monitoring protocol comprises the following steps: HTTP, TELNET, SSH, FTP, SFTP.
Among them, the HTTP Protocol (HyperText Transfer Protocol) is the most widely used network Transfer Protocol on the internet, and all WWW files must comply with this standard. HTTP is a protocol based TCP/IP communication to transfer data (HTML files, picture files, query results, etc.).
The Telnet protocol (remote terminal protocol) is a member of the TCP/IP protocol suite, and is the standard protocol and main mode for Internet Telnet services. It provides the user with the ability to do remote host work on the local computer. The telnet program is used on the end user's computer and is used to connect to the server. The end user can enter commands in the telnet program that will run on the server as if entered directly on the server's console. The server can be controlled locally. Telnet is a commonly used method of remotely controlling a Web server.
The SSH protocol (Secure Shell protocol) is a security protocol established on an application layer basis. SSH is currently a relatively reliable protocol that provides security for telnet sessions and other web services. The SSH protocol can effectively prevent the problem of information leakage in the remote management process.
The ftp (File Transfer Protocol) is a set of standard protocols for File Transfer over a network, and uses a client/server model. It belongs to the application layer of the network transport protocol.
The sftp Protocol (Secure File Transfer Protocol) may provide a Secure network encryption method for transferring files. sftp has almost the same syntax and functionality as ftp. SFTP is part of SSH, which is a secure way to transfer files to the Blgger server. SFTP is also used to encrypt authentication information and transmitted data, and therefore, it is very secure to use SFTP. However, since this transmission method uses an encryption/decryption technique, the transmission efficiency is much lower than that of the ordinary FTP.
In one embodiment, determining a monitoring archive file and its corresponding monitoring profile based on the microservice unit further comprises: storing the monitoring archive file in a system folder of the micro-service system; and/or storing the monitoring configuration file in a RESOURCE (RESOURCE) folder of the microservice system.
For example, microservice system a needs to monitor microservice unit B and microservice unit C, and if microservice unit B and microservice unit C are to be monitored, a monitoring archive file JAR package (TK _ monitor. And adding a monitoring configuration file TK _ MONITOR.XML into a RESOURCE folder in the micro service system A.
In S204, the monitoring archive file is loaded into the micro-service unit project. The monitoring archive file may be loaded into the project of the microservice system, for example, by modifying a management description file.
The management description file is a POM file, and the POM represents a project object model. It is the basic unit of work in Maven, and is an XML file. It is always kept in the item base directory. The POM file contains various configuration information. POM also contains targets and plug-ins. When executing a task or a target, Maven uses the POM in the current directory, obtains the required configuration information by reading the POM, and then executes the target.
In S206, the micro service unit is initialized so that the monitoring archive file loads the monitoring configuration file.
In one embodiment, performing initialization of the microservice system to cause the monitoring archive to load the monitoring configuration file comprises: initializing the micro service system according to a user instruction; analyzing the monitoring configuration file in an initialization process; and the monitoring configuration file after the monitoring archive file is loaded and analyzed.
Wherein, the monitoring configuration file after the loading and analysis of the monitoring archive file comprises: acquiring a target protocol, a target address and a target port from the analyzed monitoring configuration file; and the class file in the monitoring document file realizes the calling of a target port of a target address through the target protocol.
In S208, the microservice system monitors the microservice unit through a designated monitoring application after the loading is completed. For example, a monitoring application program designated in the microservice system accepts monitoring information from the microservice unit through a designated interface.
In one embodiment, for example, specifically: the Spring Boot admin application monitors the micro service unit by inheriting the health indicator interface class. The Spring Boot Admin is an application program for managing and monitoring the Spring Boot application program in the micro-service system. These applications are registered by the Spring BootAdmin Client (via HTTP) or discovered using Spring Cloud (e.g., Eureka).
The Spring Boot Admin is used for monitoring the application based on the Spring Boot, and provides a concise visual network visualization service on the basis of the Spring Boot operator. In the Spring Boot project, the Spring Boot Admin is used as a Server terminal, and other applications to be monitored are used as Client terminals.
In one embodiment, the monitoring archive file has a class related to implementation of the health indicator, the Spring Boot admin system monitors the class implementing the interface, and the monitoring information on the micro service unit can be sent to the Spring Boot admin system interface through the class. In the Spring Cloud system, a Spring framework provides an interface for developers, the interface is a health indicator, and the developers can realize the self health information monitoring by inheriting the interface. By inheriting the interface, all systems can be included in the monitoring of the Spring Boot admin.
In one embodiment, the method further comprises: acquiring an alarm threshold value through the monitoring configuration file; and the micro-service system monitors the micro-service units based on the alarm threshold. Specifically, for example, TRIES may be used to indicate the number of retries in the monitoring configuration file, and REF may indicate successful monitoring or abnormal operation. The threshold of the monitored system can be set by the TRIES tag.
Because there are many systems requiring additional monitoring in the system, and each monitoring cannot be realized by writing a health indicator implementation class, in the method of the present disclosure, all services requiring monitoring are configured by one configuration class for monitoring, and enterprise group content micro-service units can be incorporated into a Spring Cloud monitoring system in a customized manner.
It should be clearly understood that this disclosure describes how to make and use particular examples, but the principles of this disclosure are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Fig. 3 is a flowchart illustrating a microservice system monitoring method according to another exemplary embodiment. The process 30 shown in fig. 3 is a detailed description of the initialization of the microservice unit to enable the monitoring archive file to load the monitoring configuration file at S206 "in the process shown in fig. 2,
as shown in fig. 3, in S302, the microservice system is initialized according to a user instruction. Wherein, two files can be added when the system is configured with custom monitoring, which are respectively: TK _ monitor.jar and TK _ monitor.xml. If the monitored protocol is SSH/FTP/SFTP protocol, a corresponding protocol JAR file is required to be additionally added to the project.
In S304, the monitoring profile is parsed in an initialization process. In one embodiment, the monitoring profile may be divided into two parts, as follows:
the first layer is < service > </service >
The layer is used for storing basic information of all monitoring systems, and specifically comprises the following steps: one SERVICE corresponds to a plurality of SERVICES, and one SERVICE corresponds to a plurality of INSTANCEs.
The label < SERVICE NAME ═ TKJY "> represents basic information of a project requiring access monitoring, and NAME represents a NAME.
The label < INSTANCE IP ═ PORT ═ TYPE ═ TRIES ═ REF ═ represents an example of the project that needs to be monitored.
The IP represents the IP address which needs to be monitored by the server, the PORT represents the PORT which needs to be connected, and the TYPE represents the monitoring mode. TRIES indicates the number of retries, and REF indicates the success of monitoring or an abnormally performed operation.
The threshold of the monitored system can be set by the TRIES tag.
The TYPE monitoring modes supported at present comprise five TYPEs, namely HTTP, TELNET, SSH, FTP and SFTP.
REF includes two classes, the system sends system default information when NORMAL, including configuration items in files (IP PORT TYPE), and monitoring operations can be self-defined by < BEANS > tags when system default information is not satisfactory.
The second layer is: < BEAN > </BEANS >
Each < BEAN > tag represents a custom monitoring operation, NAME represents the NAME of the operation, and CLASS represents the CLASS to which the operation corresponds.
The specific monitoring operation may be set in the < SERVICE > tag by the REF field. The value inside REF is the value of NAME in the BEAN label.
In S306, a target protocol, a target address, and a target port are obtained from the analyzed monitoring configuration file. JAR needs to be loaded into engineering, and the JAR package is loaded into a system by modifying a POM file.
The TK _ monitor. XML file can be parsed by an XML-related JAR package. And judging which protocol monitoring is needed by the service through the TYPE note. For example, a SERVICE named "TKJY" for SERVICE can be known by analysis. A 127.0.0.1 IP, 80 port service needs to be invoked via the TELNET protocol. The corresponding class in TK _ monitor.
In S308, the class file in the monitoring document file calls a target port of a target address through the target protocol.
Wherein, the configuration file is as follows: TK _ monitor.xml, which is loaded via a corresponding file in TK _ monitor.jar, the loaded content will be placed in the JVM.
The path of the configuration file is: SRC/RESOURCES folder in the project.
Loading a TK _ MONITOR. XML file in an RESOURCES folder in the TK _ MONITOR. JAR in the system initialization process; monitoring of TK _ MONITOR. XML configuration after the completion of the start is incorporated into the SPRINGCLOUD monitoring system.
JAR has a class related to implementation of a health indicator, a Spring Boot admin system monitors the class implementing the interface, and monitoring information can be sent to the interface of the Spring Boot admin system through the class.
Wherein if the TK _ monitor. XML related configuration file is modified the system needs to be restarted to re-parse the XML configuration file. This action is done at system start-up. After the start-up is completed, the new system is loaded into the monitoring.
Fig. 4 is a schematic diagram illustrating a microservice system monitoring method according to another exemplary embodiment. As shown in fig. 4, if there are 4 insurance platform systems to be online in a group company, there are 4 associated systems, which are as follows:
a short message center system incorporated into the management of the registration center
A rules engine system incorporated into registry management
Family management system not incorporated into the registry management
Doctor system, not incorporated into registry management
At present, after the application platform program is on line, the service conditions of the short message center system and the rule engine system can be seen through the monitoring platform, and the home management system and the doctor system need developers to manually call the program to judge whether the connection is correct.
If a homeland system and a doctor system are to be brought into Spring Boot admin monitoring management, a monitoring JAR package (TK _ MONITOR. JAR) needs to be added in an insurance platform system. And adding a configuration file TK _ MONITOR. XML in an insurance platform RESOURCE folder.
The information of the family and the doctor system is as follows:
name of system IP Port(s) Connection mode
Home garden 10.127.9.1 21 SSH
Home garden 10.127.9.1 22 FTP
Doctor 10.127.9.2 23 SFTP
Doctor 10.127.9.2 8080 HTTP
In one embodiment, the physician system employs a custom monitoring alarm operation, if desired, the custom class being TK operator. TK _ monitor. xml can be configured by the above information.
In one embodiment, the program for parsing the XML file needs to be packaged into a JAR package, each system that needs to access the function needs to introduce the JAR package, and the XML file needs to be set in the form of a configuration file to be placed in each system.
According to the monitoring method of the micro-service system, the problem that different systems need to check the health degree of the system in different modes is solved; the system which is not incorporated into a registration center can be simply accessed through the configuration file, and zero invasion is caused to the system; the system of the whole micro-service system is more convenient to be online and monitored.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the above-described methods provided by the present disclosure. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods. For details not disclosed in the embodiments of the apparatus of the present disclosure, refer to the embodiments of the method of the present disclosure.
Fig. 5 is a block diagram illustrating a microservice system monitoring apparatus in accordance with an exemplary embodiment. As shown in fig. 5, the microservice system monitoring apparatus 50 includes: a file module 502, a loading module 504, an initialization module 506, and a monitoring module 508.
The file module 502 is configured to determine a monitoring archive file and a monitoring configuration file corresponding to the monitoring archive file based on the micro service unit; wherein, the monitoring archive file and the corresponding monitoring configuration file can be determined according to the monitoring protocol of the microservice unit; the monitoring protocol comprises the following steps: HTTP, TELNET, SSH, FTP, SFTP.
The loading module 504 is configured to load the monitoring archive file into the micro service unit project; the monitoring archive file may be loaded into the project of the microservice system, for example, by modifying a management description file.
An initialization module 506 is configured to perform initialization of the microservice unit so that the monitoring archive file loads the monitoring configuration file;
in one embodiment, performing initialization of the microservice system to cause the monitoring archive to load the monitoring configuration file comprises: initializing the micro service system according to a user instruction; analyzing the monitoring configuration file in an initialization process; and the monitoring configuration file after the monitoring archive file is loaded and analyzed.
The monitoring module 508 is configured to monitor the microservice system through a specified monitoring application after the loading is completed. For example, a monitoring application program designated in the microservice system accepts monitoring information from the microservice unit through a designated interface.
In one embodiment, for example, specifically: and the Spring Boot admin application program monitors the micro service unit by inheriting the health indicator interface class.
According to the monitoring device of the micro-service system, the micro-service units which are not registered in the registration center can be efficiently and quickly monitored by the micro-service system through the mode of monitoring the filing files and the corresponding monitoring configuration files to monitor the micro-service units which are not brought into the registration center.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 200 according to this embodiment of the present disclosure is described below with reference to fig. 6. The electronic device 200 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 200 is embodied in the form of a general purpose computing device. The components of the electronic device 200 may include, but are not limited to: at least one processing unit 210, at least one memory unit 220, a bus 230 connecting different system components (including the memory unit 220 and the processing unit 210), a display unit 240, and the like.
Wherein the storage unit stores program code executable by the processing unit 210 to cause the processing unit 210 to perform the steps according to various exemplary embodiments of the present disclosure described in the above-mentioned electronic prescription flow processing method section of the present specification. For example, the processing unit 210 may perform the steps shown in fig. 2 and 3.
The memory unit 220 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)2201 and/or a cache memory unit 2202, and may further include a read only memory unit (ROM) 2203.
The storage unit 220 may also include a program/utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 230 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 200 may also communicate with one or more external devices 300 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 200, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 200 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 250. Also, the electronic device 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 260. The network adapter 260 may communicate with other modules of the electronic device 200 via the bus 230. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiments of the present disclosure.
Fig. 7 schematically illustrates a computer-readable storage medium in an exemplary embodiment of the disclosure.
Referring to fig. 7, a program product 400 for implementing the above method according to an embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: determining a monitoring archive file and a corresponding monitoring configuration file based on the microservice unit; loading the monitoring archive file into a project of the microservice unit; initializing the micro service unit to enable the monitoring archive file to load the monitoring configuration file; and after the micro service system is loaded, monitoring the micro service unit through a specified monitoring application program.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the present disclosure is not limited to the precise arrangements, instrumentalities, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
In addition, the structures, the proportions, the sizes, and the like shown in the drawings of the present specification are only used for matching with the contents disclosed in the specification, so as to be understood and read by those skilled in the art, and are not used for limiting the limit conditions which the present disclosure can implement, so that the present disclosure has no technical essence, and any modification of the structures, the change of the proportion relation, or the adjustment of the sizes, should still fall within the scope which the technical contents disclosed in the present disclosure can cover without affecting the technical effects which the present disclosure can produce and the purposes which can be achieved. In addition, the terms "above", "first", "second" and "a" as used in the present specification are for the sake of clarity only, and are not intended to limit the scope of the present disclosure, and changes or modifications of the relative relationship may be made without substantial changes in the technical content.

Claims (10)

1. A monitoring method for a micro service system, the micro service system comprising a plurality of micro service units, the method comprising:
determining a monitoring archive file and a corresponding monitoring configuration file based on the microservice unit;
loading the monitoring archive file into a project of the micro service system;
initializing the micro service system to enable the monitoring archive file to load the monitoring configuration file; and
and after the micro service system is loaded, monitoring the micro service unit through a specified monitoring application program.
2. The method of claim 1, wherein determining a monitoring archive file and its corresponding monitoring profile based on the microservice unit comprises:
and determining the monitoring archive file and the corresponding monitoring configuration file according to the monitoring protocol of the microservice unit.
3. The method of claim 2, wherein determining a monitoring archive file and its corresponding monitoring profile based on the microservice unit further comprises:
storing the monitoring archive file in a system folder of the micro-service system; and/or
And storing the monitoring configuration file in a resource folder of the micro service system.
4. The method of claim 1, wherein performing initialization of the microservice system to cause the monitoring archive to load the monitoring configuration file comprises:
initializing the micro service system according to a user instruction;
analyzing the monitoring configuration file in an initialization process; and
and the monitoring archive file loads the analyzed monitoring configuration file.
5. The method of claim 1, wherein the microservice system monitoring the microservice unit through a designated monitoring application after loading comprises:
and the monitoring application program appointed in the micro service system receives the monitoring information from the micro service unit through an appointed interface.
6. The method of claim 1, further comprising
Acquiring an alarm threshold value through the monitoring configuration file; and
and the micro service system monitors the micro service unit based on the alarm threshold.
7. The method of claim 1, further comprising:
acquiring a modified monitoring configuration file; and
initializing the microservice system to update the monitoring profile in the microservice system.
8. A monitoring apparatus for a microservice system, the microservice system comprising a plurality of microservice units, the monitoring apparatus comprising:
the file module is used for determining a monitoring filing file and a corresponding monitoring configuration file based on the micro service unit;
the loading module is used for loading the monitoring archive file into the project of the micro service unit;
the initialization module is used for initializing the micro service unit so that the monitoring archive file loads the monitoring configuration file; and
and the monitoring module is used for monitoring the micro service unit by the micro service system through a specified monitoring application program after the micro service unit is loaded.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN201910712338.2A 2019-08-02 2019-08-02 Micro-service system monitoring method and device, electronic equipment and computer readable medium Active CN110324209B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910712338.2A CN110324209B (en) 2019-08-02 2019-08-02 Micro-service system monitoring method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910712338.2A CN110324209B (en) 2019-08-02 2019-08-02 Micro-service system monitoring method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN110324209A CN110324209A (en) 2019-10-11
CN110324209B true CN110324209B (en) 2020-10-09

Family

ID=68123526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910712338.2A Active CN110324209B (en) 2019-08-02 2019-08-02 Micro-service system monitoring method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN110324209B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971449A (en) * 2019-10-25 2020-04-07 武汉烽火众智数字技术有限责任公司 Service management and control system based on micro-service architecture
CN111158987B (en) * 2019-12-31 2023-09-19 中国银行股份有限公司 Health check method and device for micro-service architecture
CN115086412A (en) * 2021-03-16 2022-09-20 易保网络技术(上海)有限公司 Micro-service development method, system, computer equipment and medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
CN106713420B (en) * 2016-11-30 2019-11-22 国网北京市电力公司 The dispositions method and device of monitoring
CN108206852B (en) * 2016-12-20 2020-12-22 华为技术有限公司 Session-based service instance management method and device under micro-service framework
US11184271B2 (en) * 2017-04-06 2021-11-23 At&T Intellectual Property I, L.P. Network service assurance system
CN106991035B (en) * 2017-04-06 2020-04-21 北京计算机技术及应用研究所 Host monitoring system based on micro-service architecture
CN106951357B (en) * 2017-05-10 2018-06-15 焦点科技股份有限公司 A kind of server end application publication monitoring method and device based on finger daemon
CN108512689B (en) * 2017-12-15 2021-08-27 中国平安财产保险股份有限公司 Micro-service monitoring method and server
CN109034743A (en) * 2018-07-20 2018-12-18 中软信息系统工程有限公司 Crowd's wound development approach, system and device
CN109743199A (en) * 2018-12-25 2019-05-10 中国联合网络通信集团有限公司 Containerization management system based on micro services
CN109814983A (en) * 2019-01-02 2019-05-28 深圳壹账通智能科技有限公司 Task batch processing method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110324209A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
US10216527B2 (en) Automated software configuration management
US7765293B2 (en) System and algorithm for monitoring event specification and event subscription models
CN110324209B (en) Micro-service system monitoring method and device, electronic equipment and computer readable medium
US20120047506A1 (en) Resource abstraction via enabler and metadata
US7966617B2 (en) Tunable engine and program product for resolving prerequisites for client devices in an open service gateway initiative (OSGi) framework
US20060206583A1 (en) Framework for managing client application data in offline and online environments
JP7097958B2 (en) Systems and methods for integrating cloud applications into cloud service broker platforms using the Automatic Universal Connector Package
US11061669B2 (en) Software development tool integration and monitoring
US9471403B1 (en) Granular event management for service platforms
US11531526B1 (en) Creating portable serverless applications
US20230214229A1 (en) Multi-tenant java agent instrumentation system
US11716354B2 (en) Determination of compliance with security technical implementation guide standards
US10394531B2 (en) Hyper dynamic Java management extension
US11494184B1 (en) Creation of transportability container files for serverless applications
US8694596B2 (en) Systems and methods for information brokering in software management
CN110275701B (en) Data processing method, device, medium and computing equipment
US20140173587A1 (en) Managing an application modification process
US20220318350A1 (en) Dynamic transaction-aware web application authentication using call intercepts
US11513833B1 (en) Event listener interface for container-based execution of serverless functions
CN115374207A (en) Service processing method and device, electronic equipment and computer readable storage medium
CN113495498A (en) Simulation method, simulator, device, and medium for hardware device
CN113760693A (en) Method and apparatus for local debugging of microservice systems
CN112559001A (en) Method and device for updating application
US10977210B2 (en) Methods for implementing an administration and testing tool
CN115185542A (en) Containerization deployment method, device, system, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant