Virtual node monitoring method and device, equipment, storage medium and program product

By deploying virtual monitoring agent components in the cluster of virtual nodes, collecting and sending monitoring metric data, the data docking problem between cluster-to-monitor services is solved, and the deployment and migration costs are reduced.

CN119938440APending Publication Date: 2025-05-06CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411865643.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In clusters with virtual nodes, it is difficult to connect the monitoring metric data from cluster to monitoring services, resulting in high deployment costs for privatization and data migration costs for workloads.

Method used

By deploying the virtual monitoring agent component in the cluster, the workload in the virtual node is determined, the workload is collected and stored, and the monitoring metric data of the workload is sent to the target monitoring service based on the monitoring metric acquisition endpoint of the virtual node.

Benefits of technology

The monitoring metric data of virtual nodes is connected from the cluster to the target monitoring service, reducing the high cost problem caused by the components that do not carry workload monitoring metric data in the cluster.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938440A_ABST
    Figure CN119938440A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a virtual node monitoring method and device, equipment, a storage medium and a program product, the virtual node monitoring method is applied to a virtual monitoring agent component, the virtual monitoring agent component is deployed in a cluster, and a virtual node corresponding to the virtual monitoring agent component is further deployed in the cluster. Comprising the following steps: determining a workload in the virtual node; collecting and storing monitoring index data of the workload from a monitoring index providing component of the workload; based on the monitoring index acquisition endpoint of the virtual node, sending monitoring index data of the workload to a target monitoring service; the monitoring index acquisition endpoint is registered by the virtual monitoring agent component. Thus, the virtual monitoring agent component can connect the monitoring index data of the virtual node from the cluster to the target monitoring service based on the monitoring index acquisition endpoint, thereby reducing the private deployment cost of the workload and the problem of high data migration cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to, but is not limited to, the field of cloud technology, and in particular to a virtual node monitoring method, apparatus, device, storage medium, and program product. Background Art

[0002] In the related art, in order to reduce the operation and maintenance cost of deploying nodes in a cluster, a cluster with virtual nodes is proposed, where workloads are running on the virtual nodes. However, when the workload monitoring service depends on the customized solution of the service provider, the service provider directly provides the workload monitoring indicator data to the monitoring service. There is no component in the cluster that carries the workload monitoring indicator data, so it is difficult to connect the cluster to the monitoring indicator data of the monitoring service, resulting in high workload privatization deployment costs and data migration costs. Summary of the invention

[0003] In view of this, embodiments of the present application at least provide a virtual node monitoring method, apparatus, device, storage medium and program product.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The embodiment of the present application provides a virtual node monitoring method, which is applied to a virtual monitoring agent component, the virtual monitoring agent component is deployed in a cluster, and a virtual node corresponding to the virtual monitoring agent component is also deployed in the cluster;

[0006] The virtual node monitoring method includes:

[0007] Determine the workload in the virtual node;

[0008] Collect and store workload monitoring indicator data from workload monitoring indicator providing components;

[0009] Based on the monitoring indicator collection endpoint of the virtual node, the monitoring indicator data of the workload is sent to the target monitoring service; the monitoring indicator collection endpoint is registered by the virtual monitoring agent component.

[0010] The embodiment of the present application provides a virtual node monitoring device, which includes:

[0011] A determination module, used to determine the workload in the virtual nodes deployed in the cluster;

[0012] A collection module, used to collect and store workload monitoring indicator data from workload monitoring indicator providing components;

[0013] The sending module is used to send the monitoring indicator data of the workload to the target monitoring service based on the monitoring indicator collection endpoint of the virtual node.

[0014] An embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor can execute the computer program to implement the above-mentioned virtual node monitoring method.

[0015] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to implement the above-mentioned virtual node monitoring method.

[0016] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is executed in a computer device, a processor in the computer device executes some or all of the steps for implementing the above-mentioned virtual node monitoring method.

[0017] An embodiment of the present application provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor, some or all of the steps in the above-mentioned virtual node monitoring method are implemented.

[0018] According to the technical solution provided by the embodiment of the present application, the monitoring indicator data of the workload is collected and stored through the virtual monitoring agent component in the cluster; and based on the monitoring indicator collection endpoint registered by the virtual monitoring agent component, the monitoring indicator data of the workload is sent to the target monitoring service. In this way, the monitoring indicator data of the workload on the virtual node is carried by the virtual monitoring agent component, and the monitoring indicator data of the virtual node can be connected from the cluster to the target monitoring service based on the monitoring indicator collection endpoint, reducing the difficulty of connecting the monitoring indicator data of the cluster to the monitoring service due to the lack of components in the cluster that carry the monitoring indicator data of the workload, resulting in high privatization deployment costs of the workload and high data migration costs.

