CN116225620A - Container performance monitoring method, apparatus, device, medium and program product - Google Patents

Container performance monitoring method, apparatus, device, medium and program product Download PDF

Info

Publication number
CN116225620A
CN116225620A CN202310237296.8A CN202310237296A CN116225620A CN 116225620 A CN116225620 A CN 116225620A CN 202310237296 A CN202310237296 A CN 202310237296A CN 116225620 A CN116225620 A CN 116225620A
Authority
CN
China
Prior art keywords
container
performance
data
real
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310237296.8A
Other languages
Chinese (zh)
Inventor
武文斌
傅兵
朱文涛
黄海鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310237296.8A priority Critical patent/CN116225620A/en
Publication of CN116225620A publication Critical patent/CN116225620A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Abstract

The application relates to a container performance monitoring method, device, equipment, medium and program product, and relates to the technical field of cloud computing. The method is applied to a container management cluster comprising a management node and a plurality of working nodes, each working node comprising a plurality of containers and a data collector. The method comprises the following steps: firstly, sending an acquisition instruction to each data acquisition device through a management node, wherein the acquisition instruction is used for instructing each data acquisition device to acquire real-time performance parameters of each container in a working node to which each data acquisition device belongs, and then monitoring the performance of each container according to the real-time performance parameters of each container. By adopting the method, the data acquisition efficiency can be improved, and the effective monitoring of the performance of the container can be realized.

Description

