CN109960634A - A kind of method for monitoring application program, apparatus and system - Google Patents

A kind of method for monitoring application program, apparatus and system Download PDF

Info

Publication number
CN109960634A
CN109960634A CN201910255968.1A CN201910255968A CN109960634A CN 109960634 A CN109960634 A CN 109960634A CN 201910255968 A CN201910255968 A CN 201910255968A CN 109960634 A CN109960634 A CN 109960634A
Authority
CN
China
Prior art keywords
application program
monitoring
pod
mark
application
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
CN201910255968.1A
Other languages
Chinese (zh)
Other versions
CN109960634B (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.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies 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 New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201910255968.1A priority Critical patent/CN109960634B/en
Publication of CN109960634A publication Critical patent/CN109960634A/en
Application granted granted Critical
Publication of CN109960634B publication Critical patent/CN109960634B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3017Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is implementing multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system

Abstract

The invention discloses a kind of method for monitoring application program, apparatus and system, wherein, the monitoring method of the application program is applied to host, the host includes at least one Pod, Pod includes at least two containers, one at least two containers is deployed with Application Agent, other containers at least two containers dispose at least one application program respectively, this method comprises: the Pod of the port-mark and its locating Pod that obtain each application program is identified;The inquiry mark of each application program is generated according to port-mark and corresponding Pod mark;Send inquiry mark.By implementing the present invention, realize the unique identification to application program, when the IP address of application program changes or multiple application departments are deployed on same container, the mark of inquiry corresponding to each application program will not change, and can judge whether each application program is monitored by the uniqueness of inquiry mark.

Description

A kind of method for monitoring application program, apparatus and system
Technical field
The present invention relates to field of computer technology, and in particular to a kind of method for monitoring application program, apparatus and system.
Background technique
It is more next with the prevalence of micro services framework, Kubernetes open source arrangement software (abbreviation k8s) and container technique More systems is managed using container cluster, disposed, the Component service of operating system.Monitoring system is as entire safety fortune Part and parcel in dimension management, needs to be monitored the application program disposed in container, be applied in program operation process Various achievement datas, to find application failure in time and provide data basis for the solution of application failure.
Currently, traditional application program monitoring system is all out of band supervision, i.e., various applications are acquired by various agreements Various achievement datas.Since existing application monitoring system is usually to be managed using management IP, it is only applicable to have Have fixed static IP applies monitoring scene, can be with Pod for the application program in the container of management operating in container cluster The access IP for rescheduling (such as Pod migrate or break down re-creates scene) application program also can dynamically change, if adopted With traditional Application Monitoring mode, what is monitored will interrupt using monitoring, and be deployed on together in multiple application departments When in one container, traditional Application Monitoring mode can not also be distinguished each application program, it is difficult to using journey Whether sequence, which has been monitored, is accurately judged, and then affects the performance of entire monitoring system, it is difficult to meet safe O&M The requirement of management.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of method for monitoring application program, apparatus and system, it is existing to solve The problem whether accurate judgement application program has been monitored is difficult in technology.
According in a first aspect, being applied to host, the master the embodiment of the invention provides a kind of method for monitoring application program Machine includes at least one Pod, and the Pod includes at least two containers, and one at least two container is deployed with application Programmatic agent, other containers at least two container dispose at least one application program respectively, which comprises obtain The Pod of the port-mark and its locating Pod that take each application program is identified;According to the port-mark and corresponding Pod Mark generates the inquiry mark of each application program;Send the inquiry mark.
Method for monitoring application program provided in an embodiment of the present invention passes through the port-mark of application program and Pod locating for it Pod identify inquiry generated and identify, realize the unique identification to application program, become in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change, can Judge whether each application program is monitored with the uniqueness by inquiry mark.
Optionally, method for monitoring application program further include: send connectivity verification message;It receives for obtaining data to be monitored Acquisition instruction;The data to be monitored are sent according to the acquisition instruction.
According to second aspect, the embodiment of the invention provides a kind of method for monitoring application program, are applied to host, the master Machine includes at least one Pod, and one of at least one described Pod is deployed with monitoring server agency, the monitoring server agency Monitor at least one Application Agent, which comprises the inquiry mark that the Application Agent is sent is received, it is described Inquiry mark is identified as the Pod of the port-mark of each application program and Pod locating for it and is generated;Send the inquiry mark.
Method for monitoring application program provided in an embodiment of the present invention, by receiving port-mark and its institute by application program The Pod for locating Pod identifies inquiry mark generated, the unique identification to application program is realized, in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change Become, can judge whether each application program is monitored by the uniqueness of inquiry mark.
Optionally, method for monitoring application program further include: receive connectivity verification message;Send connectivity verification message;It receives For obtaining the acquisition instruction of data to be monitored;Send the acquisition instruction;It receives and sends the data to be monitored.
According to the third aspect, the embodiment of the invention provides a kind of method for monitoring application program, are applied to monitoring server, The described method includes: receiving the inquiry mark that monitoring server agency sends, the mark of inquiring is by the end of each application program The Pod of mouth mark and its locating Pod, which are identified, to be generated;Judge whether the application program is monitored according to inquiry mark.
Method for monitoring application program provided in an embodiment of the present invention, by receiving port-mark and its institute by application program The Pod for locating Pod identifies inquiry mark generated, the unique identification to application program is realized, in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change Become, can judge whether each application program is monitored by the uniqueness of inquiry mark, so that being monitored to application program It is more convenient to manage.
Optionally, when the application program is not monitored, the application program is monitored.
Method for monitoring application program provided in an embodiment of the present invention, it is not corresponding in the inquiry code for judging the application program When monitoring data, it is not yet monitored to judge the application program, to correctly identify not monitored application program, and to its into Row monitoring.
Optionally, method for monitoring application program further include: receive connectivity verification message, and according to the connectivity verification message The determining connection status with Application Agent;When the connection status is connected state, sends and obtain data to be monitored Acquisition instruction;Data to be monitored are received, and the data to be monitored are monitored.
Optionally, the method also includes: monitor monitoring server agency;Judging the monitoring server agency is No appearance is abnormal;When the monitoring server occurs abnormal, starts spare monitoring server and the monitoring server is acted on behalf of At least Application Agent monitored is monitored.
Method for monitoring application program provided in an embodiment of the present invention is acted on behalf of by the way that spare monitoring server is arranged, is being monitored When server agent occurs abnormal, spare monitoring server agency can be automatically switched to, method for monitoring application program is improved Practicability, avoid since monitoring server proxy exception causes the problem of can not being monitored to application program.
According to fourth aspect, the embodiment of the invention provides a kind of Application Monitoring devices, are applied to host, it is described Host includes at least one Pod, and the Pod includes at least two containers, and one at least two container is deployed with and answers With programmatic agent, other containers at least two container dispose at least one application program respectively, and described device includes: Acquiring unit, for obtaining the port-mark of each application program and the Pod mark of Pod locating for it;Processing unit is used for The inquiry mark of each application program is generated according to the port-mark and corresponding Pod mark;First transmission unit is used It is identified in sending the inquiry.
Application Monitoring device provided in an embodiment of the present invention passes through the port-mark of application program and Pod locating for it Pod identify inquiry generated and identify, realize the unique identification to application program, become in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change, can Judge whether each application program is monitored with the uniqueness by inquiry mark.
According to the 5th aspect, the embodiment of the invention provides a kind of Application Monitoring devices, are applied to host, the master Machine includes at least one Pod, and one of at least one described Pod is deployed with monitoring server agency, the monitoring server agency At least one Application Agent is monitored, described device includes: the first receiving unit, for receiving the Application Agent hair The inquiry mark sent, the inquiry mark is identified as the Pod of the port-mark of each application program and Pod locating for it to be generated;The Two transmission units, for sending the inquiry mark.
Application Monitoring device provided in an embodiment of the present invention, by receiving port-mark and its institute by application program The Pod for locating Pod identifies inquiry mark generated, the unique identification to application program is realized, in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change Become, can judge whether each application program is monitored by the uniqueness of inquiry mark.
According to the 6th aspect, the embodiment of the invention provides a kind of Application Monitoring devices, are applied to monitoring server, Described device includes: the second receiving unit, the inquiry mark sent for receiving monitoring server agency, the inquiry identify by The Pod of the port-mark of each application program and its locating Pod, which are identified, to be generated;Judging unit, for being identified according to the inquiry Judge whether the application program is monitored.
Application Monitoring device provided in an embodiment of the present invention, by receiving port-mark and its institute by application program The Pod for locating Pod identifies inquiry mark generated, the unique identification to application program is realized, in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change Become, can judge whether each application program is monitored by the uniqueness of inquiry mark, so that being monitored to application program It is more convenient to manage.
According to the 7th aspect, the embodiment of the invention provides a kind of application program monitoring systems, comprising: described in fourth aspect Application Monitoring device, the 5th aspect described in Application Monitoring device and the 6th aspect described in Application Monitoring Device.
According to eighth aspect, the embodiment of the invention provides a kind of application program monitoring systems, comprising: at least one first Host, first host include at least one Pod, and the Pod includes at least two containers, at least two container One is deployed with Application Agent, other containers at least two container are deployed at least one using journey respectively The Pod of sequence, port-mark and its locating Pod that first host is used to obtain each application program is identified;According to institute It states port-mark and corresponding Pod mark generates the inquiry mark of each application program;At least one second host, it is described Second host includes at least one Pod, and one of at least one described Pod is deployed with monitoring server agency, the monitoring service At least one Application Agent of device agent monitors, second host are used to receive the inquiry that the Application Agent is sent Mark;Monitoring server judges institute according to inquiry mark for receiving the transmitted inquiry mark of monitoring server agency State whether application program is monitored.
Application program monitoring system provided in an embodiment of the present invention passes through the port-mark of application program and Pod locating for it Pod identify inquiry generated and identify, realize the unique identification to application program, become in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change, should The function of judging whether each application program is monitored by the uniqueness of inquiry mark is realized with Program Monitoring System.
Optionally, the monitoring server is deployed in outside cluster belonging to first host and second host.
Application program monitoring system provided in an embodiment of the present invention, by the way that monitoring server is deployed in outside cluster, so that Monitoring server can be communicated directly with monitoring server agency, so as to avoid due to being opened regular mistake by firewall More limitation, so that leading to not the problem of being monitored to application program with progress data communication complexity outside cluster in cluster.
According to the 9th aspect, the embodiment of the invention provides a kind of application program monitoring systems, comprising: multiple main frames, institute It states multiple main frames and is deployed at least one Application Agent and at least one monitoring server agency, the monitoring server generation Manage the data to be monitored of at least application program for receiving the Application Agent monitoring;Monitoring server is located at institute It states outside cluster belonging to multiple main frames, for receiving the number to be monitored for the application program that the monitoring server agency sends According to.
Application program monitoring system provided in an embodiment of the present invention, by the way that monitoring server is deployed in outside cluster, so that Monitoring server can be communicated directly with monitoring server agency, so as to avoid due to being opened regular mistake by firewall More limitations, so that lead to not the problem of being monitored to application program with progress data communication complexity outside cluster in cluster, Realize the purpose being monitored to the data to be monitored of application program in cluster.
Optionally, the monitoring server agency is also used to receive the inquiry mark that the Application Agent is sent, institute Inquiry mark is stated to be generated as the Pod of the port-mark of each application program and Pod locating for it mark;The monitoring server is also used It is identified in receiving the inquiry that the monitoring server agency sends.
Application program monitoring system provided in an embodiment of the present invention passes through the port-mark of application program and Pod locating for it Pod identify inquiry generated and identify, realize the unique identification to application program, become in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change, should The function of judging whether each application program is monitored by the uniqueness of inquiry mark is realized with Program Monitoring System.
According to the tenth aspect, the embodiment of the invention provides a kind of electronic equipment, comprising: memory and processor, it is described Connection is communicated with each other between memory and the processor, computer instruction is stored in the memory, and the processor is logical It crosses and executes the computer instruction, thereby executing first aspect, second aspect or the third aspect or its any one optional reality Apply method for monitoring application program described in mode.
On the one hand according to the tenth, the embodiment of the invention provides a kind of computer readable storage medium, the computer can It reads storage medium and stores computer instruction, the computer instruction is for making the computer execute first aspect, second aspect Or method for monitoring application program described in the third aspect or its any one optional embodiment.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those of ordinary skill in the art, before not making the creative labor It puts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of method for monitoring application program according to an embodiment of the present invention;
Fig. 2 is the flow chart of another method for monitoring application program according to an embodiment of the present invention;
Fig. 3 is the flow chart of another method for monitoring application program according to an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of application program monitoring system of the embodiment of the present invention;
Fig. 4 A is a kind of Application Monitoring interaction schematic diagram according to an embodiment of the present invention;
Fig. 4 B is that another application program according to an embodiment of the present invention monitors interaction schematic diagram;
Fig. 4 C is a kind of another structural schematic diagram of application program monitoring system of the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of another application program monitoring system of the embodiment of the present invention;
Fig. 6 is the structural schematic diagram of the kind Application Monitoring device of the embodiment of the present invention;
Fig. 7 is the structural schematic diagram of another Application Monitoring device of the embodiment of the present invention;
Fig. 8 is the structural schematic diagram of another Application Monitoring device of the embodiment of the present invention;
Fig. 9 is a kind of another structural schematic diagram of application program monitoring system of the embodiment of the present invention;
Figure 10 is the structural schematic diagram of a kind of electronic equipment of the embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those skilled in the art are not having Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
As long as technical characteristic involved in invention described below different embodiments does not constitute punching each other It is prominent to be combined with each other.
Embodiment 1
In embodiment provided by the present invention, applied container cluster is based on Kubernetes open source arrangement software It realizes the creation of container cluster, i.e., is illustrated for k8s container cluster.
In k8s cluster, multiple main frames are generally comprised, it is k8s collection that operation, which has multiple Pod, Pod, on each host The basic operation unit of group, a Pod are made of a container or multiple containers, and the container that Pod includes operates in same host On, using identical networking command space, IP address and port, it can find and communicate by local host between each other, also One piece of storage volume space can be shared, the application in same Pod is it can be seen that mutual process, can also use systemVipc Or posix message queue is communicated.
Fig. 1 shows a kind of flow chart of method for monitoring application program according to an embodiment of the present invention.This method is applied to Host in above-mentioned k8s cluster, the host include at least one Pod, and Pod includes at least two containers, at least two containers One be deployed with Application Agent, other containers at least two containers dispose at least one application program respectively, should Method can be used for being monitored each application program in container cluster, as shown in Figure 1, this method comprises the following steps:
S101: the Pod of port-mark and its locating Pod that Application Agent obtains each application program is identified.
Specifically, it is created in k8s, scheduling and the minimum unit managed are exactly Pod.In practical applications, in k8s cluster The network-driven of container can be configured to overlay network, with solve the problems, such as each container across main-machine communication, can be cluster In all nodes plan again IP address using rule, so that the Pod on different nodes is obtained " and belong to an Intranet " And the unduplicated " IP address of ", and the container belonged on different nodes can directly be communicated by Intranet IP, which is It is identified for above-mentioned Pod, Pod mark is distributed unitedly by k8s cluster, and Pod mark will not conflict in the same k8s cluster.Respectively A application department is deployed on the port-mark in corresponding container with oneself, such as: it is deployed in same Pod and is identified as in Pod1 The port-mark of two application programs Tomcat1 and Tomcat2 be respectively JMX:9001 and JMX:9002.
Thus, the port-mark and application program of each application program in the available same pod of Application Agent Act on behalf of the Pod mark of locating Pod.
S102: Application Agent generates the inquiry mark of each application program according to port-mark and corresponding Pod mark Know.
Specifically, since the mark of each Pod in k8s cluster is different from, the application disposed in the same Pod Program has different port-marks, therefore can identify and give birth to the Pod of Pod where it according to the port-mark of the application program At unique inquiry mark in the cluster.It can not be distinguished so as to solve multiple identical applications in the same Pod The problem of.
In practical applications, inquiry mark can be constructed as Universally Unique Identifier (Universally Unique Identifier, abbreviation UUID code), such as: the UUID code of the above-mentioned application program Tomcat1 being deployed in Pod1 are as follows: Tomcat-5fd98dbf5f, it should be noted that in practical applications, the generating process of above-mentioned inquiry mark can also lead to Other modes realization is crossed, such as: the port-mark of application program and Pod mark are merged into composition inquiry mark, the present invention It is not limited thereto.
S103: Application Agent sends inquiry mark.
In practical applications, Application Agent passes through application program generation for being deployed in same Pod with the application department Above-mentioned inquiry mark is sent to the recipient for monitoring the application program by reason.
In addition, in the present invention by by Application Agent and application deployment in the same Pod, application program generation Reason only monitors application port corresponding to the application program inside same pod when being monitored to application program, without The all of the port of Pod is all exposed to external monitoring server, to ensure that the safety of safe operation management.
S101 passes through application to step 103, method for monitoring application program provided in an embodiment of the present invention through the above steps The Pod of the port-mark of program and its locating Pod identify inquiry mark generated, realize unique mark to application program Know, when the IP address of application program changes or multiple application departments are deployed on same container, each application program institute Corresponding inquiry mark will not change, and can pass through the uniqueness of inquiry mark during being monitored to application program Judge whether application program is monitored.
In the present embodiment, it after the application program acted on behalf of to Application Agent is monitored, needs to application program Agency, which carries out management of monitor, can be acted on behalf of to monitoring server by monitoring server and be registered after Application Agent starting, Monitoring of the monitoring server to the Application Agent is opened, specifically, as shown in Figure 4 B, may include steps of:
S104: Application Agent sends connectivity verification message.In the present embodiment, connectivity verification message is answered for verifying With the connection status between programmatic agent and monitoring server, specifically, verifying message can be heartbeat message, application program generation Reason can be acted on behalf of periodically to monitoring server and send heartbeat message, and heartbeat message is forwarded to monitoring by monitoring server agency Server, monitoring server can be by whether receive the determining connected state with Application Agent of heartbeat message.
S105: Application Agent receives the acquisition instruction for obtaining data to be monitored.
Monitoring server determines the need for obtaining monitoring data according to the connection status with Application Agent.Specifically , when monitoring server is more than that preset duration is not received by heartbeat message, it is determined that monitoring server and application program generation Communication abnormality between reason;When receiving heartbeat message in preset duration, then monitoring server and application program can be determined Communications between agents are normal, and therefore, monitoring server can issue acquisition instruction to Application Agent, so that application program It acts on behalf of and reports data to be monitored to monitoring server.The data to be monitored include application program corresponding to it in operational process In all kinds of achievement datas, such as: run runing time, memory usage, thread of program etc., can be to these achievement datas Processing and analysis, obtain the operation conditions of the operation program, in order to find the failure of application program in time, facilitate O&M pipe Reason, and then realize the monitoring to the application program.
S106: Application Agent sends the data to be monitored according to the acquisition instruction.
The monitoring to application program running state can be realized by heartbeat mechanism, thus the application journey of discovery operation in time Sequence, and the data to be monitored of the application program can be obtained according to the inquiry mark of the application program.
Embodiment 2
Fig. 2 shows the flow charts of another method for monitoring application program according to an embodiment of the present invention.This method application Host in above-mentioned k8s cluster, host include at least one Pod, and one of at least one Pod is deployed with monitoring server generation Reason, at least one Application Agent of monitoring server agent monitors, this method can be used for answering each in container cluster It is monitored with program, as shown in Fig. 2, this method comprises the following steps:
Step S201: monitoring server agency receives the inquiry mark that Application Agent is sent, and inquiry mark is by each The Pod of the port-mark of application program and its locating Pod, which are identified, to be generated.
Specifically, the generating process of above-mentioned inquiry mark can be referring specifically to the phase of above-mentioned steps S101 and step S102 Description is closed, is no longer repeated herein.In practical applications, in application program generation, is received by above-mentioned monitoring server agency The inquiry sent of getting a haircut identifies.
Step S202: monitoring server agency sends inquiry mark.
Specifically, the inquiry mark hair sent by all Application Agents that monitoring server agency is monitored it Give the recipient for monitoring each application program.
S201 passes through reception to step 202, method for monitoring application program provided in an embodiment of the present invention through the above steps Inquiry mark generated is identified as the Pod of the port-mark of application program and Pod locating for it, is realized to application program only One mark, it is each to apply journey when the IP address of application program changes or multiple application departments are deployed on same container The mark of inquiry corresponding to sequence will not change, and can judge whether each application program is supervised by the uniqueness of inquiry mark Control.
As a kind of optional embodiment of the present embodiment, inquiry is identified into transmission in above-mentioned monitoring server agency Before, the method for monitoring application program further include: pretreated operation is carried out to received operation data, such as: calculate operation number Dependent thresholds in, and it is compared with preset threshold, if different from preset threshold, illustrate that the application program is deposited In corresponding failure risk, and then the preliminary screening to application program operation conditions is completed, and the screening results are occurred together To the recipient of monitoring application program, operation maintenance personnel is facilitated to find failure in time, is convenient for operation management.
In the present embodiment, after the application program acted on behalf of to Application Agent is monitored, monitoring server is needed Management of monitor is carried out to Application Agent, specifically, after Application Agent starting, can be acted on behalf of by monitoring server It reports to monitoring server to monitoring server agency to be registered, i.e. prison of the unlatching monitoring server to the Application Agent Control, specifically, as shown in Figure 4 B, acting on behalf of one end in monitoring server may include steps of:
S203: monitoring server agency receives connectivity verification message.In the present embodiment, monitoring server can pass through the heart Jump the determining connected state between Application Agent of message.
S204: monitoring server agency sends connectivity verification message.Monitoring server agency only forwards Application Agent The connectivity verification message of transmission.
S205: monitoring server agency receives the acquisition instruction for obtaining data to be monitored, and acquisition instruction is monitoring clothes What the connection status between business device and Application Agent was sent when being connected state.Specifically, when monitoring server judge it is above-mentioned When connection status is connection, to monitoring server agency's transmission for obtaining the acquisition instruction of data to be monitored.
S206: monitoring server agency sends acquisition instruction, and acquisition instruction is for obtaining data to be monitored.Specifically, it supervises Control server agent will acquire instruction and be sent to Application Agent, so that Application Agent is answered according to acquisition instruction acquisition With the data to be monitored of program, in the present embodiment, the acquisition that monitoring server agency forwarding monitoring server agency generates refers to It enables.
S207: receiving and sends data to be monitored.Specifically, monitoring server agency by Application Agent send to Monitoring data is forwarded to monitoring server and is handled.
So as to realize the monitoring to application program running state by heartbeat mechanism, so that discovery operation in time is answered With program, and the data to be monitored of the application program can be obtained according to the inquiry mark of the application program.
The monitoring server agency provided in the embodiment of the present invention also achieves each using journey of cluster internal deployment The data to be monitored of sequence are sent to external server, avoid to the external each application program of monitoring server direct monitoring to money The occupancy (cpu busy percentage, memory headroom of monitoring server etc.) in source, has effectively shared the load of server, in addition, the prison K8s cluster internal and external communication can be carried out by the Data Transport Protocol in Overlay network by controlling server agent, from And only need to open firewall rule corresponding with monitoring server agency, without opening one to each application program Corresponding firewall rule solves in the prior art due to being opened the excessive limitation of rule by firewall, so that in cluster Lead to not the problem of being monitored to application program with data communication complexity is carried out outside cluster.
Embodiment 3
Fig. 3 shows the flow chart of another method for monitoring application program according to an embodiment of the present invention.This method application In the monitoring server for monitoring above-mentioned k8s cluster, this method can be used for supervising each application program in container cluster Control, as shown in figure 3, this method comprises the following steps:
Step S301: monitoring server receives the inquiry mark that monitoring server agency sends, and inquiry mark is answered by each It is identified and is generated with the Pod of the port-mark of program and Pod locating for it.
Specifically, the generating process of above-mentioned inquiry mark can be referring specifically to the phase of above-mentioned steps S101 and step S102 Description is closed, is no longer repeated herein.In practical applications, monitoring server agency is received by above-mentioned monitoring server The inquiry of transmission identifies.
Step S302: monitoring server judges whether application program is monitored according to inquiry mark.
Specifically, when above-mentioned monitoring server receive by monitoring server agency report about k8s cluster internal After the information such as the inquiry mark of each application program of administration, is passed through according to the unique identification of application program and judged according to the inquiry Identify whether to have existed determining application program corresponding to it whether monitored server, which is received, pipe and monitors, if the inquiry Mark has existed, then illustrates that the application program belongs to the application program monitored, can will be currently received about this The data to be monitored of application program add to the inquiry and identify in corresponding history monitoring data, to maintain the same application The continuity of the monitoring data of program.
S301 passes through reception to step 302, method for monitoring application program provided in an embodiment of the present invention through the above steps Inquiry mark generated is identified as the Pod of the port-mark of application program and Pod locating for it, is realized to application program only One mark, it is each to apply journey when the IP address of application program changes or multiple application departments are deployed on same container The mark of inquiry corresponding to sequence will not change, and can judge whether each application program is supervised by the uniqueness of inquiry mark Control, so that it is more convenient to be monitored management to application program.
As a kind of optional embodiment of the present embodiment, when the inquiry mark for judging above-mentioned does not record, then explanation should The corresponding application program of inquiry mark is not monitored, then needs to be identified according to the inquiry and establish to the to be monitored of the application program The monitoring of data, in order to which the acquisition and use that carry out subsequent data to be monitored to the application program in practical applications can To establish the storage file that the inquiry identifies the data to be monitored of corresponding application program according to inquiry mark, by the application program All data to be monitored store into the storage file, and the data to be monitored of the application program are analyzed and are handled, Obtain the carrying out practically situation of the application program, it should be noted that it is above-mentioned according to inquiry mark establish to application program to The process that monitoring data is monitored can also be configured according to actual needs, and the present invention is not limited thereto.Above-mentioned mistake Journey is to judge automatically identification to be monitored without human intervention application program.
In the present embodiment, after the application program acted on behalf of to Application Agent is monitored, monitoring server needs To Application Agent carry out management of monitor, specifically, Application Agent starting after, can be acted on behalf of by monitoring server to Monitoring server agency reports to monitoring server and is registered, i.e. prison of the unlatching monitoring server to the Application Agent Control, specifically, as shown in Figure 4 B, may include steps of in monitoring server one end:
S303: monitoring server receives connectivity verification message, and according to the determination of connectivity verification message and Application Agent Connection status act on behalf of and forward by monitoring server specifically, the verifying message is that Application Agent generates and sends To monitoring server.
S304: when connection status is connected state, monitoring server sends the acquisition instruction for obtaining data to be monitored, tool Body, after acquisition instruction is sent, by monitoring server, agency is forwarded to Application Agent;
S305: monitoring server receives data to be monitored, and treats monitoring data and be monitored, specifically, application program After agency receives acquisition instruction, data to be monitored are sent according to acquisition instruction, data to be monitored are acted on behalf of by monitoring server It is forwarded to monitoring server, and data are monitored in monitoring server.
As another optional embodiment of the present embodiment, proxy server is also connected with spare monitoring server generation Reason, the above method further include:
The operating status of monitoring server agency is monitored;
Judge whether monitoring server agency exception occurs;
When monitoring server occurs abnormal, starts spare monitoring server and monitoring server agency is monitored at least One Application Agent is monitored.
In practical applications, include the function of monitoring in above-mentioned monitoring server, can be received by judgement Monitoring server acts on behalf of the time interval of the heartbeat message sent to determine the state of above-mentioned monitoring server agency, needs to illustrate , monitoring server agency send heartbeat message time interval can be adjusted according to actual needs, the present invention is not As limit.
It (in order to distinguish conveniently in the present embodiment, is referred to as leading when monitoring server listens to monitoring server agency Acted on behalf of with monitoring server) when occurring abnormal, such as: Application Agent, which can not be received, in primary monitoring server agency sends Data when, automatically cut off primary monitoring server and act on behalf of monitoring to each Application Agent, start spare monitoring and take Business device agency is monitored above-mentioned each Application Agent.After primary monitoring server Proxy Restore is normal, Ke Yigen It is preset according to the needs of actual conditions and former primary monitoring server generation is returned by spare monitoring server proxy-switching whether automatically Reason.
Connect in practical applications with monitoring server spare monitoring server agency number can according to need into Row setting, such as multiple spare monitoring server agencies are set simultaneously, while the excellent of each spare monitoring server agency is arranged First grade sequence switches when monitoring server determines that primary monitoring server agency occurs abnormal according to preset priority orders Spare monitoring server agency can continue to switch another monitoring clothes when spare monitoring server agency also occurs abnormal Be engaged in device agency, to ensure the continuity of monitoring by the setting of multiple spare monitoring server agencies.
It specifically, in practical applications, can be in configuration file for each of k8s cluster Application Agent The IP address of middle configuration primary monitoring server agency and spare monitoring server agency, can obtain in Application Agent starting Take the IP address of primary monitoring server agency and spare monitoring server agency, the number to be monitored that Application Agent will acquire According to and generate inquiry mark by primary monitoring server agency be reported to monitoring server.Application Agent preferential attachment Primary monitoring server agency then connects spare monitoring server agency when primary monitoring server agency can not be connected to.
In practical applications, above-mentioned Application Agent can be using in monitoring server agency and monitoring server It resets automatically when failure and itself provides the caching mechanism of acquisition data, when can be according to the data buffer storage of configuration Between cache the data of acquisition.As monitoring server agency and monitoring server breaks down or company with Application Agent After connecing interruption, Application Agent itself has the ability of independent acquisition and preservation acquisition data, to fault recovery or again After new connection, it can disposably send the acquisition data lacked to monitoring server, improve the method for monitoring application program Availability.
It should be noted that heartbeat message and prison between the monitoring server in the present embodiment and monitoring server agency The heartbeat message interacted between control server and Application Agent is not same heartbeat message.Monitoring service in the present embodiment The heartbeat message interacted between device and monitoring server agency is so that monitoring server is in determining and primary monitoring server generation When occurring communication failure between reason, monitoring server is timely established and spare monitoring server communication between agents, thus Guarantee the High Availabitity of monitoring server agency.
In practical applications, above-mentioned monitoring server is also provided with multiple, can be between each monitoring server Using zookeeper Clustering mechanism.When a monitoring server occurs abnormal, adjusted again by the leader of monitoring server Degree, by the monitoring server agent allocation of abnormal monitoring server admin to the monitoring server management operated normally;Work as monitoring When the leader of server occurs abnormal, Zookeeper can re-elect the leader of monitoring server, and the prison by newly electing The leader scheduling for controlling server, by the monitoring server agent allocation of abnormal monitoring server admin to the monitoring operated normally Server is managed, and improves the availability of the method for monitoring application program.
Embodiment 4
Fig. 4 shows a kind of structural schematic diagram of application program monitoring system according to an embodiment of the present invention.The system can To realize above-described embodiment 1, embodiment 2, method provided in embodiment 3 or its any optional embodiment.The system Can be used for being monitored each application program in container cluster, as shown in figure 4, the system include: at least one first Host, at least one second host and monitoring server.
At least one first host 4, the first host 4 include at least one Pod, and Pod includes at least two containers, this implementation To include two containers in pod in example, it is illustrated for container 41 and container 42, wherein container 41 is deployed with application program Agency 411, another container 42 are deployed at least one application program (412,413,414), and the first host 4 is each for obtaining The Pod mark of the Pod disposed in the port-mark of application program (412,413,414) and the first host 4;According to port-mark and Corresponding Pod mark generates the inquiry mark of each application program (412,413,414);
At least one second host 40, the second host 40 includes at least one Pod, to include two pod in the present embodiment For be illustrated, one of Pod is deployed with monitoring server agency 401, is deployed with Application Agent in another Pod 411 and an application program 415, monitoring server agency 401 monitors at least one Application Agent 411, the second host 40 The inquiry mark sent for receiving each Application Agent 411;
Monitoring server 400 is identified for receiving inquiry mark transmitted by monitoring server agency 401 according to inquiry Judge whether application program 412 is monitored.In practical applications, the first above-mentioned host 4 can be same with the second host 40 A host is also possible to two different hosts, such as: the Pod in the first host 4 is deployed in the second host 40, or Pod in second host 40 is deployed in the first host 4, the embodiment of the present invention is not limited thereto.
Specifically, the Application Agent 411 disposed in above-mentioned application program monitoring system is for executing above-described embodiment 1 The method for monitoring application program of middle offer, the monitoring server agency 401 disposed in above-mentioned application program monitoring system is in execution Another method for monitoring application program provided in above-described embodiment 2, the monitoring clothes disposed in above-mentioned application program monitoring system Business device 400 is for executing another method for monitoring application program provided in above-described embodiment 3, the above-mentioned implementation of detailed content parameter Associated description in example 1, embodiment 2 and embodiment 3, is no longer repeated herein.Specifically, Application Agent 411, monitoring Server agent 401, monitoring server 400 interactive mode may refer to application program monitoring system shown in Fig. 4 A or Fig. 4 B Interaction figure.
By the cooperative cooperating of above-mentioned each component part, application program monitoring system provided in an embodiment of the present invention leads to The Pod of the port-mark and its locating Pod of crossing application program identifies inquiry mark generated, realizes to application program only One mark, it is each to apply journey when the IP address of application program changes or multiple application departments are deployed on same container The mark of inquiry corresponding to sequence will not change, this is realized with Program Monitoring System is judged respectively by the uniqueness of inquiry mark The function whether a application program is monitored.
As another optional embodiment of the present embodiment, as shown in Figure 4 C, it is main that monitoring server 400 is deployed in first Outside cluster belonging to machine 4 and the second host 40.In practical applications, the first above-mentioned host 4 and the second host 40 belong to k8s In cluster, each host carries out communications and data transmission by container Overlay network in k8s cluster, realizes logical across host Letter.Application monitoring system in the prior art is deployed in directorial area (outside k8s cluster), and k8s application deployment is producing Area's (k8s cluster internal), has firewall to be isolated, firewall can only open limited quantity and rule between directorial area and production district Then well-defined firewall rule;Since 412 quantity size of application program is huge, such as to monitor, the firewall for needing to open It is regular too many, it is not able to satisfy the requirement of safe operation management.To by the way that above-mentioned monitoring server 400 is deployed in k8s collection Group is external, so that the monitoring server 400 carries out k8s cluster internal and outer by the Data Transport Protocol in Overlay network The communication in portion acts on behalf of 401 corresponding firewall rules with monitoring server to only need to open, without answering each A corresponding firewall rule is opened with program, is solved in the prior art due to being opened the excessive limit of rule by firewall System, so that leading to not the problem of being monitored to application program with progress data communication complexity outside cluster in cluster.
Embodiment 5
Fig. 5 shows the structural schematic diagram of another application program monitoring system according to an embodiment of the present invention.The system Above-described embodiment 1, embodiment 2, method provided in embodiment 3 or its any optional embodiment may be implemented.Such as Fig. 5 Shown, which includes: multiple main frames 501, is the explanation carried out by taking 3 hosts as an example, multiple main frames in the embodiment of the present invention 501 are deployed at least one Application Agent 5011 and at least one monitoring server agency 5012, in the embodiment of the present invention In, a monitoring server agency 5012 is deployed in one of host 501, and be deployed with an Application Agent 5011 And an application program 5013, it is deployed with an Application Agent 5011 and multiple applications respectively in other two host 501 Program 5013, wherein monitoring server agency 5012 is for receiving an at least application program for the monitoring of Application Agent 5011 5013 data to be monitored;Monitoring server 502, outside the cluster belonging to the multiple main frames 501, for receiving monitoring server The data to be monitored for the application program that agency 5012 sends.
Specifically, the Application Agent disposed in above-mentioned application program monitoring system is for executing in above-described embodiment 1 The method for monitoring application program of offer, the monitoring server agency disposed in above-mentioned application program monitoring system is in executing above-mentioned reality Another method for monitoring application program provided in example 2 is applied, the monitoring server disposed in above-mentioned application program monitoring system is used In executing another method for monitoring application program provided in above-described embodiment 3, detailed content parameter above-described embodiment 1 is implemented Associated description in example 2 and embodiment 3, is no longer repeated herein.
By the cooperative cooperating of above-mentioned each component part, application program monitoring system provided in an embodiment of the present invention leads to It crosses and monitoring server is deployed in outside cluster, monitoring server is directly communicated with monitoring server agency, from And avoid due to being opened the excessive limitation of rule by firewall, so that being led in cluster with progress data communication complexity outside cluster The problem of cause can not be monitored application program, realizes the mesh being monitored to the data to be monitored of application program in cluster 's.
As another optional embodiment of the present embodiment, states monitoring server agency 5012 and be also used to receive using journey The inquiry mark that sequence agency 5011 sends, Pod of the inquiry mark as the port-mark of each application program 5013 and Pod locating for it Mark generates;Monitoring server 503 is also used to receive the inquiry mark that monitoring server agency 5012 sends.Pass through application program The Pod of 5013 port-mark and its locating Pod identify inquiry mark generated, realize to the unique of application program 5013 Mark, it is each when the IP address of application program 5013 changes or multiple application programs 5013 are deployed in same container The mark of inquiry corresponding to application program 5013 will not change, this is realized through inquiry mark only with Program Monitoring System One property judges the function whether each application program is monitored.
Embodiment 6
Fig. 6 shows a kind of structural schematic diagram of Application Monitoring device according to an embodiment of the present invention.The device can To realize method provided in above-described embodiment 1.The device can be used for carrying out each application program in container cluster Monitoring is applied to host, and host includes at least one Pod, and Pod includes at least two containers, and one at least two containers It is deployed with Application Agent, other containers at least two containers dispose at least one application program respectively, such as Fig. 6 institute Show, which includes: acquiring unit 601, processing unit 602 and transmission unit 603.
Acquiring unit 601, for obtaining the port-mark of each application program and the Pod mark of Pod locating for it.In in detail Hold the associated description referring to step S101 in embodiment 1.
Processing unit 602, for generating the inquiry mark of each application program according to port-mark and corresponding Pod mark Know.Detailed content referring to step S102 in embodiment 1 associated description.
First transmission unit 603, for sending inquiry mark.Detailed content referring to step S103 in embodiment 1 correlation Description.
Application Monitoring device provided in an embodiment of the present invention passes through the port-mark of application program and Pod locating for it Pod identify inquiry generated and identify, realize the unique identification to application program, become in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change, can Judge whether each application program is monitored with the uniqueness by inquiry mark.
In an alternative embodiment, Application Monitoring device provided in an embodiment of the present invention further include:
The first transmission unit of message is verified, for sending connectivity verification message.Detailed content is referring to step in embodiment 1 The associated description of S103.
The first receiving unit of acquisition instruction, for receiving the acquisition instruction for obtaining data to be monitored.Detailed content ginseng See the associated description of step S104 in embodiment 1.
The first transmission unit of monitoring data, for sending data to be monitored according to acquisition instruction.Detailed content is referring to implementation The associated description of step S105 in example 1.
Embodiment 7
Fig. 7 shows a kind of structural schematic diagram of Application Monitoring device according to an embodiment of the present invention.The device can To realize method provided in above-described embodiment 2.The device can be used for carrying out each application program in container cluster Monitoring is applied to host, and host includes at least one Pod, and Pod includes at least two containers, and one at least two containers It is deployed with Application Agent, other containers at least two containers dispose at least one application program respectively, such as Fig. 7 institute Show, which includes: the first receiving unit 701 and the second transmission unit 702.
First receiving unit 701, for receiving the inquiry mark of Application Agent transmission, inquiry mark is by each application The Pod of the port-mark of program and its locating Pod, which are identified, to be generated.Detailed content is retouched referring to the correlation of step S201 in embodiment 2 It states.
Second transmission unit 702, for sending inquiry mark.Detailed content referring to step S202 in embodiment 2 correlation Description.
Application Monitoring device provided in an embodiment of the present invention, by receiving port-mark and its institute by application program The Pod for locating Pod identifies inquiry mark generated, the unique identification to application program is realized, in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change Become, can judge whether each application program is monitored by the uniqueness of inquiry mark.
In an alternative embodiment, Application Monitoring device provided in an embodiment of the present invention further include:
The second receiving unit of message is verified, for receiving connectivity verification message.Detailed content is referring to step in embodiment 2 The associated description of S203.
The second transmission unit of message is verified, for sending connectivity verification message.Detailed content is referring to step in embodiment 2 The associated description of S204.
The second receiving unit of acquisition instruction, for receiving the acquisition instruction for obtaining data to be monitored.Detailed content ginseng See the associated description of step S205 in embodiment 2.
The second transmission unit of acquisition instruction, for sending acquisition instruction.Detailed content is referring to step S206 in embodiment 2 Associated description.
Monitoring data retransmission unit, for receiving and sending data to be monitored.Detailed content is referring to step in embodiment 2 The associated description of S207.
Embodiment 8
Fig. 8 shows a kind of structural schematic diagram of Application Monitoring device according to an embodiment of the present invention.The device can To realize method provided in above-described embodiment 3.The device can be used for carrying out each application program in container cluster Monitoring, as shown in fig. 6, the device includes: applied to host, host includes at least one Pod, and Pod includes at least two containers, One at least two containers is deployed with Application Agent, other containers at least two containers dispose at least one respectively A application program, as shown in figure 8, the device includes: the second receiving unit 801 and judging unit 802.
Second receiving unit 801, the inquiry mark sent for receiving monitoring server agency, inquiry mark are answered by each It is identified and is generated with the Pod of the port-mark of program and Pod locating for it.Detailed content referring to step S301 in embodiment 3 correlation Description.
Judging unit 802, for judging whether application program is monitored according to inquiry mark.Detailed content is referring to embodiment The associated description of step S302 in 3.
Application Monitoring device provided in an embodiment of the present invention, by receiving port-mark and its institute by application program The Pod for locating Pod identifies inquiry mark generated, the unique identification to application program is realized, in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change Become, can judge whether each application program is monitored by the uniqueness of inquiry mark, so that being monitored to application program It is more convenient to manage.
In an alternative embodiment, Application Monitoring device provided in an embodiment of the present invention further include:
Message third receiving unit is verified, is determined for receiving connectivity verification message, and according to the connectivity verification message With the connection status of Application Agent.Detailed content referring to step S303 in embodiment 3 associated description.
Acquisition instruction third transmission unit, for sending and obtaining number to be monitored when the connection status is connected state According to acquisition instruction.Detailed content referring to step S304 in embodiment 3 associated description.
Monitoring data third receiving unit is monitored for receiving data to be monitored, and to the data to be monitored.In detail Thin content is referring to the associated description in embodiment 3.
Monitoring unit, for monitoring the monitoring server agency.Detailed content is referring to the associated description in embodiment 3.
Judging unit, for judging whether the monitoring server agency exception occurs.Detailed content is referring in embodiment 3 Associated description.
Stand-by unit, when the monitoring server occurs abnormal, the stand-by unit is for starting spare monitoring service At least Application Agent that device agency monitors monitoring server agency is monitored.Detailed content is referring to implementation Associated description in example 3.
Embodiment 9
Fig. 9 has shown the structural schematic diagram of another application program monitoring system according to an embodiment of the present invention.This is Above-described embodiment 1, embodiment 2, method provided in embodiment 3 or its any optional embodiment may be implemented in system.It should System can be used for being monitored each application program in container cluster, as shown in figure 9, the application program monitoring system packet It includes: Application Monitoring device 6 described in above-described embodiment 6, Application Monitoring device 7 described in above-described embodiment 7 And Application Monitoring device 8 described in above-described embodiment 8, detailed content are retouched referring to the correlation in above-described embodiment 6-8 It states, is no longer repeated herein.
Application program monitoring system provided in an embodiment of the present invention, by receiving port-mark and its institute by application program The Pod for locating Pod identifies inquiry mark generated, the unique identification to application program is realized, in the IP address of application program When changing or multiple application departments being deployed on same container, the mark of inquiry corresponding to each application program will not change Become, can judge whether each application program is monitored by the uniqueness of inquiry mark, so that being monitored to application program It is more convenient to manage.
Embodiment 10
Figure 10 shows a kind of electronic equipment according to an embodiment of the present invention, and as shown in Figure 10, which can wrap Processor 901 and memory 902 are included, wherein processor 901 can be connected with memory 902 by bus or other modes, In Figure 10 for being connected by bus.
Processor 901 can be central processing unit (Central Processing Unit, CPU).Processor 901 may be used also Think other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, The combination of the chips such as discrete hardware components or above-mentioned all kinds of chips.
Memory 902 is used as a kind of non-transient computer readable storage medium, can be used for storing non-transient software program, non- Transient computer executable program and module, such as management, use or the construction method of the container mirror image in the embodiment of the present invention Corresponding program instruction/module is (for example, acquiring unit shown in fig. 6 601, processing unit 602 and the first transmission unit 603).Non-transient software program, instruction and the module that processor 901 is stored in memory 902 by operation, thereby executing The various function application and data processing of processor, the i.e. monitoring method of application program in realization above method embodiment.
Memory 902 may include storing program area and storage data area, wherein storing program area can store operation system Application program required for system, at least one function;It storage data area can the data etc. that are created of storage processor 901.In addition, Memory 902 may include high-speed random access memory, can also include non-transient memory, and a for example, at least disk is deposited Memory device, flush memory device or other non-transient solid-state memories.In some embodiments, it includes opposite that memory 902 is optional In the remotely located memory of processor 901, these remote memories can pass through network connection to processor 901.Above-mentioned net The example of network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more module is stored in memory 902, and when being executed by processor 901, it is real to execute the above method Apply the method for monitoring application program in example.
Above-mentioned electronic equipment detail can be corresponded to refering to corresponding in embodiment shown in embodiment 1 to embodiment 3 Associated description and effect are understood that details are not described herein again.
It is that can lead to it will be understood by those skilled in the art that realizing all or part of the process in above-described embodiment method Computer program is crossed to instruct relevant hardware and complete, program can be stored in a computer-readable storage medium, should Program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium can be magnetic disk, CD, read-only It is storage memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), fast Flash memory (Flash Memory), hard disk (Hard Disk Drive, abbreviation: HDD) or solid state hard disk (Solid-State Drive, SSD) etc.;Storage medium can also include the combination of the memory of mentioned kind.
Although being described in conjunction with the accompanying the embodiment of the present invention, those skilled in the art can not depart from the present invention Spirit and scope in the case where various modifications and variations can be made, such modifications and variations are each fallen within by appended claims institute Within the scope of restriction.