[0019] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of the implementation process of a virtual node monitoring method provided in an embodiment of the present application Figure 1 ;

[0021] Figure 2A A schematic diagram of a cluster implementation architecture provided in an embodiment of the present application;

[0022] Figure 2B A second schematic diagram of an implementation flow of a virtual node monitoring method provided in an embodiment of the present application;

[0023] Figure 3A schematic diagram of a process for obtaining a monitoring indicator collection endpoint provided in an embodiment of the present application;

[0024] Figure 4 A schematic diagram of the composition structure of a virtual node monitoring device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0026] In the following description, the terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application. It should also be noted that, for ease of description, only the parts related to the relevant application are shown in the accompanying drawings.

[0027] In related technologies, the monitoring indicator data of the workload running on the working nodes in the cluster can be obtained through the monitoring and alarm components provided by the service provider. In this case, the monitoring and alarm components rely on the characteristics of the service provider, making it difficult to connect the cluster with the user's self-built monitoring platform, and the cost of cross-service provider data migration or adopting cloud-native open source solutions is high.

[0028] The embodiment of the present application provides a virtual node monitoring method, which is applied to a virtual monitoring agent component, the virtual monitoring agent component is deployed in a cluster, and a virtual node corresponding to the virtual monitoring agent component is also deployed in the cluster. The cluster is composed of multiple electronic devices, wherein the electronic device may refer to a server, a laptop, a tablet computer, a desktop computer, a smart TV, a set-top box, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, a portable gaming device) and other devices with data processing capabilities.

[0029] The cluster may include a cluster built based on a cluster management tool, for example, a container orchestration engine (Kubernetes, K8s) cluster, an application container engine (Docker Swarm) cluster, a distributed management (Apache Mesos) cluster, etc.

[0030] like Figure 1 As shown, the virtual node monitoring method includes the following steps S101 and S103:

[0031] Step S101: Determine the workload in the virtual node.

[0032] Here, the workload may include a minimum deployment unit in a virtual node, for example, a group of one or more containers deployed in the same node and sharing resources.

[0033] In some implementations, a cluster may include at least one virtual node.

[0034] In some implementations, a virtual node may include at least one workload.

[0035] For example, a minimum deployment unit (pod) in a K8s cluster can correspond to a workload.

[0036] In some implementations, different workloads may come from different service providers.

[0037] In some implementations, when a workload is created, a resource request amount and a resource limit amount corresponding to the workload may be determined so that the workload can run normally.

[0038] In some implementations, the workload running in the virtual node may be determined by determining a workload list corresponding to the virtual node.

[0039] In some implementations, the virtual monitoring agent component may be independently deployed in the cluster, or may be integrated into a node agent component corresponding to a virtual node in the cluster.

[0040] Step S102: Collect and store workload monitoring indicator data from a workload monitoring indicator providing component.

[0041] Here, the monitoring indicator data may include but is not limited to data characterizing the operating status of the workload, resource utilization, network latency, and other indicators. The operating status of the workload may include but is not limited to the running time, whether there are abnormalities in the operation, request response time, error rate, etc.; resource utilization may include the underlying resource utilization, which may include but is not limited to CPU utilization, memory utilization, disk space utilization, etc.

[0042] The workload monitoring indicator providing component may include a component provided by a service provider of the workload and collecting monitoring indicator data of the workload.

[0043] In some implementations, workload indicators may be adjusted based on monitoring indicator data to ensure that the performance of the workload at runtime meets the operational requirements.

[0044] In some embodiments, after the monitoring indicator providing component collects the monitoring indicator data of the workload, the virtual monitoring agent component can send a request to obtain the monitoring indicator data to the monitoring indicator providing component and receive the monitoring indicator data sent by the monitoring indicator providing component; or, the monitoring indicator providing component can actively send the monitoring indicator data to the virtual monitoring agent component.

[0045] Exemplarily, the monitoring indicator providing component may be an indicator providing component (metricsprovider) of the service provider.

[0046] In some implementations, the amount of collected data for monitoring indicator data of each workload may be reduced.

[0047] For example, the amount of monitoring indicator data collected for each workload can be reduced by reducing the collection frequency or the amount of data collected at a time. In this way, by downsampling, the amount of monitoring indicator data for each workload can be reduced, and the number of workloads collected at a time can be further increased, thereby realizing the collection of monitoring indicator data for large-scale workloads.

[0048] Step S103: Based on the monitoring indicator collection endpoint of the virtual node, the monitoring indicator data of the workload is sent to the target monitoring service; the monitoring indicator collection endpoint is registered by the virtual monitoring agent component.