Container performance monitoring method, apparatus, device, medium and program product
Technical Field
The present disclosure relates to the field of cloud computing technologies, and in particular, to a method, an apparatus, a device, a medium, and a program product for monitoring performance of a container.
Background
With the surge of the original climax of the cloud, the application of the cloud entering is impossible. Taking the financial industry as an example, as the service grows, the calling link becomes more and more complex, the corresponding service data has explosive growth, and the collection pressure on the performance parameters of the container is increased.
In the related art, when monitoring the performance parameters of the containers, the performance parameters of the containers need to be collected to monitor the performance of each container.
However, the related art has low data collection efficiency when collecting the performance parameters of the container, and cannot effectively monitor the performance of the container.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, apparatus, device, medium and program product for monitoring performance of a container, which can improve data collection efficiency.
In a first aspect, the present application provides a method for monitoring performance of a container, applied to a container management cluster, where the container management cluster includes a management node and a plurality of working nodes, each working node includes a plurality of containers and a data collector, and the method includes:
sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for instructing each data acquisition device to acquire real-time performance parameters of each container in the working node to which each data acquisition device belongs;
and monitoring the performance of each container according to the real-time performance parameters of each container.
In one embodiment, sending, by the management node, an acquisition instruction to each data acquisition device includes:
Sending an acquisition instruction to each data acquisition device through a management node according to a preset acquisition period; or alternatively, the process may be performed,
and if the state of the data acquisition device is detected to be changed, sending an acquisition instruction to each data acquisition device through the management node.
In one embodiment, the process of collecting the real-time performance parameters of each container in the working node includes:
for any data collector, calling the collection interface of each container in the working node to which the data collector belongs;
and the real-time performance parameters of all containers in the working node to which the data acquisition device belongs are acquired by connecting the data acquisition device with the acquisition interface.
In one embodiment, monitoring the performance of each container based on the real-time performance parameters of each container includes:
comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range;
and monitoring the performance of each container according to the comparison result.
In one embodiment, monitoring the performance of each container based on the comparison results includes:
and if the comparison result shows that at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, adjusting the configuration information of the container to which each target real-time performance parameter belongs so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
In one embodiment, the method further comprises:
if at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, warning information is sent out; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
In one embodiment, before monitoring the performance of each container based on the real-time performance parameters of each container, the method further comprises:
storing the real-time performance parameters of each container into a distributed database; the real-time performance parameters of all containers in the distributed database are respectively placed in different performance parameter tables according to the types of the performance parameters for partition storage.
In one embodiment, each type of performance parameter table includes a performance data detail table and a performance data summary table; the performance data summary table is generated by summarizing according to the preset duration according to the performance data detail table;
the performance data list is used for inquiring performance data in a first time range, and the performance data list is used for inquiring performance data in a second time range, wherein the first time range is smaller than the second time range.
In one embodiment, the method further comprises:
Acquiring average comprehensive values of various performance parameters in a preset time window in a distributed database;
and if the average integrated value exceeds the early warning threshold value, adjusting the acquisition period for acquiring the real-time performance parameters of each container.
In one embodiment, the container performance monitoring method further comprises:
and responding to the container performance data display instruction, and displaying each performance parameter table into an interface of a display platform.
In one embodiment, the container performance monitoring method further comprises, prior to monitoring the container performance:
arranging all containers in a container management cluster through a management node to generate a plurality of working nodes; each working node comprising one or more of said containers;
and correspondingly deploying a data collector in each working node.
In a second aspect, the present application also provides a container performance monitoring apparatus, the apparatus comprising:
the parameter acquisition module is used for sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for instructing each data acquisition device to acquire the performance parameters of each container in the corresponding working node;
and the performance monitoring module is used for monitoring the performance of the corresponding container according to the performance parameters of each container.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method in any of the embodiments of the first aspect described above when the computer program is executed.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of the method in any of the embodiments of the first aspect described above.
The container performance monitoring method, the device, the equipment, the medium and the program product are applied to a container management cluster, firstly, an acquisition instruction is sent to each data acquisition unit through a management node, the acquisition instruction is used for instructing each data acquisition unit to acquire the performance parameters of each container in a working node to which each data acquisition unit belongs, and then the performance of the corresponding container is monitored according to the performance parameters of each container. The container management cluster comprises a management node and a plurality of working nodes, wherein each working node comprises a plurality of containers and a data collector. In the method, the management node sends the acquisition instruction to each data acquisition device, which is equivalent to the management node being capable of acquiring the container change of the working node to which each data acquisition device belongs and acquiring accurate container management cluster information. Further, the management node sends an acquisition instruction to the data acquisition unit, and monitors the performance of the corresponding container according to the performance parameters acquired by the data acquisition unit, that is, the management node performs unidirectional communication with the data acquisition unit, which means that the basis for monitoring the performance of the container is the performance parameters acquired by each data acquisition unit, and the performance parameters acquired by the data acquisition unit do not need to be returned to the management node. The container performance monitoring method reduces the load pressure of the management node, and supports the collection of a plurality of container performance parameters, thereby realizing the monitoring of the performance of a plurality of containers.
Drawings
FIG. 1 is a diagram of an application environment for a container performance monitoring method in one embodiment;
FIG. 2 is a flow diagram of a method of monitoring container performance in one embodiment;
FIG. 3 is a schematic diagram of a structure of a container orchestration cluster according to one embodiment;
FIG. 4 is a flow chart of a process for collecting parameters in one embodiment;
FIG. 5 is a flow chart of a method of monitoring container performance in another embodiment;
FIG. 6 is a schematic diagram of a method of monitoring container performance in one embodiment;
FIG. 7 is a schematic diagram of another embodiment of a method for monitoring container performance;
FIG. 8 is a flow chart of an acquisition cycle adjustment step in one embodiment;
FIG. 9 is a schematic diagram of another embodiment of a method for monitoring container performance;
FIG. 10 is a flow diagram of a container orchestration cluster deployment step in one embodiment;
FIG. 11 is a block diagram of a container performance monitoring apparatus in one embodiment;
fig. 12 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The container performance monitoring method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the container management cluster 101 comprises a management node and a plurality of working nodes, and the monitoring device 102 is in communication connection with the container management cluster 101. The monitoring device 102 may be a stand-alone monitoring component, or an alarm component, or a database component, or a monitoring combination of a collection monitoring component, an alarm component, and a database component, such as a Prometaplus (Prometaplus) monitoring combination.
With the surge of the original climax of the cloud, the application of the cloud entering is impossible. Taking the financial industry as an example, as the service grows, the calling link becomes more and more complex, the corresponding service data has explosive growth, and the collection pressure of the container performance data is increased.
For the management of multiple application containers, a container arrangement tool is generally used for arranging the multiple application containers on the cloud, multiple containers are integrated through a working node, and the management of each container can be realized by communicating with each container collector in the working node according to a management node.
In the related art, when monitoring the performance data of the container, one collector is deployed for each application container independently, however, the application container and the collector are coupled too tightly, and no induction upgrading of the container application can be achieved. In addition, in the process of collecting the container performance data, each time, the server of the management node is required to obtain the performance parameters of each container application, when the number of containers is too large, the load pressure of the management node is too large, and the efficiency of collecting the container performance data is limited.
Based on the above, the application provides a container performance monitoring method, which is characterized in that a data collector is used for collecting real-time performance parameters of each container of a plurality of affiliated working nodes, so that the monitoring of each container is realized. Next, a method for monitoring the performance of a container will be described by using a container cluster stored in a cloud Key Value pair (Key-Value, KV) as an application object.
In one embodiment, as shown in fig. 2, there is provided a container performance monitoring method applied to a container management cluster, where the container management cluster includes a management node and a plurality of working nodes, each working node includes a plurality of containers and a data collector, and includes the following steps:
s201, sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for instructing each data acquisition device to acquire real-time performance parameters of each container in the corresponding working node.
In the container management cluster, one management Node (Master Node) and a plurality of working nodes (Worker nodes) are included. As shown in FIG. 3, the architecture of the container management cluster in the implementation of the present application, the management node includes an application program interface Server (Application Program Interface Server, API Server), a Scheduler (Scheduler), a controller manager (Controller manager) and a storage node, and the API Server is an external interface of the whole container management cluster; scheduling algorithm is used by Scheduler to schedule resources in the cluster and schedule the request resources to a certain working node; controller manager is responsible for managing the controller and control plane for scheduler and node status detection. A working node is a node that actually deploys container operations, comprising a plurality of operation units (Pod), one Pod representing a process running in a cluster, internally encapsulating one or more tightly related containers. In each working node, a data collector, such as a multifunctional data sensor or a performance parameter collection tool, is deployed for collecting real-time performance parameters of each container in the working node.
In the container management cluster architecture shown in fig. 3, a management node is in communication connection with each working node, and in the process of monitoring the performance of a container, an acquisition instruction is sent to a data acquisition device deployed in each working node through the management node, and then, in response to the acquisition instruction, performance parameters of each container in the working node are acquired through an acquisition channel of the data acquisition device and each container in the working node. It should be understood that the number of acquisition channels corresponding to one data acquisition unit is the same as the number of containers in the associated working node, i.e. one data acquisition unit may correspond to a plurality of acquisition channels, each acquisition channel connecting a data acquisition unit in the same working node and a single container in that working node.
S202, monitoring the performance of each container according to the real-time performance parameters of each container.
The real-time performance parameters of each container can objectively reflect the real-time performance of the corresponding container and the working node to which the container belongs, and the performance of each container is monitored by analyzing, comparing or trend reasoning the real-time performance parameters of each container, wherein common performance analysis methods include a graph demonstration method, an inflection point method and the like.
Illustratively, the performance parameters include a memory index, a central processing unit (central processing unit, CPU) index, a disk I/O index and a network flow index, so that the total memory and the remaining available memory of the working node where the container is located can be monitored according to the memory index, and the CPU load and the utilization rate can be monitored according to the CPU index; the time consumed by reading and the time consumed by writing of each I/O can be monitored according to the I/O index of the disk; the amount of data each container transmits over the network may be monitored based on network traffic.
The container performance monitoring method provided by the embodiment of the application is applied to a container management cluster, firstly, an acquisition instruction is sent to each data acquisition unit through a management node, the acquisition instruction is used for indicating each data acquisition unit to acquire the performance parameters of each container in a working node to which each data acquisition unit belongs, and then, the performance of the corresponding container is monitored according to the performance parameters of each container. The container management cluster comprises a management node and a plurality of working nodes, wherein each working node comprises a plurality of containers and a data collector. In the method, the management node sends the acquisition instruction to each data acquisition device, which is equivalent to the management node being capable of acquiring the container change of the working node to which each data acquisition device belongs and acquiring accurate container management cluster information. Further, the management node sends an acquisition instruction to the data acquisition unit, and monitors the performance of the corresponding container according to the performance parameters acquired by the data acquisition unit, that is, the management node performs unidirectional communication with the data acquisition unit, which means that the basis for monitoring the performance of the container is the performance parameters acquired by each data acquisition unit, and the performance parameters acquired by the data acquisition unit do not need to be returned to the management node. The container performance monitoring method reduces the load pressure of the management node, and supports the collection of a plurality of container performance parameters, thereby realizing the monitoring of the performance of a plurality of containers.
The process of monitoring container management clusters is typically performed on the performance parameters of each cluster. Based on this, a manner of collecting the performance parameters of each cluster will be described below by way of one embodiment.
In one embodiment, sending, by the management node, an acquisition instruction to each data acquisition device includes:
sending an acquisition instruction to each data acquisition device through a management node according to a preset acquisition period; or if the state of the data collector is detected to be changed, sending an acquisition instruction to each data collector through the management node.
Accessing the management node according to a preset acquisition period, and acquiring the latest information of each data acquisition device through the management node. If the state of the data collector changes in the communication period, the data collector sends an acquisition instruction to each data collector through the management node immediately.
In the embodiment of the application, the management node sends the acquisition instruction to each data acquisition unit at regular time, the state of the data acquisition unit is detected, the acquisition burden of real-time performance data is lightened, and in addition, the acquisition state of the data acquisition unit is updated in time by detecting the state of each data acquisition unit, so that accurate real-time performance data is acquired.
In the process of monitoring the performance of each container, the real-time performance parameters of each container are generally collected and analyzed to obtain accurate and effective performance evaluation results. Based on this, the process of collecting real-time performance parameters of each container is described below by way of one embodiment.
In one embodiment, as shown in fig. 4, the process of collecting the real-time performance parameters of each container in the working node to which each data collector belongs includes:
s401, for any data collector, calling the collection interface of each container in the working node to which the data collector belongs.
In a container management cluster, a plurality of working nodes are generally included, each working node corresponds to one data collector, and each data collector collects performance parameters of each container in the working node to which the data collector belongs.
And for any data collector, carrying a working node identifier, and acquiring the information of the working node to which the data collector belongs according to the working node identifier of the data collector, wherein the information comprises the number of containers in the working node to which the data collector belongs and the acquisition interfaces of the containers.
S402, collecting real-time performance parameters of each container in the working node to which the data collector belongs by connecting the data collector with a collection interface.
And the data acquisition device is connected with the acquisition interfaces of all containers in the corresponding working node to construct an acquisition channel of the data acquisition device, and all the acquisition interfaces transmit the real-time performance parameters of the corresponding containers to the data acquisition device through the acquisition channel.
For example, if a working node includes n Pods, where a container is integrated in each Pod, n collection channels exist in the working node, and one end of each of the n collection channels is connected to a data collector in the working node, and the other ends of the n collection channels are respectively connected to collection interfaces of the containers in the working node.
In the embodiment of the application, in one working node, the coupling relation between each container and each container collecting interface is relieved by connecting the collector with the collecting interface of each container in the working node, so that the collecting function of each container independently operates, and the application noninductive upgrading corresponding to each container is realized. And the real-time performance parameters of all the containers in the working node are acquired through the data acquisition device, so that the real-time performance parameters of a plurality of containers are conveniently integrated and analyzed, and the resource waste caused by independently deploying the data acquisition device for all the containers is avoided.
After the real-time performance parameters of each container are obtained, multi-dimensional comparative analysis and evaluation are generally performed on the real-time performance parameters of each container, so as to effectively monitor the performance of each container. Based on this, a manner of monitoring the performance of the container will be described below by way of one example.
In one embodiment, as shown in FIG. 5, monitoring the performance of each container based on the real-time performance parameters of each container includes:
s501, comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range.
The performance parameter range is derived from the values of the performance parameters of each container during normal operation. For any type of performance parameter, there is a range of performance parameters, so different types of performance parameters correspond to different ranges of performance parameters. It should be appreciated that even for the same type of performance parameter, the range of performance parameters corresponding to different containers may be the same or different. Therefore, the performance parameter range is determined jointly according to the container and the performance parameter type of the container, and the performance parameter range is preset, can be a closed section consisting of two real-time performance parameter values, and can also be an open section consisting of one real-time performance parameter and a comparison symbol, wherein the comparison symbol is any one of ">", "<", "> or". Gtoreq".
After the values of the real-time performance parameters and the corresponding performance parameter ranges of the containers are obtained, the performance parameter ranges are used as monitoring standards to be compared with the values of the real-time performance parameters of the containers, and the comparison results of the real-time performance parameters of the containers are obtained.
Alternatively, the comparison method may be a difference making method, in which the value of the real-time performance parameter of each container is made to be different from the corresponding performance parameter range, and the comparison result of the real-time performance parameter value of each container is obtained by judging the difference making result.
Optionally, the comparison method may be a labeling method, wherein the values of the real-time performance parameters and the corresponding performance parameter ranges of each container are labeled on a numerical axis, and the comparison result of the real-time performance parameter values of each container is obtained by analyzing the standard result.
And S502, monitoring the performance of each container according to the comparison result.
The comparison results include a plurality of comparison results of the value of the real-time performance parameter of each container with the corresponding performance parameter range, reflecting whether the real-time performance parameter of each container is within the corresponding performance parameter range.
For any container, if the real-time performance parameter of the container is in the corresponding performance parameter range, indicating that the running state of the container is normal; if the real-time performance parameters of the container are not in the corresponding performance parameter ranges, the abnormal running state of the container is indicated, and at the moment, the container in the container management cluster is required to be managed and controlled according to a preset strategy.
In the embodiment of the application, by comparing the values of the real-time performance parameters of the containers with the corresponding performance parameter ranges, whether the values of the real-time performance parameters of the containers meet the requirements can be clearly and rapidly judged, the performance of the containers is further monitored according to the comparison result, and the performance monitoring efficiency of the containers is improved.
The foregoing embodiment describes the monitoring basis of the performance of each container, where the monitoring basis is the comparison result of the value of the real-time performance parameter of each container and the corresponding performance parameter range. When the real-time performance parameters of the containers are in the corresponding performance parameter ranges, the running state of the containers is normal, and the containers are not required to be changed at the moment, otherwise, the condition that the real-time performance parameters of the containers are not in the corresponding performance parameter ranges is indicated, and the running state is abnormal, in this case, the performance of each container is required to be monitored, and therefore, by means of an embodiment, the monitoring method of the performance of each container is described below under the condition that the comparison result is abnormal.
In one embodiment, monitoring the performance of each container based on the comparison results includes:
and if the comparison result shows that at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, adjusting the configuration information of the container to which each target real-time performance parameter belongs so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
The comparison result includes whether the real-time performance parameters of the containers are in the corresponding performance parameter ranges, the real-time performance parameters which are not in the corresponding performance parameter ranges are taken as target real-time performance parameters, and the containers corresponding to the target real-time performance parameters are taken as target containers, i.e. one target real-time performance parameter or a plurality of target real-time performance parameters can be arranged in the comparison result.
The comparison result indicates that the target real-time performance parameters exist, which means that the container corresponding to the target real-time performance parameters is configured abnormally, and the configuration information of the container with the configuration abnormality can be called at the moment, and the configuration information of the container to which each target real-time performance parameter belongs is adjusted until the value of the target real-time performance parameter meets the corresponding performance parameter range.
The collected real-time performance parameters are stored in a distributed database, as shown in fig. 6, and the console is in communication connection with the distributed database, and adjusts configuration information of a container to which each target real-time performance parameter belongs through the console, so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
In the embodiment of the present application, by acquiring the target real-time performance parameters in the comparison result, configuration information of the container to which each target real-time performance parameter belongs can be adjusted in a targeted manner, and the values of the target real-time performance parameters have time sequence, which means that in the process of adjusting the configuration information of the container, the configuration adjustment process can be selected to be continued or terminated through the change of the values of the target real-time performance parameters, so that flexibility of the container performance monitoring method is improved.
In the process of monitoring the performance of the container, when at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, besides adjusting the configuration information of the container to which the target real-time performance parameter belongs, the target real-time performance parameter can be alarmed to monitor the validity of the configuration information adjustment. Based on this, the alarm function of the container performance monitoring method will be described below by way of one embodiment.
In one embodiment, the container performance monitoring method further comprises:
if at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, warning information is sent out; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
If at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, continuously comparing each target real-time performance parameter with the corresponding performance parameter range according to a preset interval, and triggering warning information to indicate the abnormal performance of the container to which each target real-time performance parameter belongs when the same target real-time performance parameter exists in the continuous and repeated comparison results. The warning information can be warning by short messages, mails, buzzers and the like, and the form of the warning information is not limited in the application.
The collected real-time performance parameters are stored in a distributed database, as shown in fig. 7, the monitoring platform is in communication connection with the distributed database, the real-time performance data are read through the monitoring platform, if the target real-time performance parameters exist, an alarm is given, and the alarm information comprises configuration information of the target real-time performance parameters.
Optionally, if at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, performing multi-index comprehensive detection on the container to which each target real-time performance parameter belongs, and if the comprehensive detection value reaches a threshold value, sending out warning information.
In addition, the warning information in the embodiment of the application can also carry out multidimensional warning by acquiring information in various scenes in the container management cluster, such as backup or backup synchronization of the main equipment, and carry out warning; when the factors influencing the availability of the clusters exist, alarming is carried out; and when the number of seconds of the synchronous disconnection of the main server and the standby server exceeds a threshold value, alarming is carried out.
It should be noted that, the warning information in the embodiment of the present application supports a synchronization rule, that is, there is an abnormality of the target real-time performance parameter, and the warning is synchronized; supporting a ring ratio complex warning rule, namely that a target real-time performance parameter abnormality exists, comparing the container performance parameter to which the target real-time performance parameter belongs with a preset threshold again, and warning under the condition that the container performance parameter does not accord with the preset threshold; and supporting a warning pause function, namely stopping warning when the target real-time performance parameter is restored to be within the range of the corresponding performance parameter after adjustment.
In the embodiment of the application, the warning information indicates that the performance of the container to which each target real-time performance parameter belongs is abnormal, so that related personnel can conveniently and quickly search the container to which the target real-time performance parameter belongs, and the monitoring efficiency is improved while the operation and maintenance burden is reduced.
The performance of each container is monitored, including a series of operations such as collecting, storing, and reading the performance parameters of each container. The container performance data has the characteristics of time sequence, large data volume and the like, a single node cannot be used for storage, if the number of containers is increased, or the performance parameters are diversified, or the acquisition frequency is accelerated, the time sequence database storage in the related technology cannot be transversely expanded, the read-write performance of the data is limited by the storage resources of the database, and the access and the inquiry of massive data cannot be supported. Based on this, a manner of storing the performance parameters will be described below by way of one embodiment.
In one embodiment, before monitoring the performance of each container based on the real-time performance parameters of each container, the method further comprises:
storing the real-time performance parameters of each container into a distributed database; the real-time performance parameters of all containers in the distributed database are respectively placed in different performance parameter tables according to the types of the performance parameters for partition storage.
After the real-time performance parameters of each container are obtained, the real-time performance parameters of each container are distinguished according to the types of the performance parameters, and the real-time performance parameters of each container are stored in the form of a performance parameter table. Illustratively, if the real-time performance parameters of each container are collected in 4 types, 4 performance parameter tables are correspondingly generated, and each performance parameter table comprises the value of one real-time performance parameter of each container.
Further, the data in each performance parameter table is split horizontally through the distributed database, and is stored through splitting table partitions, and the process of partition storage is as follows:
(1) And evaluating the basic information. A single storage node stores a maximum of 100GB.
(2) And acquiring the total data of each performance parameter table. And acquiring a storage space according to the performance parameter type, the acquisition frequency, the number of containers, the stored time interval and the memory for acquiring data. For example, the types of performance parameters to be collected include CPU, memory, disk I/O and network traffic; collecting 10w containers, wherein the collection frequency is 2s, each piece of data is 1KB, and the data is reserved for two years; the total data of each performance parameter table needs to reserve 500GB space, and then 4 tables need to reserve 2TB space in total according to the calculation that the table utilization rate is not more than 60 percent of the total.
(3) And obtaining the number of the logic fragments. And obtaining the number of the logic fragments according to the ratio of the planned total data volume to the storage volume of the single storage node. The number of logical fragments is to be a power of 2. For example, the storage capacity of a single storage node is 100GB, and 32 logical slices are allocated to store 2TB data according to the logical slice algorithm.
(4) Partitioning the performance parameter table according to a preset time period, and establishing partition identification for each partition. For example, the performance parameter table is partitioned according to months, 24 partitions can be set for retaining data of two years, and 24 partition identifications are corresponding to the partitions.
(5) And inserting data. Taking the example of inserting data into the CPU performance data detail table, acquiring the partition where the data is located through a partition identification algorithm, and placing the data in the acquired partition position.
(6) And cleaning data. And acquiring the corresponding time of all the partitions, reserving the data of each partition in a preset time interval, and cleaning the partition data outside the preset time interval. For example, there are 36 partitions, and 0-35 partitions store performance parameter data for 36 months continuously, and if partition data of the last two years is to be reserved, the reserved partition should be 24 partitions of [12-35], and then the background timing task can clean up partition data of 12 partitions of [0-11 ]. Similarly, the partition data except [12-23] needs to be cleaned in the next month.
In the distributed database, a client accesses a distributed database computing layer (distributed middleware) through a domain name, and the computing layer loads metadata layer database cluster information data when running for the first time and routes a user request to a storage layer so as to store the data to a designated fragment. Because the metadata information is stored in the metadata layer, the computing layer has the stateless characteristic, and the performance expansion is convenient to realize.
According to the embodiment of the application, the real-time performance parameters of each container are stored in a partitioning mode through the distributed database, and the data are stored in databases in different physical positions in a scattered mode, so that the transverse expansion of the database storage can be achieved, and the access and the query of mass data are supported.
In one embodiment, each type of performance parameter table includes a performance data detail table and a performance data summary table; the performance data summary table is generated by summarizing according to the preset duration according to the performance data detail table; the performance data list is used for inquiring performance data in a first time range, and the performance data list is used for inquiring performance data in a second time range, wherein the first time range is smaller than the second time range.
Dividing each type of performance parameter table according to the acquisition frequency, generating a performance data list according to the performance parameters of each container acquired by the actual acquisition frequency, and summarizing the acquisition frequency and the acquisition data of the performance data list according to the preset time length to generate a performance data summary table. For example, the performance data list is acquired every 2s according to the acquisition frequency, and if the preset time length is 1 hour, the acquired data corresponding to each hour in the performance data list is averaged to be used as a group of acquired data.
The performance data list is used for inquiring the performance data in a first time range, and the performance data summary table is used for inquiring the performance data in a second time range, wherein the difference between the performance data list and the performance data summary table is the interval of the inquiring time range, and the first time range is smaller than the second time range.
Illustratively, the performance data list is an acquisition frequency of 2s, and the performance data summary list is an acquisition comment of 1 hour, then when a user needs to query for performance data of tens of seconds, or hours, the corresponding performance data list can be viewed; when a user needs to query performance data for multiple days or months, the corresponding performance data summary table may be viewed.
According to the embodiment of the application, the performance data detail table and the performance data summary table are used for distinguishing the performance parameter tables of all types, so that the performance data query instructions in different time ranges can be met. Obviously, as the total amount of data increases, the flexibility of the performance data summary table provided by the embodiment of the application is higher.
In the container performance monitoring method, the abnormal value of the performance parameter of the container cannot be predicted, and the collection frequency is generally adjusted according to the performance parameter of the container, so that the collected performance parameter of the container can more comprehensively reflect the actual running state of the corresponding container.
In one embodiment, as shown in fig. 8, the container performance monitoring method further comprises:
s801, obtaining average comprehensive values of various performance parameters in a preset time window in a distributed database.
In the distributed database, according to the values of the performance parameters in each performance parameter table in a preset time window, summing and averaging the values of each performance parameter to obtain the average comprehensive value of each performance parameter table, and then according to the average value of the performance parameter table, continuing to sum and average the average value to obtain the average comprehensive value of each type of performance parameter. I.e. one distributed database corresponds to one average composite value.
S802, if the average integrated value exceeds the early warning threshold value, the acquisition period of acquiring the real-time performance parameters of each container is adjusted.
If the average integrated value of the various types of performance parameters exceeds a preset threshold, the container management cluster is indicated to have abnormal container states, and the collection period for collecting the real-time performance parameters of each container is shortened.
According to the embodiment of the application, the running state of each container performance parameter is objectively quantized by acquiring the average comprehensive value in the distributed database, and under the condition that the average comprehensive value exceeds the early warning threshold value, the acquisition frequency of the real-time performance parameter of each container is adjusted, so that the acquired real-time performance parameter is more closely corresponding to the actual running state of the container, and the effectiveness of monitoring the container performance is improved.
The container performance is monitored, the data of the container performance parameters are analyzed and controlled, the data of the container performance parameters are obviously displayed, and the container performance data analysis and control process can be clearer and more transparent. Based on this, a description will be given below of a data presentation function of the container performance monitoring method by way of one embodiment.
In one embodiment, the container performance monitoring method further comprises:
and responding to the container performance data display instruction, and displaying each performance parameter table into an interface of a display platform.
And responding to the container performance data display instruction, acquiring a performance parameter table conforming to the container performance data display instruction, and displaying the acquired performance parameter table in an interface of a display platform.
Illustratively, the collected real-time performance parameters are stored in a distributed database, as shown in fig. 9, and a display platform is communicatively connected to the distributed database, and each performance parameter table is displayed in an interface of the display platform in response to a container performance data display instruction.
Optionally, if the container performance data display instruction is a CPU performance data list, acquiring a corresponding CPU performance data list according to the partition identifier, the collection time, the container name, the collection frequency and the performance data list name in the distributed database, and displaying the CPU performance data list in the interface of the display platform.
Optionally, if the container performance data display instruction is a CPU performance data summary table, acquiring a corresponding CPU performance data summary table according to the partition identifier, the collection time, the container name, the collection frequency, and the performance data detail table name in the distributed database, and displaying the CPU performance data summary table in an interface of the display platform.
It should be appreciated that the container performance exposure instructions may also be a memory performance data schedule, a memory performance data summary schedule, a disk I/O performance data summary schedule, a network traffic performance data schedule.
In the embodiment of the application, by responding to the container performance data display instruction and displaying each performance parameter table to the interface of the display platform, the container performance data analysis and management and control process can be clearer and more transparent, and the performance parameters of each container in the container management cluster can be conveniently known.
The container performance monitoring methods in the foregoing embodiments are all applied to a container management cluster, and in one embodiment, as provided in fig. 10, a method for deploying a container management cluster before monitoring container performance, the method includes:
S1001, arranging all containers in a container management cluster through a management node to generate a plurality of working nodes; each working node includes one or more containers.
All containers in the container management cluster are arranged through the management node, a plurality of container groups, namely operation units shown in fig. 3, are obtained, one or more container groups are combined and stored in one working node, and in the embodiment of the present application, one container corresponds to each operation unit.
S1002, a data collector is correspondingly deployed in each working node.
According to the number of the working nodes, a corresponding number of data collectors are obtained, and the collectors are deployed into the corresponding machine nodes one by one. In any working node, the data collector establishes communication with each container in the working node, so that the data collector can collect real-time performance parameters of each container in the working node.
According to the embodiment of the application, only one data collector is deployed in each working node, and the real-time performance parameters of a plurality of containers can be collected through the data collectors, so that the coupling relation between each container and the data collectors can be reduced, and the noninductive upgrading of the containers is realized.
In one embodiment, a method of monitoring container performance is provided, the method comprising the steps of:
(1) Arranging all containers in the container management cluster through the management node to generate a plurality of working nodes; each working node includes one or more containers.
(2) And correspondingly disposing a data collector in each working node.
(3) Storing the real-time performance parameters of each container into a distributed database.
The real-time performance parameters of all containers in the distributed database are respectively placed in different performance parameter tables according to the types of the performance parameters for partition storage.
(4) Sending an acquisition instruction to each data acquisition device through a management node according to a preset acquisition period; or if the state of the data collector is detected to be changed, sending an acquisition instruction to each data collector through the management node. The collection instruction is used for indicating each data collector to collect the real-time performance parameters of each container in the corresponding working node.
(5) And calling the collection interface of each container in the working node to which the data collector belongs for any data collector.
(6) And collecting real-time performance parameters of each container in the working node to which the data collector belongs by connecting the data collector with the collection interface.
(7) And comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range.
(8) And if the comparison result shows that at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, adjusting the configuration information of the container to which each target real-time performance parameter belongs so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
(9) If at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, warning information is sent out; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
(10) And monitoring the performance of each container according to the real-time performance parameters of each container.
(11) And obtaining the average comprehensive value of various performance parameters in a preset time window in the distributed database.
(12) And if the average integrated value exceeds the early warning threshold value, adjusting the acquisition period for acquiring the real-time performance parameters of each container.
(13) And responding to the container performance data display instruction, and displaying each performance parameter table into an interface of a display platform.
The container performance monitoring method provided by the embodiment of the application is applied to a container management cluster, firstly, an acquisition instruction is sent to each data acquisition unit through a management node, the acquisition instruction is used for indicating each data acquisition unit to acquire the performance parameters of each container in a working node to which each data acquisition unit belongs, and then, the performance of the corresponding container is monitored according to the performance parameters of each container. The container management cluster comprises a management node and a plurality of working nodes, wherein each working node comprises a plurality of containers and a data collector. In the method, the management node sends the acquisition instruction to each data acquisition device, which is equivalent to the management node being capable of acquiring the container change of the working node to which each data acquisition device belongs and acquiring accurate container management cluster information. Further, the management node sends an acquisition instruction to the data acquisition unit, and monitors the performance of the corresponding container according to the performance parameters acquired by the data acquisition unit, that is, the management node performs unidirectional communication with the data acquisition unit, which means that the basis for monitoring the performance of the container is the performance parameters acquired by each data acquisition unit, and the performance parameters acquired by the data acquisition unit do not need to be returned to the management node. The container performance monitoring method reduces the load pressure of the management node, and supports the collection of a plurality of container performance parameters, thereby realizing the monitoring of the performance of a plurality of containers.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a container performance monitoring device for realizing the container performance monitoring method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitations in one or more embodiments of the container performance monitoring device provided below may be referred to above as limitations of the container performance monitoring method, and will not be described herein.
In one embodiment, as shown in FIG. 11, there is provided a container performance monitoring apparatus 1100 comprising: a parameter acquisition module 1120 and a performance monitoring module 1140, wherein:
the parameter acquisition module 1120 is used for sending an acquisition instruction to each data acquisition unit through the management node, wherein the acquisition instruction is used for instructing each data acquisition unit to acquire real-time performance parameters of each container in the corresponding working node;
the performance monitoring module 1140 is configured to monitor performance of each container according to the real-time performance parameter of each container.
In one embodiment, the parameter acquisition module 1120 is further configured to send an acquisition instruction to each data acquisition device through the management node according to a preset acquisition period; or if the state of the data collector is detected to be changed, sending an acquisition instruction to each data collector through the management node.
In one embodiment, the parameter collection module 1120 includes an interface calling unit and an interface connection unit, where:
the interface calling unit is used for calling the collection interfaces of all containers in the working node to which the data collector belongs for any data collector;
the interface connection unit is used for collecting real-time performance parameters of each container in the working node to which the data collector belongs by connecting the data collector with the collection interface.
In one embodiment, the performance monitoring module 1140 includes: a range comparison unit and a result analysis unit, wherein:
the range comparison unit is used for comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range;
and the result analysis unit is used for monitoring the performance of each container according to the comparison result.
In one embodiment, the result analysis unit is further configured to, if the comparison result indicates that there is at least one target real-time performance parameter that does not satisfy the corresponding performance parameter range, adjust configuration information of a container to which each target real-time performance parameter belongs, so that a value of each target real-time performance parameter satisfies the corresponding performance parameter range.
In one embodiment, the container performance monitoring apparatus 1100 further includes a warning module, where the warning module is configured to send out warning information if there is at least one target real-time performance parameter that does not meet the corresponding performance parameter range; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
In one embodiment, the container performance monitoring apparatus 1100 further includes a parameter storage module, where the parameter storage module is configured to store real-time performance parameters of each container into a distributed database; the real-time performance parameters of all containers in the distributed database are respectively placed in different performance parameter tables according to the types of the performance parameters for partition storage.
In one embodiment, each type of performance parameter table includes a performance data detail table and a performance data summary table; the performance data summary table is generated by summarizing according to the preset duration according to the performance data detail table; the performance data list is used for inquiring performance data in a first time range, and the performance data list is used for inquiring performance data in a second time range, wherein the first time range is smaller than the second time range.
In one embodiment, the container performance monitoring apparatus 1100 further comprises an integrated value acquisition module and a period adjustment module, wherein:
the comprehensive value acquisition module is used for acquiring average comprehensive values of various performance parameters in a preset time window in the distributed database;
and the period adjustment module is used for adjusting the acquisition period for acquiring the real-time performance parameters of each container if the average integrated value exceeds the early warning threshold value.
In one embodiment, the container performance monitoring apparatus 1100 further comprises a parameter presentation module for presenting each performance parameter form into an interface of a presentation platform in response to the container performance data presentation instructions.
In one embodiment, container performance monitoring apparatus 1100 further comprises a container orchestration module and a collector deployment module, wherein:
The container arrangement module is used for arranging all containers in the container management cluster through the management node to generate a plurality of working nodes; each working node comprising one or more of said containers;
and the collector deployment module is used for correspondingly deploying one data collector in each working node.
The various modules in the container performance monitoring apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 12. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing container performance monitoring data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a container performance monitoring method.
It will be appreciated by those skilled in the art that the structure shown in fig. 12 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for instructing each data acquisition device to acquire real-time performance parameters of each container in the working node to which each data acquisition device belongs;
and monitoring the performance of each container according to the real-time performance parameters of each container.
In one embodiment, the processor when executing the computer program further performs the steps of:
sending an acquisition instruction to each data acquisition device through a management node according to a preset acquisition period; or alternatively, the process may be performed,
and if the state of the data acquisition device is detected to be changed, sending an acquisition instruction to each data acquisition device through the management node.
In one embodiment, the processor when executing the computer program further performs the steps of:
for any data collector, calling the collection interface of each container in the working node to which the data collector belongs;
and the real-time performance parameters of all containers in the working node to which the data acquisition device belongs are acquired by connecting the data acquisition device with the acquisition interface.
In one embodiment, the processor when executing the computer program further performs the steps of:
comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range;
and monitoring the performance of each container according to the comparison result.
In one embodiment, the processor when executing the computer program further performs the steps of:
and if the comparison result shows that at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, adjusting the configuration information of the container to which each target real-time performance parameter belongs so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
In one embodiment, the processor when executing the computer program further performs the steps of:
if at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, warning information is sent out; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
In one embodiment, the processor when executing the computer program further performs the steps of:
storing the real-time performance parameters of each container into a distributed database; the real-time performance parameters of all containers in the distributed database are respectively placed in different performance parameter tables according to the types of the performance parameters for partition storage.
In one embodiment, each type of performance parameter table includes a performance data detail table and a performance data summary table; the performance data summary table is generated by summarizing according to the preset duration according to the performance data detail table; the performance data list is used for inquiring performance data in a first time range, and the performance data list is used for inquiring performance data in a second time range, wherein the first time range is smaller than the second time range.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring average comprehensive values of various performance parameters in a preset time window in a distributed database;
and if the average integrated value exceeds the early warning threshold value, adjusting the acquisition period for acquiring the real-time performance parameters of each container.
In one embodiment, the processor when executing the computer program further performs the steps of:
And responding to the container performance data display instruction, and displaying each performance parameter table into an interface of a display platform.
In one embodiment, the processor when executing the computer program further performs the steps of:
arranging all containers in a container management cluster through a management node to generate a plurality of working nodes; each working node comprising one or more of said containers;
and correspondingly deploying a data collector in each working node.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for instructing each data acquisition device to acquire real-time performance parameters of each container in the working node to which each data acquisition device belongs;
and monitoring the performance of each container according to the real-time performance parameters of each container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
sending an acquisition instruction to each data acquisition device through a management node according to a preset acquisition period; or alternatively, the process may be performed,
and if the state of the data acquisition device is detected to be changed, sending an acquisition instruction to each data acquisition device through the management node.
In one embodiment, the computer program when executed by the processor further performs the steps of:
for any data collector, calling the collection interface of each container in the working node to which the data collector belongs;
and the real-time performance parameters of all containers in the working node to which the data acquisition device belongs are acquired by connecting the data acquisition device with the acquisition interface.
In one embodiment, the computer program when executed by the processor further performs the steps of:
comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range;
and monitoring the performance of each container according to the comparison result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and if the comparison result shows that at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, adjusting the configuration information of the container to which each target real-time performance parameter belongs so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, warning information is sent out; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
In one embodiment, the computer program when executed by the processor further performs the steps of:
storing the real-time performance parameters of each container into a distributed database; the real-time performance parameters of all containers in the distributed database are respectively placed in different performance parameter tables according to the types of the performance parameters for partition storage.
In one embodiment, each type of performance parameter table includes a performance data detail table and a performance data summary table; the performance data summary table is generated by summarizing according to the preset duration according to the performance data detail table; the performance data list is used for inquiring performance data in a first time range, and the performance data list is used for inquiring performance data in a second time range, wherein the first time range is smaller than the second time range.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring average comprehensive values of various performance parameters in a preset time window in a distributed database;
and if the average integrated value exceeds the early warning threshold value, adjusting the acquisition period for acquiring the real-time performance parameters of each container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
And responding to the container performance data display instruction, and displaying each performance parameter table into an interface of a display platform.
In one embodiment, the computer program when executed by the processor further performs the steps of:
arranging all containers in a container management cluster through a management node to generate a plurality of working nodes; each working node comprising one or more of said containers;
and correspondingly deploying a data collector in each working node.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for instructing each data acquisition device to acquire real-time performance parameters of each container in the working node to which each data acquisition device belongs;
and monitoring the performance of each container according to the real-time performance parameters of each container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
sending an acquisition instruction to each data acquisition device through a management node according to a preset acquisition period; or alternatively, the process may be performed,
and if the state of the data acquisition device is detected to be changed, sending an acquisition instruction to each data acquisition device through the management node.
In one embodiment, the computer program when executed by the processor further performs the steps of:
for any data collector, calling the collection interface of each container in the working node to which the data collector belongs;
and the real-time performance parameters of all containers in the working node to which the data acquisition device belongs are acquired by connecting the data acquisition device with the acquisition interface.
In one embodiment, the computer program when executed by the processor further performs the steps of:
comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range;
and monitoring the performance of each container according to the comparison result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and if the comparison result shows that at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, adjusting the configuration information of the container to which each target real-time performance parameter belongs so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, warning information is sent out; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
In one embodiment, the computer program when executed by the processor further performs the steps of:
storing the real-time performance parameters of each container into a distributed database; the real-time performance parameters of all containers in the distributed database are respectively placed in different performance parameter tables according to the types of the performance parameters for partition storage.
In one embodiment, each type of performance parameter table includes a performance data detail table and a performance data summary table; the performance data summary table is generated by summarizing according to the preset duration according to the performance data detail table; the performance data list is used for inquiring performance data in a first time range, and the performance data list is used for inquiring performance data in a second time range, wherein the first time range is smaller than the second time range.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring average comprehensive values of various performance parameters in a preset time window in a distributed database;
and if the average integrated value exceeds the early warning threshold value, adjusting the acquisition period for acquiring the real-time performance parameters of each container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
And responding to the container performance data display instruction, and displaying each performance parameter table into an interface of a display platform.
In one embodiment, the computer program when executed by the processor further performs the steps of:
arranging all containers in a container management cluster through a management node to generate a plurality of working nodes; each working node comprising one or more of said containers;
and correspondingly deploying a data collector in each working node.
Those skilled in the art will appreciate that implementing all or part of the above-described methods may be accomplished by way of a computer program, which may be stored on a non-transitory computer readable storage medium and which, when executed, may comprise the steps of the above-described embodiments of the methods. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples represent only a few embodiments of the present application, which are described in more detail and are not thereby to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (15)

