A container monitoring system, method, electronic device, and storage medium
By designing a container monitoring system that combines container monitoring tools and business monitoring tools, and using a pre-defined mapping table for data association, the problem that existing tools cannot monitor containers and business systems simultaneously is solved, achieving comprehensive monitoring and precise location.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2026-03-27
AI Technical Summary
Existing monitoring tools cannot monitor the operational metrics of containers and business systems simultaneously, making it impossible to achieve comprehensive monitoring and problem localization of containers and business systems.
Design a container monitoring system, including container monitoring tools, business monitoring tools, middleware, data association module and display module. The system associates container performance data and business operation data through a preset mapping table and displays them in a structured form.
It enables comprehensive monitoring of containers and business systems, improves monitoring efficiency, and can accurately locate operational problems.
Smart Images

Figure CN114064415B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of data monitoring, in particular to a container monitoring system and method, an electronic device and a storage medium. BACKGROUND
[0002] With the development of the Internet, computer business systems are widely used. However, different computers have different running environments. In order to realize the porting and compatibility of business systems, the business systems are packaged by using containers to realize the running of the business systems in different running environments. The containers provide great convenience for the running of the business systems.
[0003] At present, in order to further improve the execution of the business system, the running of the business system can be analyzed by monitoring the running indicators of the container or the business system. For example, Prometheus, a tool for monitoring the running indicators of the container, can obtain docker host monitoring data such as cpu usage, memory usage, disk usage, etc. through node_export. The running indicators of the docker container, such as the CPU usage of the container and the memory usage of the container, can be monitored through cAdvisor. The running state indicators of mysql can be monitored through mysqld_export. The indicators of consul can be monitored through consul_export. However, Prometheus cannot monitor the running indicators of the business system deployed in the container. There are also tools for monitoring the running indicators of the business system, but they cannot monitor the running indicators of the container, that is, there is no way to monitor the running indicators of the container and the business system at the same time. SUMMARY
[0004] The present disclosure provides at least a container monitoring system, method, electronic device and storage medium. The present disclosure can monitor both container performance indicators and business running indicators, and can associate and display the two indicators. The present disclosure can provide more comprehensive monitoring data, improve the efficiency of user monitoring, and accurately locate running problems.
[0005] The present disclosure provides a container monitoring system, which comprises:
[0006] a container monitoring tool, configured to obtain container performance data of a container running time and send the container performance data to a middleware;
[0007] a business monitoring tool, configured to obtain business running data of a business system deployed in the container and send the business running data to the middleware;
[0008] The middleware is configured to receive the container performance data sent by the container monitoring tool and the service running data sent by the service monitoring tool, and send the container performance data and the service running data to a data association module.
[0009] The data association module is configured to associate the received container performance data and the service running data according to a preset mapping table, obtain monitoring running data, and send the monitoring running data to the middleware, so that the middleware sends the monitoring running data to a display module.
[0010] The display module is configured to display the received monitoring running data in a structured form.
[0011] In an optional implementation, the container monitoring system further includes a first application program interface.
[0012] The container monitoring tool is configured to obtain the container performance data for a target container through the first application program interface.
[0013] The container performance data includes cpu usage, memory usage, and disk usage.
[0014] In an optional implementation, the container monitoring system further includes a second application program interface and a third application program interface.
[0015] The service monitoring tool is configured to obtain service basic information and a service identifier for all service systems through the second application program interface.
[0016] The service monitoring tool is further configured to obtain service running data corresponding to the service identifier of the service system running in the container through the service identifier and the third application program interface.
[0017] The service running data includes the average response time of the system, the error rate of the system, slow sql, access volume, and abnormal requests.
[0018] In an optional implementation, the container monitoring tool is specifically configured to:
[0019] respond to a data query request sent by the data association module, wherein the data query request carries a query condition;
[0020] obtain the container performance data by inputting the query condition in the first application program interface.
[0021] In an optional implementation, the middleware is specifically configured to:
[0022] The received container performance data and the service running data;
[0023] In response to a data acquisition request of the data association module, the container performance data and the service running data are sent to the data association module at a preset time interval.
[0024] In an optional implementation, the data association module is specifically used for:
[0025] Obtaining a container identifier corresponding to the container performance data and a service identifier corresponding to the service running data;
[0026] According to the container identifier of the container performance data, querying the service identifier of the service running data associated with the container identifier from the preset mapping table;
[0027] The container performance data and the service running data having an association relationship are associated to obtain monitoring running data.
[0028] The embodiments of the present disclosure further provide a container monitoring method, and the method comprises:
[0029] Obtaining container performance data of a container runtime and service running data of a service system deployed in the container;
[0030] According to a preset mapping table, the container performance data and the service running data are associated through respective unique identifiers to obtain monitoring running data;
[0031] The monitoring running data is displayed in a structured form.
[0032] In an optional implementation, the container performance data of the container runtime comprises:
[0033] Obtaining the container performance data for a target container, wherein the container performance data comprises cpu usage, memory usage, and disk usage.
[0034] In an optional implementation, the container performance data of the container runtime and the service running data of the service system deployed in the container comprise:
[0035] Obtaining service basic information and a service identifier for all service systems;
[0036] According to the service identifier, obtaining service running data of a service system running in the container corresponding to the service identifier;
[0037] The service running data comprises an average response time of the system, an error rate of the system, a slow sql, an access volume, and an abnormal request.
[0038] In an optional implementation, the container performance data of the target container is acquired, wherein the container performance data includes CPU usage, memory usage, and disk usage.
[0039] A data query request is acquired, wherein the data query request carries a query condition.
[0040] The container performance data is acquired according to the query condition.
[0041] In an optional implementation, the method further includes:
[0042] The container performance data and the service running data are stored.
[0043] The container performance data and the service running data are acquired at a preset time interval.
[0044] In an optional implementation, the container performance data and the service running data are associated according to a preset mapping table through respective unique identifiers to obtain monitoring running data, including:
[0045] A container identifier corresponding to the container performance data and a service identifier corresponding to the service running data are acquired.
[0046] The service identifier of the service running data associated with the container identifier of the container performance data is queried from the preset mapping table according to the container identifier of the container performance data.
[0047] The container performance data and the service running data having an association relationship are associated to obtain monitoring running data.
[0048] The embodiments of the present disclosure further provide an electronic device, including a processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine readable instructions are executed by the processor to perform the steps in the above embodiments.
[0049] The embodiments of the present disclosure further provide a computer storage medium, which stores a computer program, and the computer program is executed by a processor to perform the steps in the above embodiments.
[0050] The container monitoring system, method, electronic device and storage medium provided by the embodiments of the present disclosure include a container monitoring tool configured to obtain container performance data; a service monitoring tool configured to obtain service running data; a middleware configured to exchange data; a data association module configured to associate the container performance data and the service running data; and a display module configured to display the associated data. The container monitoring system provided by the present disclosure can monitor both container performance indicators and service running indicators, and can associate and display the two indicators to provide more comprehensive monitoring data, thereby improving the monitoring efficiency of users and accurately locating running problems.
[0051] In order to make the above objectives, characteristics and advantages of the present disclosure more obvious and easy to understand, the following preferred embodiments are specifically described below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings needed to be used in the embodiments. The drawings herein are incorporated into the specification and form a part of the specification, which show the embodiments consistent with the present disclosure, and are used to explain the technical solutions of the present disclosure together with the specification. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be considered as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0053] Figure 1 Fig. 1 shows a schematic diagram of a container monitoring system provided by an embodiment of the present disclosure;
[0054] Figure 2 Fig. 2 shows another schematic diagram of a container monitoring system provided by an embodiment of the present disclosure;
[0055] Figure 3 Fig. 3 shows a third schematic diagram of a container monitoring system provided by an embodiment of the present disclosure;
[0056] Figure 4 Fig. 4 shows a flowchart of a container monitoring method provided by an embodiment of the present disclosure;
[0057] Figure 5 Fig. 5 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
[0058] ILLUSTRATIONS:
[0059] 100 - container monitoring system, 101 - first application program interface, 102 - second application program interface, 103 - third application program interface, 110 - container monitoring tool, 120 - middleware, 130 - business monitoring tool, 140 - data association module, 150 - display module, 500 - electronic device, 510 - processor, 520 - memory, 521 - internal memory, 522 - external memory, 530 - bus. DETAILED DESCRIPTION
[0060] To make the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the following will be combined with the drawings of the embodiments of the present disclosure to make a clear and complete description of the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The components of the embodiments of the present disclosure described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the claimed present disclosure, but only represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0061] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0062] The term "and / or" herein only describes an association relationship, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of multiple or any combination of at least two of multiple, for example, including at least one of A, B and C can mean including any one or more elements selected from the set consisting of A, B and C.
[0063] It is found through research that with the development of the Internet, the application of computer business systems can be seen everywhere, but different computers have different running environments. In order to realize the porting and compatibility of business systems, the business systems are packaged by using containers to realize the running of business systems in different running environments, and the containers provide great convenience for the running of business systems.
[0064] There are tools on the market that monitor the running indicators of containers, and there are tools that monitor the running indicators of business systems, but there is no tool that monitors containers and business systems at the same time.
[0065] Based on the above research, the container monitoring system provided by the present disclosure comprises: a container monitoring tool for obtaining container performance data of container runtime and sending the container performance data to middleware; a business monitoring tool for obtaining business running data of a business system deployed in a container and sending the business running data to the middleware; the middleware receives the container performance data sent by the container monitoring tool and the business running data sent by the business monitoring tool, and sends the container performance data and the business running data to the data association module; the data association module associates the received container performance data and business running data through their respective unique identifiers according to a preset mapping table to obtain monitoring running data, and sends the monitoring running data to the middleware, so that the middleware sends the monitoring running data to the display module; and the display module displays the received monitoring running data in a structured form. Here, the container performance indicators and business running indicators monitored by the container monitoring system are associated together, and the associated indicators are completely displayed, which facilitates users to monitor the running indicators of containers and businesses at the same time, improves the monitoring efficiency of users, and ensures accurate positioning of running problems.
[0066] Referring to Figure 1 As shown in FIG. 1, the container monitoring system 100 provided by the present disclosure comprises:
[0067] The container monitoring tool 110 is configured to obtain container performance data of container runtime and send the container performance data to the middleware 120.
[0068] The business monitoring tool 130 is configured to obtain business running data of a business system deployed in a container and send the business running data to the middleware 120.
[0069] The middleware 120 is configured to receive the container performance data sent by the container monitoring tool 110 and the business running data sent by the business monitoring tool 130, and send the container performance data and the business running data to the data association module 140.
[0070] The data association module 140 is configured to associate the received container performance data and business running data through their respective unique identifiers according to a preset mapping table to obtain monitoring running data, and send the monitoring running data to the middleware 120, so that the middleware 120 sends the monitoring running data to the display module 150.
[0071] The display module 150 is configured to display the received monitoring running data in a structured form.
[0072] Here, the container monitoring tool 110 can be software, plug-ins, web pages, etc., such as the monitoring tool Prometheus, which can monitor the performance indicators of a certain pod or container, and the relevant indicator data can be viewed through the Web UI of Prometheus or the third-party tool grafna. The container performance data obtained by the container monitoring tool 110 is encapsulated in a preset format and can include performance indicators such as the usage rate of CPU, the usage rate of memory, the usage rate of disk, whether the network interface or node is alive, and the unique identifier of the container. After obtaining the container performance data, the data is sent to the data association module 140 through an interface.
[0073] In addition, the business monitoring tool 130 can be software, plug-ins, web pages, etc., such as the monitoring tool Perspective, and the like, which can monitor the running indicators of a specific business of a business system, and the relevant indicator data can be viewed through the Web UI of the monitoring software. The business running data of the business system deployed in the container obtained by the business monitoring tool 130 can include application running state monitoring information such as the average response time of the system, the error rate of the system, slow SQL, and access volume. After obtaining the business running data, the data is sent to the data association module 140 through an interface.
[0074] In an optional implementation, the middleware 120 is specifically configured to:
[0075] receive the container performance data and the business running data;
[0076] in response to a data request of the data association module, send the container performance data and the business running data to the data association module 140 at a preset time interval.
[0077] Here, the middleware 120 is a message middleware, which can obtain data at a preset time interval and store the obtained data in the form of a queue, and simultaneously consume data from the big data platform at a preset time interval, retrieve data from the big data platform, and display the data on a screen. If the obtained data is abnormal, for example, the usage rate of the CPU of the container is too high, and the business response time is too slow, an alarm information is pushed to the user.
[0078] The preset time interval can be set according to user needs, which provides support for fast storage and retrieval of data.
[0079] For example, when the middleware 120 is a kafka message middleware, the container performance data of the container monitoring tool 110, the business running data of the business monitoring tool 130 and the monitoring running data from the data association module 140 are received at a preset time interval. When the data association module 140 performs data association, the middleware 120 sends the container performance data and the business running data to the data association module 140 at a preset time interval. When the monitoring running data is displayed on the display platform, the middleware 120 sends the monitoring running data to the display platform at a preset time interval.
[0080] In another aspect, the preset mapping table records the mapping relationship of the unique identifiers of the container performance data and the business running data, and is generated according to the correspondence between the container and the business system deployed in the container. The preset mapping table specifically includes: ownerShip, an application name, an application code, an insert time, an operator, a validation, and a mark. The namespace is the unique identifier of the container performance data, and the application code is the unique identifier of the business running data.
[0081] In an optional implementation, as shown in Figure 1 The data association module 140 is specifically configured to:
[0082] obtain the container identifier corresponding to the container performance data and the business identifier corresponding to the business running data;
[0083] query, according to the container identifier of the container performance data, the business identifier of the business running data associated with the container identifier from the preset mapping table;
[0084] associate the container performance data and the business running data having the association relationship to obtain monitoring running data.
[0085] Here, the data association module 140 first parses the unique identifiers of the container performance data and the business running data when associating the container performance data and the business running data. Since the mapping relationship between the unique identifier of the container performance data and the unique identifier of the business running data is recorded in the preset mapping table, the data information of the mapping table is first found according to the position of the mapping table in the memory, secondly, the unique identifier of the container performance data in the mapping table is searched by traversing the mapping table through a searching algorithm, and thirdly, the position and specific value of the unique identifier of the corresponding business running data are determined according to the unique identifier of the container performance data in the mapping table. If the unique identifier of the container performance data and the unique identifier of the business running data are in one mapping table, that is, the two data have a mapping relationship, the container performance data and the business running data having the mapping relationship are determined according to the determined unique identifier having the mapping relationship, and finally, the container performance data and the business running data having the mapping relationship are associated and integrated through an association algorithm to obtain complete monitoring running data.
[0086] In addition, after obtaining the complete monitoring running data, in order to facilitate the user to intuitively monitor and analyze the data, the monitoring running data is subjected to a data conversion operation, and the data is displayed in a structured form.
[0087] When the data is displayed in a structured form, the display module can be a display screen, an alarm platform, an operation and maintenance work order system, etc.
[0088] Referring to Figure 2 Fig. 2 is a schematic diagram of a container monitoring system provided by an embodiment of the present disclosure, in an alternative implementation, the container monitoring system 100 further comprises a first application program interface 101.
[0089] The container monitoring tool 110 is configured to acquire the container performance data of the target container through the first application program interface 101.
[0090] The container performance data includes the CPU usage, the memory usage, and the disk usage.
[0091] Here, the first application program interface 101 is an API interface. Since the container is supported by the resources of a computer when running, the performance indicators of the container are mainly the resource usage of the computer, and therefore the container performance data can include the CPU usage, the memory usage, the disk usage, whether the network interface or node is alive, etc.
[0092] In the process that the container monitoring tool 110 invokes the container performance data through the first application program interface 101, the container performance raw data is invoked through the first application program interface 101 first, and after the container performance raw data is obtained, the container performance raw data is processed through integration and combination, filtering, classification, conversion and the like, and the processed container performance raw data is encapsulated in a preset format. Further, in the process that the container performance raw data is encapsulated in the preset format, and the container raw data monitored by the container monitoring tool 110 is the memory usage, the preset format can include a sourceId link ID, an ownerShip ownership subject, an appName application name, an indexName monitoring item name, a namespace, a pod_name, a container_name, a controlTime monitoring time, an appCode system code, a sourceName index name and values of the container memory, wherein the namespace can be used as a unique identifier of the container performance raw data.
[0093] In an optional implementation, the container monitoring tool 110 is specifically used for:
[0094] in response to a data query request sent by the data association module 140, wherein the data query request carries a query condition;
[0095] The container performance data is obtained by inputting the query condition in the first application program interface 101.
[0096] Here, in the process that the container performance data is obtained by inputting the query condition in the first application program interface, the container performance data can be obtained by inputting a search condition in a calling statement, for example, http: / / IP:port / api / v1 / query_range?query=(query condition), wherein the search condition can control the query range, such as specifying the query index name, specifying the namespace name, specifying the image name, specifying the container name, specifying the pod name, and the query condition can be input in a regular expression format, for example:
[0097] indexName = container_memory_working_set_bytes,
[0098] namespace = "kube-system",
[0099] image!= "",
[0100] container_name = ~ ". *",
[0101] container_name!= "POD",
[0102] pod_name = ~ ". *".
[0103] For example, when the container monitoring tool 110 obtains the container performance data, the interface is called by calling a statement such as http: / / IP:port / api / v1 / query_range?query=(query condition). When the query condition is namespace="kube-system", the obtained container performance data is all container performance index data of the namespace "kube-system". If the monitoring index is the memory usage, the obtained container performance index data is encapsulated according to the preset format link ID, attribution subject, application name, monitoring item name, namespace, pod name, container name, monitoring time, system code, index name, and container memory value.
[0104] Referring to Figure 3 Fig. 3 is a schematic diagram of a container monitoring system provided by an embodiment of the present disclosure, in an optional implementation, the container monitoring system 100 further comprises a second application program interface 102 and a third application program interface 103.
[0105] The business monitoring tool 130 is configured to obtain, through the second application program interface 102, business basic information and a business identifier of all business systems.
[0106] The business monitoring tool 130 is further configured to obtain, through the business identifier and the third application program interface 103, business running data corresponding to the business identifier of the business system running in the container.
[0107] The business running data includes the average response time of the system, the error rate of the system, slow SQL, access volume, and abnormal request.
[0108] Here, the second application program interface 102 and the third application program interface 103 are both API interfaces, the business basic information includes a business name, a business ID, and an attribution subject of the business, and since the business system is deployed in the container and runs, the main monitoring is the state of the business execution, and the business index of the business system is mainly the running index of the business, so the business running data can include the average response time of the system, the error rate of the system, slow SQL, access volume, and the like.
[0109] Wherein, when the business monitoring tool 130 acquires the business running data through the second application program interface 102, the data is acquired according to a preset time frequency, first, the basic information of the business monitored by the business monitoring tool 130 and the unique identification of the business are acquired through the second application program interface 102, and the unique identification of the business is stored in the cache database, and then the business running data corresponding to the business identification is further called through the third application program interface 103 according to the business identification.
[0110] Wherein, when the business monitoring tool 130 acquires the business running data through the third application program interface 103, first, the business running original data is called through the third application program interface 103, after obtaining the business running original data, the business running original data is integrated and merged, filtered, classified, converted and other processing, and the processed business running original data is packaged according to the preset format.
[0111] Further, when the business running original data monitored by the business monitoring tool 130 is the average response time of the system, the preset format can include sourceId link ID, ownerShip ownership, appName application name, indexName monitoring item name, appId application ID, timeType type, appCode system code, sourceName index name, tranInfo transaction information, transId transaction ID, transName transaction name, respCount access volume, respTime average response time, controlTime monitoring time point, moudleName application name (including code), wherein the system code can be used as the unique identification of the business running original data.
[0112] The container monitoring system disclosed in the embodiment comprises a container monitoring tool 110, a service monitoring tool 130, a middleware 120, a data correlation module 140 and a display module 150. The container monitoring tool 110 is configured to acquire container performance data of a container runtime and send the container performance data to the middleware 120. The service monitoring tool 130 is configured to acquire service running data of a service system deployed in the container and send the service running data to the middleware 120. The middleware 120 is configured to receive the container performance data sent by the container monitoring tool 110 and the service running data sent by the service monitoring tool 130, and send the container performance data and the service running data to the data correlation module 140. The data correlation module 140 is configured to correlate the received container performance data and service running data through respective unique identifiers according to a preset mapping table to obtain monitoring running data, and send the monitoring running data to the middleware 120. The display module 150 is configured to display the received monitoring running data in a structured form. Here, the container performance indicators and the service running indicators monitored by the container monitoring system are correlated together, and the correlated indicators are completely displayed, so that a user can simultaneously monitor the running indicators of the container and the service, the monitoring efficiency is improved, and accurate positioning of running problems is ensured.
[0113] Based on the same inventive concept, the container monitoring method corresponding to the container monitoring system is also provided in the embodiments of the present disclosure. Since the principle of the method in the embodiments of the present disclosure solves the problem similar to the container monitoring system described above, the implementation of the method can be referred to the implementation of the system, and the repeated parts will not be described here.
[0114] To facilitate the understanding of the embodiments, first, a container monitoring method disclosed in the embodiments of the present disclosure is described in detail. The execution subject of the container monitoring method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability, which may, for example, include a terminal device or a server or other processing device. The terminal device may, for example, be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementation manners, the container monitoring method may, for example, be implemented by a processor invoking computer readable instructions stored in a memory.
[0115] Please refer to Figure 4 , Figure 4 A flowchart of a container monitoring method provided in the embodiments of the present disclosure is shown in FIG. 4. As shown in FIG. 4, the container monitoring method provided in the embodiments of the present disclosure comprises steps S401-S403. Figure 4 In the step S401, the container performance data of the container runtime is acquired. In the step S402, the service running data of the service system deployed in the container is acquired. In the step S403, the container performance data and the service running data are correlated through respective unique identifiers according to a preset mapping table to obtain monitoring running data.
[0116] S401: Obtain container performance data of a container runtime and business running data of a business system deployed in the container;
[0117] S402: According to a preset mapping table, associate the container performance data and the business running data through respective unique identifiers to obtain monitoring running data;
[0118] S403: Display the monitoring running data in a structured form.
[0119] In an optional implementation, the obtaining of the container performance data of the container runtime comprises:
[0120] Obtaining the container performance data for the target container, wherein the container performance data comprises cpu usage, memory usage, and disk usage.
[0121] In an optional implementation, the obtaining of the container performance data of the container runtime and the business running data of the business system deployed in the container comprises:
[0122] Obtaining business basic information and business identifiers of all business systems;
[0123] According to the business identifiers, obtaining business running data of the business system running in the container corresponding to the business identifiers;
[0124] The business running data comprises average response time of the system, error rate of the system, slow sql, access volume, and abnormal request.
[0125] In an optional implementation, the obtaining of the container performance data for the target container, wherein the container performance data comprises cpu usage, memory usage, and disk usage, comprises:
[0126] Obtaining a data query request, wherein the data query request carries a query condition;
[0127] According to the query condition, obtaining the container performance data.
[0128] In an optional implementation, the method further comprises:
[0129] Storing the container performance data and the business running data;
[0130] According to a preset time interval, obtaining the container performance data and the business running data.
[0131] In an alternative implementation, the associating, according to the preset mapping table, the container performance data and the service running data through respective unique identifiers to obtain monitoring running data comprises:
[0132] obtaining a container identifier corresponding to the container performance data and a service identifier corresponding to the service running data;
[0133] querying, according to the container identifier of the container performance data, the service identifier of the service running data associated with the container identifier from the preset mapping table;
[0134] associating the container performance data and the service running data having the association relationship to obtain monitoring running data.
[0135] The description of each step in the method can refer to the related description in the above system embodiments, and will not be described in detail here.
[0136] Those skilled in the art can understand that, in the above method of the specific implementation, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process, and the specific execution order of each step should be determined by its function and possible internal logic.
[0137] The container monitoring method disclosed by the embodiments of the present disclosure obtains container performance data at a container runtime and service running data of a service system deployed in the container; associates, according to a preset mapping table, the container performance data and the service running data through respective unique identifiers to obtain monitoring running data; and displays the monitoring running data in a structured form. Here, the container performance indicators and the service running indicators monitored are associated together, and the associated indicators are completely displayed, which facilitates a user to simultaneously monitor the running indicators of the container and the service, improves the monitoring efficiency of the user, and ensures accurate positioning of a running problem.
[0138] Based on the same technical concept, the embodiments of the present disclosure further provide an electronic device. The embodiments of the present disclosure further provide an electronic device 500, as shown in Figure 5 FIG. 1 is a structural schematic diagram of the electronic device 500 provided by the embodiments of the present disclosure, which comprises:
[0139] The processor 510, the memory 520, and the bus 530; the memory 520 is used to store execution instructions, including the memory 521 and the external memory 522; the memory 521 here is also called the internal memory, used to temporarily store operation data in the processor 510 and exchange data with the external memory 522 such as a hard disk, the processor 510 exchanges data with the external memory 522 through the memory 521, when the electronic device 500 is running, the processor 510 and the memory 520 communicate through the bus 530, so that the processor 510 can execute the steps of the container monitoring method shown in the above system embodiment.
[0140] The embodiment of the present disclosure further provides a computer storage medium, which stores a computer program, and the computer program is run by a processor to execute the steps of the container monitoring system described in the above system embodiment. The storage medium can be a volatile or non-volatile computer readable storage medium.
[0141] The embodiment of the present disclosure further provides a computer program product, which carries a program code, and the program code includes instructions for executing the steps of the container monitoring system described in the above system embodiment, which can be specifically referred to the above method embodiment and will not be described here.
[0142] The computer program product can be specifically implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium, and in another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
[0143] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the electronic device, the storage medium and the system described above can refer to the corresponding process in the above method embodiment, which will not be described here. In several embodiments provided by the present disclosure, it should be understood that the disclosed electronic device, storage medium, system and method can be implemented by other ways. The above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual elements can be indirect coupling or communication connection through some communication interface, device or unit, which can be electrical, mechanical or other forms.
[0144] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e. may be located in one place, or may be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0145] In addition, each functional unit in various embodiments of the present disclosure can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit.
[0146] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present disclosure essentially or the part of the prior art or the part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present disclosure. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various program code storage media.
[0147] Finally, it should be noted that: the above-described embodiments are only specific embodiments of the present disclosure, used to illustrate the technical solutions of the present disclosure, and not to limit it, the protection scope of the present disclosure is not limited to this, although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand: any person skilled in the art in the technical range disclosed by the present disclosure, it can still modify or easily think of changes to the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications, changes or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and all should be covered in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A container monitoring system, characterized in that, The system includes: A container monitoring tool is used to retrieve raw container performance data through a first application programming interface (API); process the raw container performance data; encapsulate the processed raw container performance data according to a preset format to obtain container performance data; when the processed raw container performance data is encapsulated according to the preset format and the raw container data is memory usage, the preset format includes link ID, owner, application name, monitoring item name, namespace, pod name, container name, monitoring time, system code, metric name, and container memory value; and sends the container performance data to middleware. Business monitoring tools are used to acquire business operation data of business systems deployed in containers and send the business operation data to middleware; The middleware is used to receive the container performance data sent by the container monitoring tool and the business operation data sent by the business monitoring tool, and to send the container performance data and the business operation data to the data association module. The data association module is used to associate the received container performance data and the business operation data with their respective unique identifiers according to a preset mapping table to obtain monitoring operation data, and send the monitoring operation data to the middleware so that the middleware can send the monitoring operation data to the display module. The display module is used to display the received monitoring operation data in a structured form.
2. The system according to claim 1, characterized in that, The container performance data includes CPU utilization, memory utilization, and disk utilization.
3. The system according to claim 1, characterized in that, The container monitoring system also includes a second application programming interface and a third application programming interface; The business monitoring tool is used to obtain basic business information and business identifiers for all business systems through the second application programming interface. The business monitoring tool is also used to obtain business operation data corresponding to the business identifier of the business system running in the container through the business identifier and the third application interface; The business operation data includes the system's average response time, system error rate, slow SQL queries, access volume, and abnormal requests.
4. The system according to claim 2, characterized in that, The container monitoring tool is specifically used for: In response to a data query request sent by the data association module, wherein the data query request carries query conditions; The container performance data can be obtained by inputting the query conditions in the first application interface.
5. The system according to claim 1, characterized in that, The middleware is specifically used for: Receive the container performance data and the service operation data; In response to the data acquisition request from the data association module, the container performance data and the business operation data are sent to the data association module at preset time intervals.
6. The system according to claim 1, characterized in that, The data association module is specifically used for: Obtain the container identifier corresponding to the container performance data and the service identifier corresponding to the service operation data; Based on the container identifier of the container performance data, query the service identifier of the service operation data associated with the container identifier from the preset mapping table; The container performance data and the business operation data that have a relationship are associated to obtain monitoring operation data.
7. A container monitoring method, characterized in that, The method, applied to the container monitoring system according to any one of claims 1 to 6, comprises: The system retrieves raw container performance data through a first application programming interface (API); processes the raw container performance data; encapsulates the processed raw container performance data according to a preset format to obtain container performance data; when the processed raw container performance data is encapsulated according to the preset format and the raw container data is memory usage, the preset format includes link ID, owner, application name, monitoring item name, namespace, pod name, container name, monitoring time, system code, metric name, and container memory value; and obtains the business operation data of the business system deployed in the container. According to the preset mapping table, the container performance data and the business operation data are associated with each other through their respective unique identifiers to obtain monitoring operation data; The monitoring and operation data is displayed in a structured format.
8. The method according to claim 7, characterized in that, The container performance data includes CPU utilization, memory utilization, and disk utilization.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the container monitoring method as described in claim 7 or 8 are performed.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer program that, when executed by a processor, performs the steps of the container monitoring method as described in claim 7 or 8.
Citation Information
Patent Citations
Equipment fault intelligent detection and emergency disposal system and method based on 3D technology
CN111008713A