[0049] Here, the monitoring indicator collection endpoint may include an interface for interacting with monitoring indicator data.

[0050] The target monitoring service may include a monitoring and alarm component that provides monitoring and alarm services based on monitoring indicator data of workloads in the cluster. For example, the target monitoring service may be a cloud-native monitoring and alarm tool (such as prometheus).

[0051] In some implementations, the target monitoring service may be a private monitoring service built by a user.

[0052] In some implementations, before the virtual monitoring agent component sends monitoring indicator data to the target monitoring service, the virtual monitoring agent component may register a monitoring indicator collection endpoint through an interface service component in the cluster.

[0053] In the embodiment of the present application, the monitoring indicator data of the workload is collected and stored through the virtual monitoring agent component in the cluster; and the monitoring indicator data of the workload is sent to the target monitoring service based on the monitoring indicator collection endpoint registered by the virtual monitoring agent component. In this way, the monitoring indicator data of the workload on the virtual node is carried by the virtual monitoring agent component, and the monitoring indicator data of the virtual node can be connected from the cluster to the target monitoring service based on the monitoring indicator collection endpoint, reducing the difficulty of connecting the monitoring indicator data of the cluster to the monitoring service due to the lack of components in the cluster that carry the monitoring indicator data of the workload, resulting in high privatization deployment costs of the workload and data migration costs.

[0054] It can be understood that, through the virtual monitoring agent component, the interaction of monitoring indicator data is no longer restricted by the type or number of service providers, thereby achieving data integration across service providers.

[0055] In some embodiments, the above step S102 may include the following steps S111 to S112:

[0056] Step S111: Collect monitoring indicator data of the workload from the monitoring indicator providing component corresponding to the workload.

[0057] Step S112: convert the data format of the monitoring indicator data into a data processing format corresponding to the target monitoring service, and store the monitoring indicator data after the data format conversion.

[0058] Here, after the data format of the monitoring indicator data is converted into the data processing format corresponding to the target monitoring service, the target monitoring service can directly apply the monitoring indicator data after obtaining it without further processing the data.

[0059] In some implementations, monitoring indicator data in different formats corresponding to different workloads may be converted into a data processing format corresponding to a target monitoring service.

[0060] In an embodiment of the present application, the monitoring data type of the workload in the virtual node is made the same as the monitoring data type of the target monitoring service through the virtual monitoring agent component, which can improve the processing efficiency of the target monitoring service and further improve the stability of the workload in the cluster.

[0061] It is understandable that when the target monitoring service is a cloud-native monitoring solution, zero intrusion of the cluster to the cloud-native can be achieved, thereby improving the adaptability of the cluster to the cloud-native monitoring solution.

[0062] In some embodiments, the virtual node includes multiple workloads, and the above step S102 may include the following steps S121 to S122:

[0063] Step S121: For each workload in the virtual node, monitoring indicator data of the workload is collected from the monitoring indicator providing component corresponding to the workload.

[0064] In some implementations, the type, size, and / or format of monitoring indicator data corresponding to the workload may be different depending on the provider of the workload.

[0065] Step S122: Slice the monitoring indicator data of each workload to obtain and store multiple monitoring indicator data slices.

[0066] Here, when the monitoring indicator data is sharded based on different methods, the obtained monitoring indicator data shard types may be different.

[0067] In some implementations, sharding may be performed based on different workloads so that each monitoring indicator data shard obtained and stored corresponds to each workload.

[0068] In some implementations, the monitoring indicator data of each workload may be sharded so that the data sizes of each monitoring indicator data shard obtained and stored are equal or approximately equal.

[0069] In some implementations, sharding may be performed based on the type of application running in the workload, so that each monitoring indicator data shard obtained and stored corresponds to at least one application type.

[0070] In some implementations, the monitoring indicator data may be sharded based on the data type of the monitoring indicator data, so that the monitoring indicator data in each monitoring indicator data shard obtained and stored is of the same data type.

[0071] In the embodiments of the present application, on the one hand, the monitoring indicator data of each workload is sharded and stored, which can reduce the complexity of subsequent processing of the monitoring indicator data; on the other hand, it can be compatible with the monitoring indicator data of multiple workloads. For example, it can be compatible with the workloads of multiple service providers, uniformly monitor and collect monitoring indicator data, reduce the cost of data migration across service providers, achieve unified management of monitoring indicator data in a multi-cloud environment, reduce cloud service customization costs and maintenance complexity, and further improve the management efficiency and utilization efficiency of resources in a multi-cloud environment.

[0072] In some embodiments, sending workload monitoring indicator data to the target monitoring service in the above step S103 may include the following step S123:

[0073] Step S123: Send each monitoring indicator data slice to the target monitoring service.