1. The container performance monitoring method is characterized by being applied to a container management cluster, wherein the container management cluster comprises a management node and a plurality of working nodes, and each working node comprises a plurality of containers and a data collector; the method comprises the following steps:
sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for indicating each data acquisition device to acquire real-time performance parameters of each container in the corresponding working node;
And monitoring the performance of each container according to the real-time performance parameters of each container.
2. The method of claim 1, wherein said sending, by the management node, a collection instruction to each of the data collectors comprises:
sending an acquisition instruction to each data acquisition device through the management node according to a preset acquisition period; or alternatively, the process may be performed,
and if the state of the data collector is detected to be changed, sending an acquisition instruction to each data collector through the management node.
3. The method of claim 1, wherein the process of collecting real-time performance parameters of each container in the working node to which each data collector belongs comprises:
for any data collector, calling the collection interface of each container in the working node to which the data collector belongs;
and acquiring real-time performance parameters of each container in the working node to which the data acquisition device belongs by connecting the data acquisition device with the acquisition interface.
4. A method according to any one of claims 1-3, wherein said monitoring the performance of each of said containers based on real-time performance parameters of each of said containers comprises:
Comparing the value of the real-time performance parameter of each container with the corresponding performance parameter range;
and monitoring the performance of each container according to the comparison result.
5. The method of claim 4, wherein monitoring the performance of each of the containers based on the comparison comprises:
and if the comparison result shows that at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, adjusting the configuration information of the container to which each target real-time performance parameter belongs so that the value of each target real-time performance parameter meets the corresponding performance parameter range.
6. The method of claim 5, wherein the method further comprises:
if at least one target real-time performance parameter which does not meet the corresponding performance parameter range exists, warning information is sent out; the warning information is used for indicating the abnormal performance of the container to which each target real-time performance parameter belongs.
7. A method according to any one of claims 1-3, wherein prior to said monitoring of the performance of each of said containers based on the real-time performance parameters of each of said containers, said method further comprises:
Storing the real-time performance parameters of each container into a distributed database; the real-time performance parameters of the containers in the distributed database are respectively placed in different performance parameter tables for partition storage according to the types of the performance parameters.
8. The method of claim 7, wherein each type of performance parameter table comprises a performance data detail table and a performance data summary table; the performance data summary table is generated by summarizing the performance data detail table according to preset duration;
the performance data list is used for inquiring performance data in a first time range, the performance data summary list is used for inquiring performance data in a second time range, and the first time range is smaller than the second time range.
9. The method of claim 7, wherein the method further comprises:
acquiring average comprehensive values of various performance parameters in a preset time window in the distributed database;
and if the average integrated value exceeds the early warning threshold value, adjusting the acquisition period for acquiring the real-time performance parameters of each container.
10. The method according to claim 9, wherein the method further comprises:
And responding to the container performance data display instruction, and displaying each performance parameter table into an interface of a display platform.
11. A method according to any one of claims 1 to 3, wherein prior to monitoring the performance of the container, the method further comprises:
arranging all containers in the container management cluster through the management node to generate a plurality of working nodes; each of the working nodes includes one or more of the containers;
and correspondingly deploying a data collector in each working node.
12. A container performance monitoring apparatus, the apparatus comprising:
the parameter acquisition module is used for sending an acquisition instruction to each data acquisition device through the management node, wherein the acquisition instruction is used for indicating each data acquisition device to acquire the performance parameters of each container in the corresponding working node;
and the performance monitoring module is used for monitoring the performance of the corresponding container according to the performance parameters of each container.
13. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 11 when the computer program is executed.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 11.
CN202310237296.8A 2023-03-06 2023-03-06 Container performance monitoring method, apparatus, device, medium and program product Pending CN116225620A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310237296.8A CN116225620A (en) 2023-03-06 2023-03-06 Container performance monitoring method, apparatus, device, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310237296.8A CN116225620A (en) 2023-03-06 2023-03-06 Container performance monitoring method, apparatus, device, medium and program product