Claims (13)

1. a kind of method for monitoring application program is applied to host, which is characterized in that host includes at least one Pod, the Pod Including at least two containers, one at least two container is deployed with Application Agent, at least two container In other containers dispose at least one application program respectively, which comprises
The Pod of the port-mark and its locating Pod that obtain each application program is identified;
The inquiry mark of each application program is generated according to the port-mark and corresponding Pod mark;
Send the inquiry mark.
2. method for monitoring application program as described in claim 1, which is characterized in that further include:
Send connectivity verification message;
Receive the acquisition instruction for obtaining data to be monitored;
The data to be monitored are sent according to the acquisition instruction.
3. a kind of method for monitoring application program is applied to host, which is characterized in that the host includes at least one Pod, described One of at least one Pod is deployed with monitoring server agency, at least one application program generation of the monitoring server agent monitors Reason, which comprises
Receive the inquiry mark that the Application Agent is sent, the inquiry mark by each application program port-mark and The Pod of its locating Pod, which is identified, to be generated;
Send the inquiry mark.
4. method for monitoring application program as claimed in claim 3, which is characterized in that further include:
Receive connectivity verification message;
Send the connectivity verification message;
Receive the acquisition instruction for obtaining data to be monitored;
Send the acquisition instruction;
It receives and sends the data to be monitored.
5. a kind of method for monitoring application program is applied to monitoring server, which is characterized in that the described method includes:
The inquiry mark that monitoring server agency sends is received, the inquiry mark is by the port-mark of each application program and its The Pod of locating Pod, which is identified, to be generated;
Judge whether the application program is monitored according to inquiry mark.
6. method for monitoring application program according to claim 5, which is characterized in that further include:
Connectivity verification message is received, and according to the determining connection status with Application Agent of the connectivity verification message;
When the connection status is connected state, the acquisition instruction for obtaining data to be monitored is sent;
Data to be monitored are received, and the data to be monitored are monitored.
7. method for monitoring application program according to claim 5, which is characterized in that the method also includes:
Monitor the monitoring server agency;
Judge whether the monitoring server agency exception occurs;
When the monitoring server occurs abnormal, starts spare monitoring server agency and monitoring server agency is supervised An at least Application Agent for control is monitored.
8. a kind of Application Monitoring device is applied to host, which is characterized in that the host includes at least one Pod, described Pod includes at least two containers, and one at least two container is deployed with Application Agent, and described at least two hold Other containers in device dispose at least one application program respectively, and described device includes:
Acquiring unit, for obtaining the port-mark of each application program and the Pod mark of Pod locating for it;
Processing unit, for generating the inquiry mark of each application program according to the port-mark and corresponding Pod mark Know;
First transmission unit, for sending the inquiry mark.
9. a kind of Application Monitoring device is applied to host, which is characterized in that the host includes at least one Pod, described One of at least one Pod is deployed with monitoring server agency, at least one application program generation of the monitoring server agent monitors Reason, described device include:
First receiving unit, the inquiry mark sent for receiving the Application Agent, the inquiry mark are answered by each It is identified and is generated with the Pod of the port-mark of program and Pod locating for it;
Second transmission unit, for sending the inquiry mark.
10. a kind of Application Monitoring device, it is applied to monitoring server, which is characterized in that described device includes:
Second receiving unit, the inquiry mark sent for receiving monitoring server agency, the inquiry mark is by each application The Pod of the port-mark of program and its locating Pod, which are identified, to be generated;
Judging unit, for judging whether the application program is monitored according to inquiry mark.
11. a kind of application program monitoring system characterized by comprising Application Monitoring device according to any one of claims 8, Application Monitoring device as claimed in claim 9 and Application Monitoring device described in any one of claim 10.
12. a kind of electronic equipment characterized by comprising
Memory and processor communicate with each other connection, are stored in the memory between the memory and the processor Computer instruction, the processor apply journey by executing the computer instruction, thereby executing of any of claims 1 or 2 Sequence monitoring method, alternatively, method for monitoring application program described in perform claim requirement 3 or 4 or perform claim require 5-8 to appoint Method for monitoring application program described in meaning one.
13. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to Enable, the computer instruction for making the computer thereby executing method for monitoring application program of any of claims 1 or 2, Alternatively, method for monitoring application program described in perform claim requirement 3 or 4 or perform claim require described in 5-8 any one Method for monitoring application program.
CN201910255968.1A 2019-03-29 2019-03-29 Application program monitoring method, device and system Active CN109960634B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910255968.1A CN109960634B (en) 2019-03-29 2019-03-29 Application program monitoring method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910255968.1A CN109960634B (en) 2019-03-29 2019-03-29 Application program monitoring method, device and system