[0074] Here, the virtual monitoring agent component may send at least a portion of each monitoring indicator data slice to the target monitoring service.

[0075] In some embodiments, when sending monitoring indicator data slices to the target monitoring service, the virtual monitoring agent component can interact with the target monitoring service multiple times synchronously or asynchronously, send part of the monitoring indicator data slices during each interaction, and finally complete the interaction with all monitoring indicator data.

[0076] In an embodiment of the present application, the virtual monitoring agent component sends the monitoring indicator data in slices. On the one hand, it can reduce the processing complexity of the interactive monitoring data; on the other hand, it can customize and develop the target monitoring service based on the data dimension corresponding to the data slice that is smaller than the node dimension, thereby reducing the customization cost and maintenance complexity.

[0077] In some embodiments, the above step S102 may include the following steps S131 to S133:

[0078] Step S131 : Based on the monitoring cycle of the workload, monitoring indicator data of the workload is collected from the monitoring indicator providing component corresponding to the workload.

[0079] Here, the monitoring period of the workload may include a collection period for collecting monitoring indicator data of the workload.

[0080] In some implementations, different workloads may correspond to different monitoring periods.

[0081] In some implementations, a virtual node includes multiple workloads, and the monitoring periods corresponding to the multiple workloads may be different.

[0082] Step S132: store the monitoring index data collected during the current monitoring cycle.

[0083] Here, the monitoring indicator data collected in the current monitoring cycle can be determined as valid data.

[0084] It is understandable that the monitoring indicator data is time-sensitive, and based on the monitoring indicator data collected in the current monitoring cycle, the accuracy of monitoring and adjusting the workload running in the current monitoring cycle can be improved.

[0085] Step S133: Delete the historical monitoring indicator data of the workload collected in at least one historical monitoring period.

[0086] Here, the historical monitoring period may include a monitoring period before the current monitoring period, may be a previous monitoring period continuous with the current monitoring period, or may be a historical period before a plurality of monitoring periods.

[0087] In some implementations, at least one historical monitoring period may be determined based on a data cleansing period.

[0088] For example, when the time interval between the current monitoring cycle and at least one historical monitoring cycle is greater than a preset data cleaning cycle, the historical monitoring indicator data of the workload collected in the at least one historical monitoring cycle may be deleted.

[0089] It is understandable that the data cleaning cycles corresponding to different workloads may be different.

[0090] In the embodiment of the present application, based on the monitoring cycle of the workload, the monitoring indicator data of the workload is collected from the monitoring indicator providing component corresponding to the workload; and the monitoring indicator data collected in the current monitoring cycle is stored, and the historical monitoring indicator data of the workload collected in at least one historical monitoring cycle is deleted. In this way, based on the monitoring cycle of the workload, on the one hand, by storing the monitoring indicator data collected in the current monitoring cycle, the referenceability and practicality of the monitoring indicator data of the workload can be improved; on the other hand, by cleaning up expired data, the part of the stored monitoring indicator data that has a low reference value for the current monitoring cycle can be reduced, thereby reducing the occupancy of storage resources.

[0091] In some embodiments, before the above step S101, the above virtual node monitoring method may further include the following steps S141 to S142:

[0092] Step S141: monitor virtual node registration events in the cluster.

[0093] Here, the virtual node registration event may include an event of virtual node registration completion.

[0094] In some implementations, the virtual monitoring agent component may continuously monitor whether a new virtual node is registered in the cluster.

[0095] In some implementations, a virtual node may be registered in a cluster by a virtual node agent component.

[0096] Exemplarily, the virtual node can be registered through the virtual node agent component (virtual-kubelet) in the K8s cluster.

[0097] Step S142 , in response to a virtual node registration event in the cluster indicating that the virtual node registration is complete, register a monitoring indicator collection endpoint of the virtual node; the virtual node is registered by a virtual node agent component in the cluster.

[0098] In some implementations, in response to obtaining an event indicating that a virtual node registration is complete, the virtual node that has completed registration may be added to a pending list of a virtual monitoring agent component; and a monitoring indicator collection endpoint corresponding to the virtual node in the pending list may be registered.

[0099] In the embodiment of the present application, the virtual node registration event in the cluster is monitored, and in response to the virtual node registration event in the cluster indicating that the virtual node registration is completed, the monitoring indicator collection endpoint of the virtual node is registered. In this way, after adding a virtual node to the cluster, the virtual monitoring agent component can be used to promptly complete the registration of the corresponding monitoring indicator collection endpoint, and further promptly realize the monitoring indicator data interaction with the target monitoring service.

[0100] In some embodiments, the above step S102 may include the following steps S151:

