CN110324209A - Micro services system monitoring method, apparatus, electronic equipment and computer-readable medium - Google Patents

Micro services system monitoring method, apparatus, electronic equipment and computer-readable medium Download PDF

Info

Publication number
CN110324209A
CN110324209A CN201910712338.2A CN201910712338A CN110324209A CN 110324209 A CN110324209 A CN 110324209A CN 201910712338 A CN201910712338 A CN 201910712338A CN 110324209 A CN110324209 A CN 110324209A
Authority
CN
China
Prior art keywords
micro services
monitoring
file
services system
configuration file
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.)
Granted
Application number
CN201910712338.2A
Other languages
Chinese (zh)
Other versions
CN110324209B (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

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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Debugging And Monitoring (AREA)

Abstract

This disclosure relates to a kind of micro services system monitoring method, apparatus, electronic equipment and computer-readable medium.The micro services system includes multiple micro services units, this method comprises: determining monitoring archive file and its corresponding monitoring configuration file based on the micro services unit;The monitoring archive file is loaded into the engineering of the micro services unit;The initialization of the micro services unit is carried out so that the monitoring archive file loads the monitoring configuration file;And the micro services system passes through micro services unit described in specified monitoring Application Monitoring after loaded.This disclosure relates to micro services system monitoring method, apparatus, electronic equipment and computer-readable medium, enable to micro services system being monitored to the micro services unit that do not registered in registration center with efficient quick.

Description

Micro services system monitoring method, apparatus, electronic equipment and computer-readable medium
Technical field
This disclosure relates to computer information processing field, in particular to a kind of micro services system monitoring method, dress It sets, electronic equipment and computer-readable medium.
Background technique
With the fast development of internet, the system of business group internal is more and more, and business becomes increasingly complex.Single System cannot complete the business demand of company.It needs mutually to call the realization for carrying out finishing service between each system.It is currently popular It is micro services system framework that Distributed Services, which administer frame, specifically may be, for example, Spring Cloud frame.In Spring In Cloud frame, different business department is managed collectively respectively as micro services unit in enterprise group, different micro services Information between unit passes through interface transmission information.Currently, the systematic monitoring information of institute is all in Spring Cloud frame It is that unified monitoring management is carried out by a Spring Boot Admin system.
Because Spring Boot admin monitoring system is can only to monitor to register in the registration of micro services system Micro services unit, the micro services unit for not connecting registration center cannot monitor, and which results in business group internal Multiple micro services units in, it is likely that only some micro services unit for being registered is monitored, does not register Micro services unit is not monitored.Such case results in that new micro services unit every time is online will manual caller It goes to determine whether other not monitored micro services units work normally, the workload of developer increases very much.
This micro services unit for being included in registration center goes to check the healthy shape of connection by Spring Boot admin Condition, the micro services unit for not being included in registration center need to go the case where checking to have the defects that by hand very big.Therefore, it is necessary to one Kind new micro services system monitoring method, apparatus, electronic equipment and computer-readable medium.
Above- mentioned information are only used for reinforcing the understanding to the background of the disclosure, therefore it disclosed in the background technology part It may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
In view of this, the disclosure provides a kind of micro services system monitoring method, apparatus, electronic equipment and computer-readable Jie Matter enables to micro services system can supervising to the micro services unit that do not registered in registration center with efficient quick Control.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure Practice and acquistion.
According to the one side of the disclosure, propose that a kind of micro services system monitoring method, the micro services system include multiple Micro services unit, this method comprises: determining that monitoring archive file and its corresponding monitoring configure text based on the micro services unit Part;The monitoring archive file is loaded into the engineering of the micro services system;Carry out the initialization of the micro services system So that the monitoring archive file loads the monitoring configuration file;And the micro services system passes through after loaded Micro services unit described in specified monitoring Application Monitoring.
In one embodiment, determine that monitoring archive file and its corresponding monitoring configure text based on the micro services unit Part includes: to determine the monitoring archive file and corresponding monitoring configuration file according to the monitoring protocol of the micro services unit; The monitoring protocol includes: HTTP, TELNET, SSH, FTP, SFTP.
In one embodiment, determine that monitoring archive file and its corresponding monitoring configure text based on the micro services unit Further include: the monitoring archive file is stored in the system folder of the micro services system;And/or the monitoring is matched File is set to be stored in the resource folder of the micro services system.
In one embodiment, it includes: logical for the monitoring archive file being loaded into the engineering of the micro services system Cross repair management description file the monitoring archive file is loaded into the engineering of the micro services system.
In one embodiment, the initialization of the micro services system is carried out so that the monitoring archive file loads institute Stating monitoring configuration file includes: the initialization for carrying out the micro services system according to user instructions;It parses during initialization The monitoring configuration file;And the monitoring configuration file after the monitoring archive file load parsing.
In one embodiment, the monitoring configuration file after the monitoring archive file load parsing includes: by solving Target protocol, destination address, target port are obtained in the monitoring configuration file after analysis;And in the monitoring document files Class file the calling to the target port of destination address is realized by the target protocol.
In one embodiment, the micro services system passes through specified monitoring Application Monitoring institute after loaded Stating micro services unit includes: that the monitoring application program journey specified in the micro services system is received by specified interface from described The monitoring information of micro services unit.
In one embodiment, the monitoring application program specified in the micro services system is come from by specified interface receiving The monitoring information of the micro services unit includes: Spring Boot admin application program by inheriting healthindicator The mode of interface class monitors the micro services unit.
In one embodiment, further includes: alarm threshold value is obtained by the monitoring configuration file;And the micro services System is based on the alarm threshold value and is monitored to the micro services unit.
In one embodiment, further includes: obtain modified monitoring configuration file;And by the micro services unit into Row initialization in the micro services system to update the monitoring configuration file.
According to the one side of the disclosure, a kind of micro services system monitoring device is proposed, the micro services system includes multiple Micro services unit, the device include: file module, for determining monitoring archive file and its correspondence based on the micro services unit Monitoring configuration file;Loading module, for the monitoring archive file to be loaded into the engineering of the micro services unit;Just Beginningization module, for carrying out the initialization of the micro services unit so that the monitoring archive file loads the monitoring configuration File;And monitoring module, pass through specified monitoring Application Monitoring institute for the micro services system described after loaded State micro services unit.
According to the one side of the disclosure, a kind of electronic equipment is proposed, which includes: one or more processors; Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, so that one A or multiple processors realize such as methodology above.
According to the one side of the disclosure, it proposes a kind of computer-readable medium, is stored thereon with computer program, the program Method as mentioned in the above is realized when being executed by processor.
According to micro services system monitoring method, apparatus, electronic equipment and the computer-readable medium of the disclosure, pass through monitoring The mode that the micro services unit that archive file and its corresponding monitoring configuration file will not be included in registration center is monitored, can So that micro services system being monitored the micro services unit that do not registered in registration center with efficient quick.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited It is open.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other target, feature and the advantage of the disclosure will It becomes more fully apparent.Drawings discussed below is only some embodiments of the present disclosure, for the ordinary skill of this field For personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of system scenarios frame of micro services system monitoring method and device shown according to an exemplary embodiment Figure.
Fig. 2 is a kind of flow chart of micro services system monitoring method shown according to an exemplary embodiment.
Fig. 3 is a kind of flow chart of the micro services system monitoring method shown according to another exemplary embodiment.
Fig. 4 is a kind of schematic diagram of the micro services system monitoring method shown according to another exemplary embodiment.
Fig. 5 is a kind of block diagram of micro services system monitoring device shown according to an exemplary embodiment.
Fig. 6 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Fig. 7 is that a kind of computer readable storage medium schematic diagram is shown according to an exemplary embodiment.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be real in a variety of forms It applies, and is not understood as limited to embodiment set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will be comprehensively and complete It is whole, and the design of example embodiment is comprehensively communicated to those skilled in the art.Identical appended drawing reference indicates in figure Same or similar part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner In example.In the following description, many details are provided to provide and fully understand to embodiment of the disclosure.However, It will be appreciated by persons skilled in the art that can with technical solution of the disclosure without one or more in specific detail, Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side Method, device, realization or operation are to avoid fuzzy all aspects of this disclosure.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity. I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step, It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
It should be understood that although herein various assemblies may be described using term first, second, third, etc., these groups Part should not be limited by these terms.These terms are to distinguish a component and another component.Therefore, first group be discussed herein below Part can be described as the second component without departing from the teaching of disclosure concept.As used herein, term " and/or " include associated All combinations for listing any of project and one or more.
It will be understood by those skilled in the art that attached drawing is the schematic diagram of example embodiment, module or process in attached drawing Necessary to not necessarily implementing the disclosure, therefore it cannot be used for the protection scope of the limitation disclosure.
Fig. 1 is a kind of system block diagram of micro services system monitoring method and device shown according to an exemplary embodiment.
As shown in Figure 1, system architecture 100 may include micro services cell server 101,102,103, network 104 and micro- Service system micro services system server 105.Network 104 is in service unit server 101,102,103 and micro services system The medium of communication link is provided between system micro services system server 105.Network 104 may include various connection types, such as Wired, wireless communication link or fiber optic cables etc..
User can be used micro services cell server 101,102,103 and pass through network 104 and micro services system server 105 interactions, to receive or send message etc..Various communication visitors can be installed in micro services cell server 101,102,103 The application of family end, such as shopping class application, web browser applications, searching class application, instant messaging tools, mailbox client etc..
Micro services cell server 101,102,103 can be to provide the server of various services, such as provide user Inquiry data provide support background server.Micro services cell server 101 (or 102,103) can be looked into what is received It askes data to carry out the processing such as analyzing, in analysis treatment process, micro services cell server 101 can also for example pass through micro services system System server 105 and micro services cell server 102 or 103 carry out data exchange to generate user response data, and by user Response data feeds back to user.
Micro services system server 105, which can be, provides various services for micro services cell server 101,102,103 Server provides the background server that data are supported for example, between micro services cell server 101,102,103;Micro services system Server 105 of uniting also for example can carry out data monitoring and safety supports to micro services cell server 101,102,103.
The software architecture of micro services is the system organization comprising various tissues, these components include Web server, are answered With server, database, storage, Communication Layer, there are relationships each other or with environment for they.The target of system architecture is to solve interests The focus of relative.In micro services system, it can be called by unified program or platform between different micro services, It can be proceeded as follows before micro services system server 105 is monitored micro services cell server 101,102,103, Wherein micro services system server 105 is referred to as micro services system 105, and micro services cell server 101,102,103 is referred to as Micro services unit 101,102,103:
Monitoring archive file and its corresponding monitoring configuration file are determined based on micro services unit 101 (or 102,103);It will The monitoring archive file is loaded into the engineering of micro services system 105;The initialization of micro services system 105 is carried out so that institute It states monitoring archive file and loads the monitoring configuration file;And micro services system 105 passes through specified prison after loaded Control Application Monitoring micro services unit 101.
Micro services system server 105 also for example can obtain alarm threshold value by the monitoring configuration file;And in incognito Business system 105 is based on the alarm threshold value and is monitored to micro services unit 101.
After the configuration file modification of micro services unit 101, modified monitoring configuration file is obtained;And it will in incognito Business unit 101 is initialized to update the monitoring configuration file in micro services system 105.
Micro services system server 105 and micro services cell server 101,102,103 may each be the clothes of an entity Business device also may be, for example, multiple servers compositions, it should be noted that the provided micro services system monitoring side of the embodiment of the present disclosure Method can be executed by micro services system server 105 and/or micro services cell server 101,102,103, correspondingly, micro services System monitoring device can be set in micro services system server 105 and/or micro services cell server 101,102,103. And the request end for being supplied to user's progress inquiry request input or other request inputs is normally at micro services cell server 101, in 102,103.
According to the micro services system monitoring method and device of the disclosure, matched by monitoring archive file and its corresponding monitoring The mode that the micro services unit for not being included in registration center is monitored by file is set, enables to micro services system efficiently fast Prompt is monitored the micro services unit that do not registered in registration center.
Fig. 2 is a kind of flow chart of micro services system monitoring method shown according to an exemplary embodiment.Micro services system Monitoring method 20 of uniting includes at least step S202 to S208.
As shown in Fig. 2, determining that monitoring archive file and its corresponding monitoring are matched based on the micro services unit in S202 Set file.
In one embodiment, the monitoring archive file and right can be determined according to the monitoring protocol of the micro services unit The monitoring configuration file answered;The monitoring protocol includes: HTTP, TELNET, SSH, FTP, SFTP.
Wherein, http protocol (HyperText Transfer Protocol, hypertext transfer protocol) is answered on internet With a kind of most commonly used network transmission protocol, all WWW files must comply with this standard.HTTP is one and is based on TCP/IP communication agreement transmits data (html file, picture file, query result etc.).
Telnet agreement (remote terminal protocol) is a member in TCP/IP protocol suite, is Internet remote login service Standard agreement and major way.It provides the ability for completing distance host work on the local computer for user.At end It holds and uses telnet program on the computer of user, be connected to server with it.Terminal user can be in telnet program Input order, these orders can be run on the server, just as inputting directly on the console of server.It can be at this Ground just can control server.Telnet is the method for common long-range control Web server.
SSH agreement (Secure Shell, safety shell protocol) is the security protocol established on the basis of application layer.SSH Be it is relatively reliable at present, aim at telnet session and other network services and the agreement of safety be provided.Can have using SSH agreement Effect prevents the information leakage problem in remote management procedures.
Ftp agreement (File Transfer Protocol, File Transfer Protocol) is for passing in the enterprising style of writing part of network Defeated a set of standard agreement, uses Client/Server.It belongs to the application layer of the network transmission protocol.
Sftp agreement (Secure File Transfer Protocol, secure file transportation protocol) can be transmission text Part provides a kind of encryption method of safe network.Sftp and ftp have grammer and function about the same.SFTP is SSH's A portion is a kind of secured fashion for transmitting archives to Blogger servomechanism.SFTP is authenticated using encrypted transmission The data of information and transmission, so, it the use of SFTP is very safe.But since this transmission mode has used encryption/solution Secret skill art, so efficiency of transmission is more much lower than common FTP.
In one embodiment, determine that monitoring archive file and its corresponding monitoring configure text based on the micro services unit Further include: the monitoring archive file is stored in the system folder of the micro services system;And/or the monitoring is matched File is set to be stored in resource (RESOURCE) file of the micro services system.
It can be for example, micro services system A needs to be monitored micro services unit B and micro services unit C, if will be in incognito If business unit B and micro services unit C are monitored, monitoring archive file JAR packet (TK_ can be increased in micro services system A MONITOR.JAR).Increase monitoring configuration file TK_MONITOR.XML in RESOURCE file in micro services system A.
In S204, the monitoring archive file is loaded into the engineering of the micro services unit.It can be for example by repairing Change management description file the monitoring archive file is loaded into the engineering of the micro services system.
Wherein, management description file is POM file, and POM represents item objects model.It is work in Maven it is basic Unit is an XML file.During it is stored in always in the project base directory.POM file includes various configuration informations.POM Also contain target and plug-in unit.In the task of execution or target, Maven will use POM in current directory, be obtained by reading POM To required configuration information, then performance objective.
In S206, the initialization of the micro services unit is carried out so that the monitoring archive file loads the monitoring Configuration file.
In one embodiment, the initialization of the micro services system is carried out so that the monitoring archive file loads institute Stating monitoring configuration file includes: the initialization for carrying out the micro services system according to user instructions;It parses during initialization The monitoring configuration file;And the monitoring configuration file after the monitoring archive file load parsing.
Wherein, the monitoring configuration file after the monitoring archive file load parsing includes: as described in after parsing It monitors and obtains target protocol, destination address, target port in configuration file;And the class file in the monitoring document files is logical The target protocol realization is crossed to the calling of the target port of destination address.
In S208, the micro services system passes through described in specified monitoring Application Monitoring in incognito after loaded Business unit.It can be for example, the monitoring application program journey specified in the micro services system be received by specified interface from described micro- The monitoring information of service unit.
In one embodiment, specifically can be such as: Spring Boot admin application program passes through succession The mode of healthindicator interface class monitors micro services unit.Wherein, Spring Boot Admin be one management and Monitor the application program of the Spring Boot application program in micro services system.These application programs pass through Spring Boot Admin Client (passing through HTTP) registration is found using Spring Cloud (such as Eureka).
For Spring Boot Admin for monitoring the application based on Spring Boot, it is in Spring Boot Succinct visual network Visualization Service is provided on the basis of Actuator.In Spring Boot project, Spring Boot Admin is used as the end Client as the end Server, other applications to be monitored.
In one embodiment, it monitors to have in archive file and realizes the relevant class of healthindicator, Spring Boot admin system can monitor the class for realizing the interface, the monitoring information on micro services unit can be sent out by this class It is sent on Spring Boot admin system interface.In Spring Cloud system, Spring frame is provided to developer One interface, interface class healthindicator, developer can realize the health of oneself by inheriting this interface class Information monitoring.By inheriting this interface, all systems can be included in the monitoring of Spring Boot admin.
In one embodiment, this method further include: alarm threshold value is obtained by the monitoring configuration file;And it is described Micro services system is based on the alarm threshold value and is monitored to the micro services unit.It specifically can be for example, in monitoring configuration file Middle to indicate number of retries with TRIES, REF expression monitors the operation successfully or extremely carried out.It can be set by TRIES label The threshold value of institute's monitoring system.
Because the system for needing additionally to monitor in systems has very much, cannot each monitoring will write one Healthindicator realizes class to realize health monitoring, in disclosed method, configures all need by a configuration class The service to be monitored is monitored, and can be included in enterprise group's content micro services unit by customized mode In Spring Cloud monitoring system.
It will be clearly understood that the present disclosure describes how to form and use particular example, but the principle of the disclosure is not limited to These exemplary any details.On the contrary, the introduction based on disclosure disclosure, these principles can be applied to many other Embodiment.
Fig. 3 is a kind of flow chart of the micro services system monitoring method shown according to another exemplary embodiment.Shown in Fig. 3 Process 30 be to S206 in process shown in Fig. 2 " carry out the initialization of the micro services unit so that the monitoring file The detailed description of the file load monitoring configuration file ",
As shown in figure 3, carrying out the initialization of the micro services system according to user instructions in S302.Wherein, in system Two files can be increased when configuring customized monitoring, be respectively as follows: TK_MONITOR.JAR and TK_MONITOR.XML.If The agreement of monitoring needs additionally to increase corresponding agreement jar file into engineering when being SSH/FTP/SFTP agreement.
In S304, the monitoring configuration file is parsed during initialization.In one embodiment, monitoring configuration text Part can be divided into two parts, as follows:
First layer are as follows:<sERVICES></SERVICES>
This layer is the essential information for saving all monitoring systems, concretely: a SERVICES corresponds to multiple SERVICE, a SERVICE correspond to multiple INSTANCE.
The essential information of<SERVICE NAME=" TKJY ">this tag representation one engineering for needing access to monitor, NAME indicates name.
<INSTANCE IP=" " PORT=" " TYPE=" " TRIES=" " REF=" ">this tag representation engineering is needed The example to be monitored.
IP indicates the IP address that this server needs to monitor, and PORT represents the port for needing to connect, and TYPE indicates monitoring Mode.TRIES indicates number of retries, and REF expression monitors the operation successfully or extremely carried out.
The threshold value of institute's monitoring system can be set by TRIES label.
The TYPE monitor mode supported now includes five kinds, HTTP, TELNET, SSH, FTP, SFTP.
REF includes two classes, the information of system transmission system default when for NORMAL when, including the configuration item in file (IP PORT TYPE), can be by<BEANS>label come customized monitoring when system default information is unsatisfactory for requiring Operation.
The second layer are as follows:<bEAN></BEANS>
A kind of each customized policer operation of<BEAN>tag representation, NAME indicate the title of the operation, and CLASS is indicated The corresponding class of the operation.
Specific policer operation can be set in<SERVICE>label by REF field.Value inside REF is The value of NAME in BEAN label.
In S306, by obtaining target protocol, destination address, target port in the monitoring configuration file after parsing. Wherein, TK_MONITOR.JAR needs to be loaded into engineering, and the JAR packet is loaded into system by modification POM file.
TK_MONITOR.XML file can pass through XML correlation JAR Packet analyzing.It may determine that the clothes by TYPE note Which kind of protocol monitor business needs.It can be for example, the service for passing through SERVICE entitled " TKJY " known to parsing.IP be 127.0.0.1, The service of 80 ports needs to call by TELNET agreement.At this time corresponding class passes through in TK_MONITOR.JAR TELNET agreement calls relevant interface monitoring system.
In S308, the class file in the monitoring document files realizes the mesh to destination address by the target protocol Mark the calling of port.
Wherein, configuration file are as follows: TK_MONITOR.XML, TK_MONITOR.XML are by right in TK_MONITOR.JAR File is answered to load, the content of load can be placed in JVM.
The path of configuration file are as follows: in the SRC/RESOURCES file in engineering.
The TK_ in RESOURCES file can be loaded in TK_MONITOR.JAR during system initialization MONITOR.XML file;The monitoring that TK_MONITOR.XML is configured after starting will bring SPRINGCLOUD monitoring body into In system.
The relevant class of healthindicator, Spring Boot admin are realized because having in TK_MONITOR.JAR System can monitor the class for realizing the interface, monitoring information can be sent to SPRINGBOOTADMIN system by this class On interface.
Wherein, if having modified the relevant configuration file of TK_MONITOR.XML needs to restart system to parse XML again Configuration file.This movement is the completion in system starting.It just can be new system loads into monitoring after starting.
Fig. 4 is a kind of schematic diagram of the micro services system monitoring method shown according to another exemplary embodiment.Such as Fig. 4 institute Show, if certain China National Investment & Guaranty Corp., group company plateform system will go up sequence of threads and his associated system and there are 4, difference is as follows:
Short message center system has been included in registration center's management
Rule engine system has been included in registration center's management
Home management system is not included in registration center's management
Doctor system is not included in registration center's management
Currently, short message center system, rule engine system can be seen after platform program of insuring is online by monitor supervision platform The service condition of two systems, home management system and doctor system need developer that caller judgement is gone to connect by hand It is no correct.
If home system, doctor system are included in Spring Boot admin monitoring management to need in platform of insuring Increase monitoring JAR packet (TK_MONITOR.JAR) in system.Increase configuration file TK_ in platform RESOURCE file of insuring MONITOR.XML。
Wherein, home, doctor system information are as follows:
System name IP Port Connection type
Home 10.127.9.1 21 SSH
Home 10.127.9.1 22 FTP
Doctor 10.127.9.2 23 SFTP
Doctor 10.127.9.2 8080 HTTP
In one embodiment, it is operated if necessary to doctor system using customized monitoring alarm, customized class is TK_OPERATOR.JAVA.Information more than can passing through configures TK_MONITOR.XML.
In one embodiment, the program of XML file parsing needs to break into a JAR packet, each to need to access the function System need to introduce this JAR packet, the form that XML file needs to be arranged to configuration file is placed in each system.
According to the micro services system monitoring method of the disclosure, solves not homologous ray and need through different modes to system The problem of health degree checks;The system for not being included in registration center can be simply accessed by configuration file, system zero is invaded;Make Online implementing, the monitoring for obtaining entire micro services system are more convenient.
It will be appreciated by those skilled in the art that realizing that all or part of the steps of above-described embodiment is implemented as being executed by CPU Computer program.When the computer program is executed by CPU, above-mentioned function defined by the above method that the disclosure provides is executed Energy.The program can store in a kind of computer readable storage medium, which can be read-only memory, magnetic Disk or CD etc..
Further, it should be noted that above-mentioned attached drawing is only the place according to included by the method for disclosure exemplary embodiment Reason schematically illustrates, rather than limits purpose.It can be readily appreciated that above-mentioned processing shown in the drawings is not indicated or is limited at these The time sequencing of reason.In addition, be also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 5 is a kind of block diagram of micro services system monitoring device shown according to an exemplary embodiment.As shown in figure 5, Micro services system monitoring device 50 includes: file module 502, loading module 504, initialization module 506, monitoring module 508.
File module 502 is used to determine that monitoring archive file and its corresponding monitoring configure text based on the micro services unit Part;Wherein, the monitoring archive file and corresponding monitoring configuration can be also determined according to the monitoring protocol of the micro services unit File;The monitoring protocol includes: HTTP, TELNET, SSH, FTP, SFTP.
Loading module 504 is for the monitoring archive file to be loaded into the engineering of the micro services unit;It can be such as It manages description file by modification the monitoring archive file is loaded into the engineering of the micro services system.
Initialization module 506 is used to carry out the initialization of the micro services unit so that the monitoring archive file loads The monitoring configuration file;
In one embodiment, the initialization of the micro services system is carried out so that the monitoring archive file loads institute Stating monitoring configuration file includes: the initialization for carrying out the micro services system according to user instructions;It parses during initialization The monitoring configuration file;And the monitoring configuration file after the monitoring archive file load parsing.
Monitoring module 508 is used for the micro services system after loaded and passes through specified monitoring Application Monitoring institute State micro services unit.It can be for example, the monitoring application program journey specified in the micro services system be come from by specified interface receiving The monitoring information of the micro services unit.
In one embodiment, specifically can be such as: Spring Boot admin application program passes through succession The mode of healthindicator interface class monitors the micro services unit.
According to the micro services system monitoring device of the disclosure, pass through monitoring archive file and its corresponding monitoring configuration file The mode that the micro services unit for not being included in registration center is monitored enables to micro services system can be with pair of efficient quick It is not monitored in the micro services unit that registration center is registered.
Fig. 6 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
The electronic equipment 200 of this embodiment according to the disclosure is described referring to Fig. 6.The electronics that Fig. 6 is shown Equipment 200 is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 200 is showed in the form of universal computing device.The component of electronic equipment 200 can wrap It includes but is not limited to: at least one processing unit 210, at least one storage unit 220, (including the storage of the different system components of connection Unit 220 and processing unit 210) bus 230, display unit 240 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 210 Row, so that the processing unit 210 executes described in this specification above-mentioned electronic prescription circulation processing method part according to this The step of disclosing various illustrative embodiments.For example, the processing unit 210 can be executed such as Fig. 2, walked shown in Fig. 3 Suddenly.
The storage unit 220 may include the readable medium of volatile memory cell form, such as random access memory Unit (RAM) 2201 and/or cache memory unit 2202 can further include read-only memory unit (ROM) 2203.
The storage unit 220 can also include program/practical work with one group of (at least one) program module 2205 Tool 2204, such program module 2205 includes but is not limited to: operating system, one or more application program, other programs It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 230 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures Local bus.
Electronic equipment 200 can also be with one or more external equipments 300 (such as keyboard, sensing equipment, bluetooth equipment Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 200 communicate, and/or with make Any equipment (such as the router, modulation /demodulation that the electronic equipment 200 can be communicated with one or more of the other calculating equipment Device etc.) communication.This communication can be carried out by input/output (I/O) interface 250.Also, electronic equipment 200 can be with By network adapter 260 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, Such as internet) communication.Network adapter 260 can be communicated by bus 230 with other modules of electronic equipment 200.It should Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 200, including but unlimited In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server or network equipment etc.) executes the above method according to disclosure embodiment.
Fig. 7 schematically shows a kind of computer readable storage medium schematic diagram in disclosure exemplary embodiment.
Refering to what is shown in Fig. 7, describing the program product for realizing the above method according to embodiment of the present disclosure 400, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device, Such as it is run on PC.However, the program product of the disclosure is without being limited thereto, in this document, readable storage medium storing program for executing can be with To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with any combination of one or more programming languages come write for execute the disclosure operation program Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by one When the equipment executes, so that the computer-readable medium implements function such as: determining monitoring filing based on the micro services unit File and its corresponding monitoring configuration file;The monitoring archive file is loaded into the engineering of the micro services unit;Into The initialization of the row micro services unit is so that the monitoring archive file loads the monitoring configuration file;And it is loading After the micro services system pass through micro services unit described in specified monitoring Application Monitoring.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed in device according to the description of embodiment, it can also Uniquely it is different from one or more devices of the present embodiment with carrying out corresponding change.The module of above-described embodiment can be merged into One module, can also be further split into multiple submodule.
By the description of above embodiment, those skilled in the art is it can be readily appreciated that example embodiment described herein It can also be realized in such a way that software is in conjunction with necessary hardware by software realization.Therefore, implemented according to the disclosure The technical solution of example can be embodied in the form of software products, which can store in a non-volatile memories In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) or on network, including some instructions are so that a calculating equipment (can To be personal computer, server, mobile terminal or network equipment etc.) it executes according to the method for the embodiment of the present disclosure.
It is particularly shown and described the exemplary embodiment of the disclosure above.It should be appreciated that the present disclosure is not limited to Detailed construction, set-up mode or implementation method described herein;On the contrary, disclosure intention covers included in appended claims Various modifications and equivalence setting in spirit and scope.
In addition, structure shown by this specification Figure of description, ratio, size etc., only to cooperate specification institute Disclosure, for skilled in the art realises that be not limited to the enforceable qualifications of the disclosure with reading, therefore Do not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the disclosure Under the technical effect and achieved purpose that can be generated, it should all still fall in technology contents disclosed in the disclosure and obtain and can cover In the range of.Meanwhile cited such as "upper" in this specification, " first ", " second " and " one " term, be also only and be convenient for Narration is illustrated, rather than to limit the enforceable range of the disclosure, relativeness is altered or modified, without substantive change Under technology contents, when being also considered as the enforceable scope of the disclosure.