Publications (2)

Publication Number Publication Date
CN109960634A true CN109960634A (en) 2019-07-02
CN109960634B CN109960634B (en) 2023-10-31

Family

ID=67025471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910255968.1A Active CN109960634B (en) 2019-03-29 2019-03-29 Application program monitoring method, device and system

Country Status (1)

Country Link
CN (1) CN109960634B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427249A (en) * 2019-07-26 2019-11-08 重庆紫光华山智安科技有限公司 Method for allocating tasks, pod initial method and relevant apparatus
CN110515696A (en) * 2019-08-09 2019-11-29 济南浪潮数据技术有限公司 Information monitoring method and device
CN111045908A (en) * 2019-12-13 2020-04-21 深圳前海环融联易信息科技服务有限公司 System performance monitoring method and device and computer equipment
CN111064781A (en) * 2019-12-10 2020-04-24 北京金山云网络技术有限公司 Multi-container cluster monitoring data acquisition method and device and electronic equipment
CN112291288A (en) * 2019-07-24 2021-01-29 北京金山云网络技术有限公司 Container cluster expansion method and device, electronic equipment and readable storage medium
CN112835766A (en) * 2021-02-10 2021-05-25 杭州橙鹰数据技术有限公司 Application monitoring method and device
CN116560893A (en) * 2023-07-07 2023-08-08 湖南开放大学(湖南网络工程职业学院、湖南省干部教育培训网络学院) Computer application program operation data fault processing system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160373327A1 (en) * 2015-06-22 2016-12-22 Draios Inc. Communication between independent containers
GB201709133D0 (en) * 2017-06-08 2017-07-26 British Telecomm Containerised programming
CN107197012A (en) * 2017-05-19 2017-09-22 焦点科技股份有限公司 A kind of service issue and supervisory systems and method based on metadata management system
US20170315795A1 (en) * 2016-04-29 2017-11-02 Ca, Inc. Monitoring containerized applications
US20180048545A1 (en) * 2016-08-11 2018-02-15 Hewlett Packard Enterprise Development Lp Container monitoring configuration deployment
US20180288129A1 (en) * 2017-03-29 2018-10-04 Ca, Inc. Introspection driven monitoring of multi-container applications
CN109062655A (en) * 2018-06-05 2018-12-21 腾讯科技(深圳)有限公司 A kind of containerization cloud platform and server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160373327A1 (en) * 2015-06-22 2016-12-22 Draios Inc. Communication between independent containers
US20170315795A1 (en) * 2016-04-29 2017-11-02 Ca, Inc. Monitoring containerized applications
US20180048545A1 (en) * 2016-08-11 2018-02-15 Hewlett Packard Enterprise Development Lp Container monitoring configuration deployment
US20180288129A1 (en) * 2017-03-29 2018-10-04 Ca, Inc. Introspection driven monitoring of multi-container applications
CN107197012A (en) * 2017-05-19 2017-09-22 焦点科技股份有限公司 A kind of service issue and supervisory systems and method based on metadata management system
GB201709133D0 (en) * 2017-06-08 2017-07-26 British Telecomm Containerised programming
CN109062655A (en) * 2018-06-05 2018-12-21 腾讯科技(深圳)有限公司 A kind of containerization cloud platform and server

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291288A (en) * 2019-07-24 2021-01-29 北京金山云网络技术有限公司 Container cluster expansion method and device, electronic equipment and readable storage medium
CN112291288B (en) * 2019-07-24 2022-10-04 北京金山云网络技术有限公司 Container cluster expansion method and device, electronic equipment and readable storage medium
CN110427249A (en) * 2019-07-26 2019-11-08 重庆紫光华山智安科技有限公司 Method for allocating tasks, pod initial method and relevant apparatus
CN110515696A (en) * 2019-08-09 2019-11-29 济南浪潮数据技术有限公司 Information monitoring method and device
CN111064781A (en) * 2019-12-10 2020-04-24 北京金山云网络技术有限公司 Multi-container cluster monitoring data acquisition method and device and electronic equipment
CN111045908A (en) * 2019-12-13 2020-04-21 深圳前海环融联易信息科技服务有限公司 System performance monitoring method and device and computer equipment
CN112835766A (en) * 2021-02-10 2021-05-25 杭州橙鹰数据技术有限公司 Application monitoring method and device
CN116560893A (en) * 2023-07-07 2023-08-08 湖南开放大学(湖南网络工程职业学院、湖南省干部教育培训网络学院) Computer application program operation data fault processing system
CN116560893B (en) * 2023-07-07 2023-09-22 湖南开放大学(湖南网络工程职业学院、湖南省干部教育培训网络学院) Computer application program operation data fault processing system