[0101] Step S151: In response to a new workload being added in a virtual node, monitoring indicator data of the new workload is collected and stored from a monitoring indicator providing component corresponding to the new workload.

[0102] In some embodiments, a newly added workload in a virtual node can be created by a virtual node agent component; after the virtual monitoring agent component obtains an event of successful workload creation, the successfully created workload is added to the workload list; when obtaining the monitoring indicator data of the workload in the virtual node, based on the workload list, the monitoring indicator providing component corresponding to the newly added workload is determined, and the monitoring indicator data of the newly added workload is collected and stored from the monitoring indicator providing component corresponding to the newly added workload.

[0103] In the embodiment of the present application, in response to the newly added workload in the virtual node, the monitoring indicator data of the newly added workload is collected and stored from the monitoring indicator providing component corresponding to the newly added workload. In this way, the virtual monitoring agent component can collect the monitoring indicator data corresponding to the newly added workload in the virtual node when collecting the monitoring indicator data in response to the increase in workload, thereby ensuring the integrity and real-time performance of the monitoring indicator data corresponding to the virtual node, and further improving the stability of the cluster.

[0104] In some embodiments, the above step S103 may include at least one of the following steps S161 to S162:

[0105] Step S161: Based on the monitoring indicator collection endpoint of the virtual node, the monitoring indicator data of the workload is sent to the target monitoring service according to the sending cycle.

[0106] Here, the sending period may be determined according to the workload, or may be determined according to the monitoring period of the target monitoring service.

[0107] Step S162: In response to receiving a monitoring data acquisition request sent by the target monitoring service through the monitoring indicator collection endpoint, the monitoring indicator data of the workload is sent to the target monitoring service based on the monitoring indicator collection endpoint; wherein, the target monitoring service obtains the monitoring indicator collection endpoint based on the node information of the virtual node after the virtual monitoring agent component registers the monitoring indicator collection endpoint.

[0108] In some implementations, the target monitoring service can send a monitoring data acquisition request through the monitoring indicator collection endpoint according to the monitoring cycle. In this way, the target monitoring service can actively obtain the monitoring indicator data of the workload based on its own monitoring cycle; in this case, the monitoring cycle can be variable, which can improve the flexibility of customizing the monitoring service.

[0109] In an embodiment of the present application, through a virtual monitoring agent component, monitoring indicator data is sent to a target monitoring service according to a sending cycle, so that the target monitoring service can perform periodic monitoring indicator data collection, improve the real-time and referenceability of the monitoring indicator data, and further improve the security and stability of the workload; the target monitoring service can also actively request the acquisition of workload monitoring data, thereby improving the customization flexibility of the target monitoring service.

[0110] The standard version of the K8s cluster usually uses the cloud-native prometheus as the monitoring and alarm component. The monitoring agent component (cAdvisor) deployed on the prometheus slave node collects monitoring indicator data of all workloads running on the corresponding node. In some embodiments, cAdvisor is integrated in the node agent component (kubelet).

[0111] As a basic project of cloud-native computing, K8s has been widely used and supported. In order to solve its own complexity, cloud service providers provide a fully managed serverless container orchestration engine (Serverless Kubernetes), and also provide full-stack cloud monitoring and alarm capabilities. However, the monitoring and alarm components of cloud service providers have strong cloud service characteristics, making it difficult to connect with the user's self-built monitoring platform. The cost of migrating monitoring indicator data across service providers or replacing the cloud service provider's monitoring solution with a cloud-native open source monitoring solution is high.

[0112] Serverless Kubernetes is a serverless service based on containers and container orchestration engines (K8s). Serverless Kubernetes has components with control functions and is usually created and hosted by cloud service providers. Since there are no real working nodes, there is no need for capacity planning and node operation and maintenance.

[0113] In the related art, virtual-kubelet is usually used as a virtual node agent component to simulate a virtual node and schedule workloads, such as pods, to the virtual node.

[0114] Serverless Kubernetes usually consists of management nodes, worker nodes, and supply components of the underlying workload pods provided by the cloud service provider, and users do not need to manage the cluster. Management components are deployed in the management node; worker nodes can include virtual nodes, or real nodes and virtual nodes; supply components can include monitoring indicator provision components.

[0115] For the collection of workload monitoring indicator data, native monitoring solutions, such as Prometheus for K8s clusters, rely on the node agent component kubelet on the real node where the workload runs.

[0116] For Serverless Kubernetes, which has no real nodes and uses a virtual node architecture, there is no open source component or solution such as Prometheus to carry the monitoring indicator information of the pod on the virtual node. The monitoring indicator provider component of the underlying pod is required to provide the monitoring indicator data. In this case, the monitoring indicator data is usually pushed to the cloud monitoring system provided by the cloud service provider by the pod supplier, and will not be connected to the open source ecological monitoring platform.

