Desktop cloud component operation state health inspection method, system and equipment and medium
By deploying k8s and Prometheus components, real-time monitoring and alarming of the status changes of desktop cloud components are solved, and the problem of inability to meticulously monitor and fault location in the existing technology is solved, and the stability of cloud services and troubleshooting efficiency is improved.
Patent Information
- Application Number
- CN202410978351.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-12
AI Technical Summary
The existing technology cannot conduct detailed monitoring status and fault location of desktop cloud components, resulting in the inability to promptly detect abnormal status and historical problems, affecting the stability of cloud services.
By deploying a desktop cloud platform and Prometheus component based on k8s, the container status is monitored in real time, the event collector is used to capture and store state changes, and exception alarm push is carried out through Alertmanager, and the cause of failure is deeply located in combination with historical event query.
It realizes meticulous monitoring of cloud components and fast fault location, can detect abnormalities in real time and handle alarms, improving the stability and troubleshooting efficiency of cloud services.
Smart Images

Figure CN118939504A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of edge computing, container technology and openstack cloud application technology, and in particular to a desktop cloud component operation status health check method, system, device and medium. Background Art
[0002] Desktop cloud is a technology that allows users to access cross-platform applications and the entire client desktop through a thin client or any other device connected to the network. It is a specific application of cloud computing technology, allowing users to access their personal desktops and applications from any location and any device, greatly improving work flexibility and convenience.
[0003] The cloud components of the desktop cloud are deployed in a k8s containerized form, and each cloud component consists of multiple pods. In the event of a failure, there is no special real-time detection of the component container status and logs, and the cloud component failure of the desktop cloud cannot be located in time.
[0004] Therefore, how to conduct more detailed monitoring of the status of desktop cloud component services, better monitor the abnormal status of cloud services and trace historical problems and issue timely alarms, and quickly locate faults in desktop cloud service components is an urgent technical issue at present. Summary of the invention
[0005] The technical task of the present invention is to provide a desktop cloud component operation status health check method, system, device and medium to solve the problem of how to perform more detailed monitoring of the desktop cloud component service, to better monitor the abnormal status of the cloud service and trace back historical problems and issue timely alarms, and to quickly locate the fault problems of the desktop cloud service components.
[0006] The technical task of the present invention is achieved in the following way: a desktop cloud component running status health check method, which monitors the running status of the k8s container in the cloud component in real time, stores the state changes in the form of events persistently and pushes abnormal alarms; the details are as follows:
[0007] Desktop cloud platform and component deployment: deploy a desktop cloud platform based on k8s and deploy prometheus components;
[0008] Create an event collector;
[0009] The prometheus component is connected to the k8s pod event collector;
[0010] Alarm based on the frequency of restart time;
[0011] AlertManager pushes alerts to the administrator's mailbox: Prometheus alertManager module sends alerts to the relevant administrator's mailbox by email;
[0012] Query the historical events of all pods related to the abnormal service and locate the problem: query the historical events of all pods of the abnormal service according to the prometheus interface to deeply locate the cause of the service abnormality.
[0013] As a preferred method, the event collector is created as follows:
[0014] Create a k8s pod event collector (k8s_event_exporter);
[0015] The k8s pod event collector captures the events of all pod resources in the k8s cluster and the number of times the events of all pod resources in the k8s cluster occur within a specified time.
[0016] As a preferred option, the prometheus component is connected to the k8s pod event collector as follows:
[0017] By configuring the prometheus component to discover and monitor the k8s pod event collector, the prometheus component can query the event details of all pods in the k8s cluster in real time.
[0018] As a preferred method, the alarm is issued based on the frequency of restart time as follows:
[0019] The pod's own probe detection will restart abnormal pods. By editing and adding prometheus alarm rules, an alarm will be issued for service pods whose restart times exceed the threshold within the set time.
[0020] Preferably, the prometheus Alertmanager module is used to receive alert information from the Prometheus component and further process the alert information of the Prometheus component, including grouping, suppression, silencing, and routing to the correct notification recipient.
[0021] A desktop cloud component operation status health check system, the system comprising:
[0022] Deployment module, used to deploy a desktop cloud platform based on k8s and deploy prometheus components;
[0023] Create a module to create an event collector;
[0024] The docking module is used to connect to the k8s pod event collector through the prometheus component;
[0025] An alarm module is used to issue an alarm based on the frequency of restart time;
[0026] The push module is used to send alerts to relevant administrator mailboxes via email through the prometheus alertmanager module;
[0027] The query module is used to query the historical events of all pods of abnormal services according to the Prometheus interface, so as to deeply locate the cause of service abnormalities.
[0028] Preferably, the creation module creates a k8s pod event collector (k8s_event_exporter), which captures the events of all pod resources of the k8s cluster and the number of times the events of all pod resources of the k8s cluster occur within a specified time;
[0029] The docking module configures the prometheus component to discover and monitor the k8s pod event collector, and the prometheus component side queries the event details of all pods in the k8s cluster in real time.
[0030] Preferably, the pod probe detection in the alarm module will restart the abnormal pod, and by editing and adding prometheus alarm rules, an alarm will be issued for the service pod whose restart times exceed the threshold within the set time.
[0031] An electronic device comprising: a memory and at least one processor;
[0032] Wherein, the memory stores a computer program;
[0033] The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the above-mentioned desktop cloud component running status health check method.
[0034] A computer-readable storage medium stores a computer program, which can be executed by a processor to implement the above-mentioned desktop cloud component running status health check method.
[0035] The desktop cloud component running status health check method, system, device and medium of the present invention have the following advantages:
[0036] (1) The present invention can monitor the running status of the k8s container in the cloud component in real time, store the status changes persistently in the form of events and push abnormal alarms, and is implemented in combination with prometheus and the corresponding k8s event collector;
[0037] (ii) The present invention requires real-time monitoring of the cloud components down to the running status of each pod of the components, so as to detect component anomalies in real time and issue alarms;
[0038] (III) Compared with traditional cloud monitoring components that only monitor service status, the present invention is more detailed and can be refined to each pod of the k8s containerized component (i.e., the detailed execution process of the service), and can provide real-time alarms for abnormal cloud components and trace the causes of historical problems;
[0039] (IV) The present invention provides a method for checking the pod running status of a cloud desktop component based on k8s containerization, and by collecting and monitoring the pod events of the cloud component, the pod running status of the cloud component can be persistently saved, and the abnormal status of the cloud component can be pushed in the form of an alarm. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The present invention is further described below in conjunction with the accompanying drawings.
[0041] Attached Figure 1 A flowchart of a method for checking the health status of desktop cloud components. DETAILED DESCRIPTION
[0042] The desktop cloud component operation status health check method, system, device and medium of the present invention are described in detail below with reference to the drawings and specific embodiments of the specification.
[0043] Embodiment 1:
[0044] As attached Figure 1 As shown, this embodiment provides a method for checking the running status of a desktop cloud component. The method monitors the running status of a k8s container in a cloud component in real time, stores the state changes persistently in the form of events, and pushes abnormal alarms. The details are as follows:
[0045] S1. Desktop cloud platform and component deployment: Deploy a desktop cloud platform based on k8s and deploy prometheus components;
[0046] S2, create an event collector;
[0047] S3 and prometheus components are connected to the k8s pod event collector;
[0048] S4, alarm based on the frequency of restart time;
[0049] S5. AlertManager pushes the alarm to the administrator's mailbox: The Prometheus AlertManager module sends the alarm to the relevant administrator's mailbox by email;
[0050] S6. Query the historical events of all pods related to the abnormal service and locate the problem: query the historical events of all pods of the abnormal service according to the prometheus interface to deeply locate the cause of the service abnormality.
[0051] The creation of the event collector in step S2 of this embodiment is specifically as follows:
[0052] S201. Create a k8s pod event collector (k8s_event_exporter);
[0053] S202, the k8s pod event collector captures the events of all pod resources of the k8s cluster and the number of times the events of all pod resources of the k8s cluster occur within a specified time.
[0054] The prometheus component in step S3 of this embodiment is connected to the k8s pod event collector as follows:
[0055] By configuring the prometheus component to discover and monitor the k8s pod event collector, the prometheus component can query the event details of all pods in the k8s cluster in real time.
[0056] In step S4 of this embodiment, the alarm is issued based on the restart time occurrence frequency as follows:
[0057] The pod's own probe detection will restart abnormal pods. By editing and adding prometheus alarm rules, an alarm will be issued for service pods whose restart times exceed the threshold within the set time.
[0058] The prometheus Alertmanager module in step S6 of this embodiment is used to receive the alarm information from the Prometheus component and further process the alarm information of the Prometheus component, and the further processing includes grouping, suppression, silencing, and routing to the correct notification recipient.
[0059] Embodiment 2:
[0060] This embodiment provides a desktop cloud component running status health check system, the system comprising:
[0061] Deployment module, used to deploy a desktop cloud platform based on k8s and deploy prometheus components;
[0062] Create a module to create an event collector;
[0063] The docking module is used to connect to the k8s pod event collector through the prometheus component;
[0064] An alarm module is used to issue an alarm based on the frequency of restart time;
[0065] The push module is used to send alerts to relevant administrator mailboxes via email through the prometheus alertmanager module;
[0066] The query module is used to query the historical events of all pods of abnormal services according to the Prometheus interface, so as to deeply locate the cause of service abnormalities.
[0067] The creation module in this embodiment creates a k8s pod event collector (k8s_event_exporter), which captures the events of all pod resources of the k8s cluster and the number of times the events of all pod resources of the k8s cluster occur within a specified time.
[0068] The docking module in this embodiment is configured to enable the prometheus component to discover and monitor the k8s pod event collector, and the prometheus component side queries the event details of all pods in the k8s cluster in real time.
[0069] The pod probe detection in the alarm module in this embodiment will restart the abnormal pod. By editing and adding prometheus alarm rules, an alarm will be issued for the service pod whose restart times exceed the threshold within the set time.
[0070] Embodiment 3:
[0071] An embodiment of the present invention further provides an electronic device, comprising: a memory and a processor;
[0072] Wherein, the memory stores computer-executable instructions;
[0073] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the desktop cloud component running status health check method in any embodiment of the present invention.
[0074] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor may be a microprocessor or any conventional processor, etc.
[0075] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can also include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, at least one disk storage period, a flash memory device, or other volatile solid-state storage devices.
[0076] Embodiment 4:
[0077] This embodiment also provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions are loaded by a processor, so that the processor executes the method for checking the health status of the desktop cloud component operation in any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device reads and executes the program code stored in the storage medium.
[0078] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.
[0079] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.
[0080] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.
[0081] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for checking the health of a desktop cloud component operation status, characterized in that: This method is to monitor the running status of the k8s container in the cloud component in real time, store the status changes persistently in the form of events, and push abnormal alarms; the details are as follows: Desktop cloud platform and component deployment: deploy a desktop cloud platform based on k8s and deploy prometheus components; Create an event collector; The prometheus component is connected to the k8s pod event collector; Alarm based on the frequency of restart time; AlertManager pushes alerts to the administrator's mailbox: Prometheus alertManager module sends alerts to the relevant administrator's mailbox by email; Query the historical events of all pods related to the abnormal service and locate the problem: query the historical events of all pods of the abnormal service according to the prometheus interface to deeply locate the cause of the service abnormality.
2. The method for checking the running status of a desktop cloud component according to claim 1, characterized in that: To create an event collector, follow these steps: Create a k8s pod event collector; The k8s pod event collector captures the events of all pod resources in the k8s cluster and the number of times the events of all pod resources in the k8s cluster occur within a specified time.
3. The method for checking the running status of a desktop cloud component according to claim 1, characterized in that: The details of the prometheus component docking with the k8s pod event collector are as follows: By configuring the prometheus component to discover and monitor the k8s pod event collector, the prometheus component can query the event details of all pods in the k8s cluster in real time.
4. The method for checking the running status of a desktop cloud component according to claim 1, characterized in that: The specific alarms are as follows based on the restart time frequency: The pod's own probe detection will restart abnormal pods. By editing and adding prometheus alarm rules, an alarm will be issued for service pods whose restart times exceed the threshold within the set time.
5. The method for checking the running status of a desktop cloud component according to any one of claims 1 to 4, characterized in that: The prometheus Alertmanager module is used to receive alert information from the Prometheus component and further process the alert information of the Prometheus component. The further processing includes grouping, suppression, silencing, and routing to the correct notification receiver.
6. A desktop cloud component operation status health check system, characterized in that: The system includes: Deployment module, used to deploy a desktop cloud platform based on k8s and deploy prometheus components; Create a module to create an event collector; The docking module is used to connect to the k8s pod event collector through the prometheus component; An alarm module is used to issue an alarm based on the frequency of restart time; The push module is used to send alerts to relevant administrator mailboxes via email through the prometheus alertmanager module; The query module is used to query the historical events of all pods of abnormal services according to the Prometheus interface, so as to deeply locate the cause of service abnormalities.
7. The desktop cloud component operation status health check system according to claim 6, characterized in that: The creation module creates a k8s pod event collector, which captures the events of all pod resources of the k8s cluster and the number of times the events of all pod resources of the k8s cluster occur within a specified time; The docking module configures the prometheus component to discover and monitor the k8s pod event collector, and the prometheus component side queries the event details of all pods in the k8s cluster in real time.
8. The desktop cloud component operation status health check system according to claim 6 or 7, characterized in that: The pod probe detection in the alarm module will restart the abnormal pod. By editing and adding prometheus alarm rules, an alarm will be issued for the service pod whose restart times exceed the threshold within the set time.
9. An electronic device, characterized in that: include: memory and at least one processor; Wherein, the memory stores a computer program; The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the desktop cloud component running status health check method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which can be executed by a processor to implement the desktop cloud component running status health check method according to any one of claims 1 to 5.
Citation Information
Cited By
Consul and Pushgateway-based cloud desktop monitoring data acquisition method
CN120812050A