Publications (1)

Publication Number Publication Date
CN116225620A true CN116225620A (en) 2023-06-06

Family

ID=86585572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310237296.8A Pending CN116225620A (en) 2023-03-06 2023-03-06 Container performance monitoring method, apparatus, device, medium and program product

Country Status (1)

Country Link
CN (1) CN116225620A (en)

Similar Documents

Publication Publication Date Title
CN110661659B (en) Alarm method, device and system and electronic equipment
CN109039833B (en) Method and device for monitoring bandwidth state
CN111049705B (en) Method and device for monitoring distributed storage system
EP2685380A1 (en) Operations management unit, operations management method, and program
CN107656807B (en) Automatic elastic expansion method and device for virtual resources
CN107249135B (en) Video data storage systems and its operating method and index server
KR20150112357A (en) Sensor data processing system and method thereof
CN105939389A (en) Load balancing method and device
CN106100868B (en) A kind of project operation and maintenance device, system and method
CN104917836A (en) Method and device for monitoring and analyzing availability of computing equipment based on cluster
CN103973516A (en) Method and device for achieving monitoring function in data processing system
CN111314158A (en) Big data platform monitoring method, device, equipment and medium
CN111984495A (en) Big data monitoring method and device and storage medium
CN104917639A (en) Cluster monitoring-based method and device for distributing data business
CN109474470A (en) One kind is from monitoring method and device
CN112162912A (en) Cloud resource monitoring method and system
CN114896121A (en) Monitoring method and device of distributed processing system
CN111352746B (en) Message flow limiting method and storage medium
CN116225620A (en) Container performance monitoring method, apparatus, device, medium and program product
CN111784185A (en) Distributed power distribution communication network timed task scheduling system
CN107368355B (en) Dynamic scheduling method and device of virtual machine
CN111240936A (en) Data integrity checking method and equipment
CN110932935A (en) Resource control method, device, equipment and computer storage medium
CN116126621A (en) Task monitoring method of big data cluster and related equipment
CN111563069B (en) Probe configuration method and system of industrial control equipment

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