[0117] Therefore, the Serverless Kubernetes cluster in the relevant technology has the following problems: it is difficult to connect with the user's self-built monitoring platform, and it relies on the customized monitoring solution of the cloud service provider. It is not only restricted by the service provider's solution, but also difficult to privatize the deployment of the monitoring platform. The cost of data migration across service providers is high, and the cost of using open source platforms as alternatives is also high; it cannot support ultra-large-scale clusters, for example, the collection of monitoring indicator data for clusters with workloads exceeding 5,000; at the same time, since the cloud-native open source monitoring solution collects monitoring indicator data at the node level, it requires customized development to obtain monitoring indicator data by requesting the monitoring indicator provider component corresponding to the underlying pod, which increases the customization cost and maintenance complexity.

[0118] On this basis, the present application embodiment provides a Kubernetes cluster, such as Figure 2AAs shown, the cluster 200 includes: a real node 210, a real node 220, a virtual node 230, and a management node 240. Among them, a workload 211 is running in the real node 210, and the workload 211 includes container 1 and container 2. The real node 210 also includes a node agent component 212 corresponding to the real node 210, and a node monitoring component 213 is deployed in the node agent component 212; a workload 221 is running in the real node 220, and the workload 221 includes container 3 and container 4. The real node 220 also includes a node agent component 222 corresponding to the real node 220, and a node monitoring component 223 is deployed in the node agent component 222; a workload 231 and a workload 232 are running in the virtual node 230, and the virtual node 230 also includes a virtual node agent component 233 corresponding to the virtual node 230, and a virtual node monitoring component 234; the management node 240 includes an interface service component 241, a scheduling component 242, and a controller management component 243.

[0119] like Figure 2A As shown, the monitoring platform 300 includes an indicator conversion component 310, a target monitoring service 320, a monitoring alarm component 330, and a data visualization component 340. Among them, after obtaining the status information of the nodes and loads in the cluster 200, the indicator conversion component 310 converts the status information into monitoring indicators; the target monitoring service 320 obtains and stores the monitoring indicator data; the monitoring alarm component 330 reads the monitoring indicator data from the target monitoring service 320, triggers the alarm information according to the alarm rules, and issues an alarm to the application corresponding to the workload.

[0120] Among them, the virtual node agent component 233 obtains the monitoring indicator data of workload 231 from the monitoring indicator providing component 410 corresponding to workload 231, and obtains the monitoring indicator data of workload 232 from the monitoring indicator providing component 420 corresponding to workload 232; the virtual node agent component 233 interacts with the target monitoring service 320 for monitoring indicator data.

[0121] Combination Figure 2A The embodiment of the present application provides a virtual node monitoring method for collecting monitoring information of workloads on virtual nodes in a Serverless Kubernetes cluster. The Serverless Kubernetes cluster may correspond to the above-mentioned cluster 200.

[0122] like Figure 2B As shown, the method includes the following steps S201 to S215:

[0123] Step S201: Submit definition information for creating a pod.

[0124] During implementation, users can call the interface service component on the management node in the cluster through the console and submit definition information for creating a pod.

[0125] Step S202: dispatching to a virtual node.

[0126] During implementation, the scheduling component on the management node in the cluster can schedule the event of creating a pod to the virtual node.

[0127] Step S203: Get a pod creation event.

[0128] During implementation, the virtual node agent component may obtain a pod creation event in response to a user operation in a console.

[0129] Step S204: Create a pod according to the pod definition information.

[0130] During implementation, the virtual node proxy component may call the pod creation component in the underlying supply component corresponding to the pod to complete the creation of the pod.

[0131] Step S205: Get the event of successful pod creation and add it to the processing list.

[0132] During implementation, the virtual monitoring agent component may respond to obtaining an event of successful pod creation by adding the pod to a workload list of the virtual node that needs to be monitored.

[0133] Step S206: Obtain monitoring indicator data of each pod based on the information of all pods on the virtual node.

[0134] During implementation, the virtual monitoring agent component may call the monitoring indicator providing component corresponding to each pod to obtain the monitoring indicator data of each pod.

[0135] Step S207: convert the indicator data format.

[0136] During implementation, after executing step S206, the virtual monitoring agent component may automatically convert the format of the monitoring indicator data into a format that can be processed by the target monitoring service.

[0137] Step S208: Slice and store the converted monitoring indicator data.

[0138] Here, the converted monitoring indicator data may be segmented and stored by the virtual monitoring agent component.

[0139] Step S209: Clear out expired monitoring indicator data and only retain the data of the most recent target number of cycles.

