Micro-application monitoring system and method based on container cloud platform
Technical Field
The invention relates to the technical field of cloud computing, in particular to a micro-application monitoring system and method based on a container cloud platform.
Background
With the continuous development of computer system technology, the basic unit of computing instance has evolved from a physical server instance (physical machine) to a virtual server instance (virtual machine) and further to a container instance. In response to the development of container technology, the architecture of computer software applications has evolved from traditional monolithic applications to the architecture of current microservices and micro-applications.
Corresponding to the traditional single application, the application number of computer software under the micro-service micro-application architecture can be greatly increased; corresponding to the traditional physical machine technology and virtual machine technology, the number of instances of the application taking the container instance as the basic unit is greatly increased.
In the conventional computer monitoring technology, whether in a physical machine environment or a virtual machine environment, the collection and aggregation of monitoring data are performed by taking a computing instance as a unit. Therefore, the traditional monitoring system is not suitable for micro application in a container cloud platform environment, and mainly has two main problems that the traditional monitoring system can cause:
1. monitoring collection agent overhead issues: the number of the applied instances taking the container instance as a basic unit is greatly increased to dozens, hundreds or even thousands, the monitoring collection agent is deployed by taking the container instance as a unit, the overhead of the monitoring collection agent is very large, and the efficiency is very low;
2. ease of use issues for monitoring summary data: the granularity of the monitoring data gathered by taking the container example as a unit is too fine, and the overall operation condition of the application cannot be intuitively reflected.
Disclosure of Invention
The invention aims to overcome the defects in the prior art, provides a micro application monitoring system and method based on a container cloud platform, and solves the problems that the monitoring collection agent in the prior art is high in cost, low in efficiency and incapable of visually reflecting the overall operation condition of an application.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: the monitoring system comprises a monitoring summary server, a monitoring data collection device, a container operation background and a monitoring configuration server; the monitoring data collection device comprises a container runtime background adapter, a monitoring data merger and a monitoring collection agent device which are sequentially connected; the container runtime background adapter collects monitoring data from the container runtime background according to the container; the monitoring data merger merges the monitoring data of a plurality of containers belonging to the same micro application into one piece of monitoring data; the monitoring collection agent device is responsible for communicating with the monitoring summary server and reporting the monitoring data of the same host according to the micro application classification; and the monitoring configuration server is responsible for receiving a configuration management request of a user and sending configuration information to the background adapter, the monitoring data merger, the monitoring collection agent and the monitoring summary server when the container runs.
Further, the monitoring data collection device is deployed on a computer node of the container cloud platform.
Preferably, the computer node is a physical machine or a virtual machine.
Further, the monitoring summarizing server is also connected with a monitoring data storage database and a monitoring data display page; the monitoring summarizing server stores the combined monitoring data into a monitoring data storage database; when a user needs to check the monitoring data of the micro applications, the monitoring summarizing server reads the monitoring data from the monitoring data storage database and outputs and displays the monitoring data through a monitoring data display page.
Further, the monitoring configuration server is also connected with a monitoring configuration storage database and a monitoring configuration display page; when a user needs to check the monitoring configuration of the micro application, the monitoring configuration server reads monitoring configuration information from the monitoring configuration storage database and outputs and displays the monitoring configuration information through a monitoring configuration display page.
The invention provides a micro-application monitoring method based on a container cloud platform, which comprises the following steps:
the container runtime background adapter collects monitoring target application container instances from the container runtime background;
the monitoring data merger merges all container instance monitoring data of the same application of the same host;
all monitoring data of the same host are collected by a monitoring collection agent and reported to a monitoring summary server;
and the monitoring and summarizing server merges the monitoring data of all container instances of all hosts of the same application and stores the merged monitoring data into a monitoring data storage database.
Compared with the prior art, the invention has the following beneficial effects: the utility model provides a micro application monitoring system under container cloud platform environment, can collect the running state information of gathering micro application according to user's needs, for traditional monitored control system, can reduce the number of monitoring collection agent on the one hand to improve system utilization efficiency, on the other hand gathers monitoring information more intelligently, makes the user detect the whole state of micro application easily rather than by the data interference of too much single application container example.
Drawings
FIG. 1 is a schematic structural diagram of a micro application monitoring system based on a container cloud platform provided by the invention;
FIG. 2 is a flowchart of a micro application monitoring method based on a container cloud platform according to the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
As shown in fig. 1, the structural schematic diagram of the micro application monitoring system based on the container cloud platform provided in the present invention includes: the monitoring and summarizing server, the monitoring data collecting device, the container operation background and the monitoring and configuring server.
The monitoring data collection device comprises a container runtime background adapter, a monitoring data merger and a monitoring collection agent device which are sequentially connected. The container runtime background adapter collects monitoring data from the container runtime background according to the container. The monitoring data merger merges the monitoring data of a plurality of containers belonging to the same micro application into one piece of monitoring data, thereby reducing the amount of network transmission data. The monitoring collection agent device is responsible for communicating with the monitoring summary server and reporting the monitoring data of the same host according to the micro application classification. The monitoring configuration server is responsible for receiving a configuration management request of a user and sending configuration information to the container operation background adapter, the monitoring data merger, the monitoring collection agent and the monitoring summary server.
The monitoring data collecting devices are deployed on the computer nodes of the container cloud platform, and only one monitoring data collecting device needs to be deployed on each computer node, so that the deployment complexity and the operation cost of the monitoring devices can be greatly reduced; the monitoring data collection device collects the running data of the application container from the container running background on the deployed computer node.
The computer node is a physical machine or a virtual machine.
The monitoring and summarizing server is responsible for collecting monitoring data of all computer nodes in the container cloud platform, and the monitoring data collected by each computer node and summarized according to the micro applications are summarized and combined according to the micro applications again to obtain overall monitoring data of the distributed micro applications.
The monitoring summarizing server is also connected with a monitoring data storage database and a monitoring data display page; the monitoring summarizing server stores the combined monitoring data into a monitoring data storage database; when a user needs to check the monitoring data of the micro applications, the monitoring summarizing server reads the monitoring data from the monitoring data storage database and outputs and displays the monitoring data through a monitoring data display page.
The monitoring configuration server is also connected with a monitoring configuration storage database and a monitoring configuration display page; when a user needs to check the monitoring configuration of the micro application, the monitoring configuration server reads monitoring configuration information from the monitoring configuration storage database and outputs and displays the monitoring configuration information through a monitoring configuration display page.
As shown in fig. 2, the method for monitoring a micro application based on a container cloud platform provided by the present invention includes the following steps:
the container runtime background adapter collects monitoring target application container instances from the container runtime background;
the monitoring data merger merges all container instance monitoring data of the same application of the same host;
all monitoring data of the same host are collected by a monitoring collection agent and reported to a monitoring summary server;
and the monitoring and summarizing server merges the monitoring data of all container instances of all hosts of the same application and stores the merged monitoring data into a monitoring data storage database.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.