Also Published As

Publication number Publication date
CN109960634B (en) 2023-10-31

Similar Documents

Publication Publication Date Title
CN109960634A (en) A kind of method for monitoring application program, apparatus and system
JP6835444B2 (en) Software-defined data center and service cluster scheduling method and traffic monitoring method for that purpose
US9838483B2 (en) Methods, systems, and computer readable media for a network function virtualization information concentrator
US20140215077A1 (en) Methods and systems for detecting, locating and remediating a congested resource or flow in a virtual infrastructure
CN109088820B (en) Cross-device link aggregation method and device, computing device and storage medium
CN111800354B (en) Message processing method and device, message processing equipment and storage medium
CN107659423A (en) Method for processing business and device
WO2019141089A1 (en) Network alarm method, device, system and terminal
WO2020121293A1 (en) Orchestration of activities of entities operating in a network cloud
CN109074280A (en) Network function virtualization
EP3854033B1 (en) Packet capture via packet tagging
CN112564994B (en) Flow monitoring method and device, cloud server and storage medium
US20230246955A1 (en) Collection of segment routing ipv6 (srv6) network telemetry information
CN101431435B (en) Connection-oriented service configuration and management method
US20230060758A1 (en) Orchestration of Activities of Entities Operating in a Network Cloud
Levin et al. Network Monitoring in Federated Cloud Environment
CN106453118B (en) Flow control method and flow control system
US10904123B2 (en) Trace routing in virtual networks
CN116915837B (en) Communication method and communication system based on software defined network
WO2024051258A1 (en) Event processing method, apparatus and system
CN110417568B (en) NFV strategy negotiation method and system
US11671354B2 (en) Collection of segment routing IPV6 (SRV6) network telemetry information
JP5890545B1 (en) Node device, failure detection method and program
Vuong et al. Distributed Event Monitoring for Software Defined Networks
JP7421267B2 (en) Maintenance management system, maintenance management device, maintenance management method, and maintenance management program for service provision applications

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