[0140] Here, the virtual monitoring agent component may clean up expired monitoring indicator data, and the expired monitoring indicator data may correspond to monitoring indicator data of at least one historical monitoring period in the above-mentioned virtual node monitoring method, and the period may correspond to the monitoring period in the above-mentioned virtual node monitoring method.

[0141] Exemplarily, the target number may be 5, and only the monitoring indicator data within the 5 monitoring cycles closest to the current monitoring cycle may be retained.

[0142] Step S210: Obtain a list of nodes in the cluster and a monitoring indicator collection endpoint for each node.

[0143] Here, the target monitoring service can obtain the list of nodes in the cluster and the monitoring indicator collection endpoint of each node.

[0144] During implementation, the node list may include all nodes in the cluster, including real nodes and virtual nodes.

[0145] After executing step S210, at least one of steps S211 to S212 may be executed.

[0146] Step S211: periodically obtain monitoring indicator data based on the monitoring indicator collection endpoint.

[0147] Here, the target monitoring service may periodically obtain monitoring indicator data from the virtual monitoring agent component based on the monitoring indicator collection endpoint.

[0148] Step S212: periodically send monitoring indicator data.

[0149] Here, the virtual monitoring agent component may periodically send the monitoring indicator data to the target monitoring service.

[0150] Step S213: store monitoring indicator data.

[0151] Here, after the target monitoring service obtains the monitoring indicator data, the monitoring indicator data is stored in the target monitoring service.

[0152] Step S214: read monitoring indicator data.

[0153] Here, the monitoring alarm component can read the monitoring indicator data from the target monitoring service.

[0154] Step S215: trigger an alarm message according to the rule.

[0155] Here, the monitoring alarm component can trigger the alarm information according to the alarm rules.

[0156] In an embodiment of the present application, the capabilities of the virtual node are expanded by adding a virtual agent component for collecting general monitoring indicators. On the one hand, the collection, aggregation, conversion, sharding, and storage of monitoring indicator data of workload pods in the K8s cluster scheduled to the virtual node are realized, and a monitoring indicator data format compatible with the target monitoring service can be provided. It is not limited by the number of workloads on the virtual node and supports large-scale clusters. On the other hand, the monitoring indicator collection endpoint is registered with the management node of the K8s cluster so that the virtual node can be compatible with cloud-native target monitoring services, such as prometheus.

[0157] In some embodiments, Figure 3 As shown, the above step S210 may include the following steps S301 to S304:

[0158] Step S301: register a virtual node.

[0159] During implementation, the virtual node registration can be completed by calling the interface service component through the virtual node proxy component.

[0160] Step S302: register a monitoring indicator collection endpoint.

[0161] Here, the virtual node agent component can call the interface service component to complete the registration of the monitoring indicator collection endpoint of the virtual node.

[0162] Step S303: Obtain node information.

[0163] Here, the target monitoring service, such as prometheus, can obtain a list of all nodes in the cluster from the interface service component, including real nodes and virtual nodes.

[0164] Step S304: Obtain the monitoring indicator collection endpoint.

[0165] Here, the target monitoring service can obtain the monitoring indicator collection endpoint of each node, that is, the request address of the monitoring indicator data.

[0166] The present application embodiment provides a virtual node monitoring device, such as Figure 4 As shown, the virtual node monitoring device 400 includes:

[0167] A determination module 410, configured to determine a workload in a virtual node deployed in a cluster;

[0168] The collection module 420 is used to collect and store the monitoring indicator data of the workload from the monitoring indicator providing component of the workload;

[0169] The sending module 430 is used to send the monitoring indicator data of the workload to the target monitoring service based on the monitoring indicator collection endpoint of the virtual node.

[0170] In some embodiments, the collection module can also be used to: collect monitoring indicator data of the workload from the monitoring indicator providing component corresponding to the workload; convert the data format of the monitoring indicator data into a data processing format corresponding to the target monitoring service, and store the monitoring indicator data after the data format conversion.

[0171] In some embodiments, the virtual node includes multiple workloads, and the collection module can also be used to: for each workload in the virtual node, collect monitoring indicator data of the workload from the monitoring indicator providing component corresponding to the workload; slice the monitoring indicator data of each workload to obtain and store multiple monitoring indicator data slices.

[0172] In some embodiments, the sending module may also be used to: send each of the monitoring indicator data slices to the target monitoring service.

[0173] In some embodiments, the collection module can also be used to: based on the monitoring period of the workload, collect monitoring indicator data of the workload from the monitoring indicator providing component corresponding to the workload; store the monitoring indicator data collected in the current monitoring period; and delete the historical monitoring indicator data of the workload collected in at least one historical monitoring period.