Claims (10)

1. a kind of micro services system monitoring method, the micro services system includes multiple micro services units, which is characterized in that packet It includes:
Monitoring archive file and its corresponding monitoring configuration file are determined based on the micro services unit;
The monitoring archive file is loaded into the engineering of the micro services system;
The initialization of the micro services system is carried out so that the monitoring archive file loads the monitoring configuration file;And
The micro services system passes through micro services unit described in specified monitoring Application Monitoring after loaded.
2. the method as described in claim 1, which is characterized in that based on the micro services unit determine monitoring archive file and its Corresponding monitoring configuration file includes:
The monitoring archive file and corresponding monitoring configuration file are determined according to the monitoring protocol of the micro services unit.
3. method according to claim 2, which is characterized in that based on the micro services unit determine monitoring archive file and its Corresponding monitoring configuration text further include:
The monitoring archive file is stored in the system folder of the micro services system;And/or
The monitoring configuration file is stored in the resource folder of the micro services system.
4. the method as described in claim 1, which is characterized in that carry out the initialization of the micro services system so that the prison Control archive file loads the monitoring configuration file
The initialization of the micro services system is carried out according to user instructions;
The monitoring configuration file is parsed during initialization;And
The monitoring configuration file after the monitoring archive file load parsing.
5. the method as described in claim 1, which is characterized in that the micro services system passes through specified prison after loaded Controlling micro services unit described in Application Monitoring includes:
The monitoring application program journey specified in the micro services system is received by specified interface from the micro services unit Monitoring information.
6. the method as described in claim 1, which is characterized in that further include
Alarm threshold value is obtained by the monitoring configuration file;And
The micro services system is based on the alarm threshold value and is monitored to the micro services unit.
7. the method as described in claim 1, which is characterized in that further include:
Obtain modified monitoring configuration file;And
The micro services system is initialized to update the monitoring configuration file in the micro services system.
8. a kind of micro services system monitoring device, the micro services system includes multiple micro services units, which is characterized in that packet It includes:
File module, for determining monitoring archive file and its corresponding monitoring configuration file based on the micro services unit;
Loading module, for the monitoring archive file to be loaded into the engineering of the micro services unit;
Initialization module, for carrying out the initialization of the micro services unit so that the monitoring archive file loads the prison Control configuration file;And
Monitoring module passes through described in specified monitoring Application Monitoring in incognito for the micro services system described after loaded Business unit.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now method as described in any in claim 1-7.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor The method as described in any in claim 1-7 is realized when row.
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 true CN110324209A (en) 2019-10-11
CN110324209B 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)

Cited By (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
CN111158987A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Health check method and device of micro-service architecture
WO2022193979A1 (en) * 2021-03-16 2022-09-22 易保网络技术(上海)有限公司 Microservice development method and system, and computer device and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713420A (en) * 2016-11-30 2017-05-24 国网北京市电力公司 Monitoring deployment method and device
CN106951357A (en) * 2017-05-10 2017-07-14 焦点科技股份有限公司 A kind of server end application issue monitoring method and device based on finger daemon
CN106991035A (en) * 2017-04-06 2017-07-28 北京计算机技术及应用研究所 A kind of Host Supervision System based on micro services framework
US20180088935A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Microservices application configuration based on runtime environment
CN108206852A (en) * 2016-12-20 2018-06-26 杭州华为数字技术有限公司 A kind of dialogue-based Service Instance management method and equipment under micro services frame
CN108512689A (en) * 2017-12-15 2018-09-07 中国平安财产保险股份有限公司 Micro services business monitoring method and server
US20180295045A1 (en) * 2017-04-06 2018-10-11 At&T Intellectual Property I, L.P. Network service assurance system
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

Patent Citations (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
CN106713420A (en) * 2016-11-30 2017-05-24 国网北京市电力公司 Monitoring deployment method and device
CN108206852A (en) * 2016-12-20 2018-06-26 杭州华为数字技术有限公司 A kind of dialogue-based Service Instance management method and equipment under micro services frame
CN106991035A (en) * 2017-04-06 2017-07-28 北京计算机技术及应用研究所 A kind of Host Supervision System based on micro services framework
US20180295045A1 (en) * 2017-04-06 2018-10-11 At&T Intellectual Property I, L.P. Network service assurance system
CN106951357A (en) * 2017-05-10 2017-07-14 焦点科技股份有限公司 A kind of server end application issue monitoring method and device based on finger daemon
CN108512689A (en) * 2017-12-15 2018-09-07 中国平安财产保险股份有限公司 Micro services business 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

Cited By (4)

* 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
CN111158987A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Health check method and device of micro-service architecture
CN111158987B (en) * 2019-12-31 2023-09-19 中国银行股份有限公司 Health check method and device for micro-service architecture
WO2022193979A1 (en) * 2021-03-16 2022-09-22 易保网络技术(上海)有限公司 Microservice development method and system, and computer device and medium

Also Published As

Publication number Publication date
CN110324209B (en) 2020-10-09

Similar Documents

Publication Publication Date Title
US9779252B2 (en) Crowd-sourced security analysis
Lampkin et al. Building smarter planet solutions with mqtt and ibm websphere mq telemetry
US20080126406A1 (en) Complexity management tool
CN112119374A (en) Selectively providing mutual transport layer security using alternate server names
Laan IT Infrastructure Architecture-Infrastructure Building Blocks and Concepts Third Edition
CN105493099A (en) Cryptographically attested resources for hosting virtual machines
EP3391616A2 (en) Device management with tunneling
CN110324209A (en) Micro services system monitoring method, apparatus, electronic equipment and computer-readable medium
CN109347855A (en) Data access method, device, system, Electronic Design and computer-readable medium
WO2017193074A1 (en) Script manager for distributed systems
WO2015167587A1 (en) Determining application deployment recommendations
CN109522751A (en) Access right control method, device, electronic equipment and computer-readable medium
Cholia et al. The NEWT platform: an extensible plugin framework for creating ReSTful HPC APIs
CN108055298A (en) For the method and device of control message queue
CN114726650B (en) Task request processing method and device, electronic equipment and computer readable medium
US11418573B1 (en) File transfer abstraction on a computer network
CN107368339A (en) Container entrance program operating method, system, equipment and storage medium
CN109460363A (en) Automated testing method, device, electronic equipment and computer-readable medium
CN114416169A (en) Data processing method, medium, device and computing equipment based on micro front end
US10462205B2 (en) Providing modifies protocol responses
Dubey et al. Amazon Web Services: the Definitive Guide for Beginners and Advanced Users
CN115242422A (en) Data intercommunication processing method and device and information management system
WO2022119929A1 (en) Systems and methods for administrating a federated learning network
Sato Devops in Practice: Reliable and automated software delivery
CN110659260A (en) Big data ecosystem construction method and device based on tetramerization idea

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