[0174] In some embodiments, the virtual node monitoring device may further include:

[0175] A monitoring module is used to monitor virtual node registration events in the cluster; in response to the virtual node registration event in the cluster indicating that the virtual node registration is complete, register the monitoring indicator collection endpoint of the virtual node; the virtual node is registered by the virtual node agent component in the cluster.

[0176] In some embodiments, the sending module may also be used for at least one of the following:

[0177] Based on the monitoring indicator collection endpoint of the virtual node, the monitoring indicator data of the workload is sent to the target monitoring service according to a sending cycle; in response to receiving a monitoring data acquisition request sent by the target monitoring service through the monitoring indicator collection endpoint, based on the monitoring indicator collection endpoint, the monitoring indicator data of the workload is sent to the target monitoring service; wherein, the target monitoring service obtains the monitoring indicator collection endpoint based on the node information of the virtual node after the virtual monitoring agent component registers the monitoring indicator collection endpoint.

[0178] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatuses, and devices according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0179] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0180] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0181] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed in the present application should be included in the protection scope of the present application.

[0182] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0183] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.

[0184] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0185] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0186] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0187] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0188] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0189] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0190] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A virtual node monitoring method, characterized in that: Applied to a virtual monitoring agent component, the virtual monitoring agent component is deployed in a cluster, and a virtual node corresponding to the virtual monitoring agent component is also deployed in the cluster; the method includes: determining a workload in the virtual node; Collecting and storing monitoring indicator data of the workload from a monitoring indicator providing component of the workload; Based on the monitoring indicator collection endpoint of the virtual node, the monitoring indicator data of the workload is sent to the target monitoring service; the monitoring indicator collection endpoint is registered by the virtual monitoring agent component.

2. The method according to claim 1, characterized in that The collecting and storing the workload monitoring indicator data from the workload monitoring indicator providing component includes: Collecting monitoring indicator data of the workload from a monitoring indicator providing component corresponding to the workload; The data format of the monitoring indicator data is converted into a data processing format corresponding to the target monitoring service, and the monitoring indicator data after the data format conversion is stored.

3. The method according to claim 1, characterized in that The virtual node includes a plurality of workloads; the monitoring indicator data of the workloads is collected and stored from the monitoring indicator providing component of the workloads, including: For each workload in the virtual node, collecting monitoring indicator data of the workload from a monitoring indicator providing component corresponding to the workload; The monitoring indicator data of each workload is sharded to obtain and store a plurality of monitoring indicator data shards.

4. The method according to claim 3, characterized in that The sending the monitoring indicator data of the workload to the target monitoring service includes: Send each of the monitoring indicator data slices to the target monitoring service.

5. The method according to claim 1, characterized in that The collecting and storing the workload monitoring indicator data from the workload monitoring indicator providing component includes: Based on the monitoring period of the workload, collecting monitoring indicator data of the workload from a monitoring indicator providing component corresponding to the workload; Storing the monitoring indicator data collected during the current monitoring cycle; Delete historical monitoring indicator data of the workload collected within at least one historical monitoring period.

6. The method according to any one of claims 1 to 5, characterized in that Before determining the workload in the virtual node, the method further includes: Listening to virtual node registration events in the cluster; In response to a virtual node registration event in the cluster indicating that the virtual node registration is complete, a monitoring indicator collection endpoint of the virtual node is registered; the virtual node is registered by a virtual node agent component in the cluster.

7. The method according to any one of claims 1 to 5, characterized in that The monitoring indicator collection endpoint based on the virtual node sends the monitoring indicator data of the workload to the target monitoring service, including at least one of the following: Based on the monitoring indicator collection endpoint of the virtual node, the monitoring indicator data of the workload is sent to the target monitoring service according to a sending cycle; In response to receiving a monitoring data acquisition request sent by the target monitoring service through the monitoring indicator collection endpoint, the monitoring indicator data of the workload is sent to the target monitoring service based on the monitoring indicator collection endpoint; wherein, the target monitoring service obtains the monitoring indicator collection endpoint based on the node information of the virtual node after the virtual monitoring agent component registers the monitoring indicator collection endpoint.

8. A virtual node monitoring device, characterized in that: include: A determination module, used to determine the workload in the virtual nodes deployed in the cluster; A collection module, used to collect and store monitoring indicator data of the workload from a monitoring indicator providing component of the workload; A sending module is used to send the monitoring indicator data of the workload to a target monitoring service based on the monitoring indicator collection endpoint of the virtual node.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps in the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program can be executed by a processor to implement the method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The method comprises a computer program or an instruction, and when the computer program or the instruction is executed by a processor, the method according to any one of claims 1 to 7 is implemented.