CN111737082A - Container and monitoring method, device, equipment and medium for container application - Google Patents

Container and monitoring method, device, equipment and medium for container application Download PDF

Info

Publication number
CN111737082A
CN111737082A CN202010567164.8A CN202010567164A CN111737082A CN 111737082 A CN111737082 A CN 111737082A CN 202010567164 A CN202010567164 A CN 202010567164A CN 111737082 A CN111737082 A CN 111737082A
Authority
CN
China
Prior art keywords
container
target container
target
data
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010567164.8A
Other languages
Chinese (zh)
Other versions
CN111737082B (en
Inventor
孟国庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202010567164.8A priority Critical patent/CN111737082B/en
Publication of CN111737082A publication Critical patent/CN111737082A/en
Application granted granted Critical
Publication of CN111737082B publication Critical patent/CN111737082B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/323Visualisation of programs or trace data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Automatic Analysis And Handling Materials Therefor (AREA)

Abstract

The invention discloses a container and a monitoring method, a monitoring device, monitoring equipment and a monitoring medium for container application. The method comprises the following steps: controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers; controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information includes at least: a first identification of a target container and a first identification of a target container bin; controlling a second data collector to collect a second identifier of the target container according to the first identifier of the target container bin, and controlling the second data collector to obtain operating data of the target container according to the second identifier of the target container; and performing correlation processing on the target container and the running data of at least one application in the target container, and displaying a processing result. The invention improves the monitoring accuracy and reliability of the container and the container application.

Description

Container and monitoring method, device, equipment and medium for container application
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a container and a container application monitoring method, device, equipment and medium.
Background
The container is a lightweight operating system level virtualization, and can run the application and the dependent items thereof in a resource isolation process. However, while container technology provides for more efficient and effective utilization of resources, it also provides challenges to container management and operational maintenance. Among other things, monitoring the operation of the container and the applications in the container itself is one aspect.
Monitoring the operation of the container and the applications in the container itself includes: the method comprises the steps of collecting operation data, processing the collected operation data, displaying a processing result and the like. The operation data of the container and the application in the container can be acquired by the following modes: in the first mode, a class of lightweight data collectors (beat collectors) are used to collect the operation data of the container and the operation data applied to the container. Wherein, lightweight data collector includes: a light-weight index collector (Metricbed), a light-weight log file collector (fileback), an operation time collector (Heartback) and the like; in the second mode, the operation data of the container and the operation data of the application in the container are collected through a resource monitoring tool (Prometheus). After the operational data of the container and the operational data of the applications in the container itself are collected, these two types of operational data can be processed and displayed.
However, the two above-mentioned operation data acquisition methods have the following problems: the first method is as follows: when the beat collector is used for collecting the operation data of the container, the beat collector needs to be arranged in the container in advance, so that the beat collector occupies resources required by the operation of the application in the container, and the application can fail due to insufficient resources; in a second mode, when the operation data of the application in the container is collected by using Prometheus, the collected operation data may be incomplete, so that the reliability of the operation monitoring result of the application in the container is poor.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a device, and a medium for monitoring a container and a container application, so as to implement reliable monitoring of a container and an operation condition of an application in the container on the basis of not occupying a container resource, and improve accuracy and reliability of monitoring of the container and the container application.
In a first aspect, an embodiment of the present invention provides a container and a monitoring method for a container application, where the method is applied to a monitoring device, and the method includes:
controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers;
controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin;
controlling the second data collector to collect a second identifier of a target container according to the first identifier of the target container bin, and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container;
and performing correlation processing on the target container and the running data of at least one application in the target container, and displaying a processing result.
In a second aspect, an embodiment of the present invention further provides a container and a monitoring apparatus for container application, configured on a monitoring device, including:
the system comprises a first control module, a second control module and a third control module, wherein the first control module is used for controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, and the first data collector is deployed in other containers;
the second control module is used for controlling the second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin;
the third control module is used for controlling the second data collector to collect a second identifier of the target container according to the first identifier of the target container bin and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container;
and the processing module is used for performing correlation processing on the target container and the running data of at least one application in the target container and displaying a processing result.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the monitoring method for the container and the container application according to any of the embodiments of the present invention.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the container and the monitoring method for the container application described in the embodiment of the present invention.
The technical scheme disclosed by the embodiment of the invention has the following beneficial effects:
the first data collector and the second data collector are combined, so that the advantages that the first data collector collects the operation data applied in the container and the second data collector collects the operation data of the container are fully utilized, the first data collector is prevented from being arranged in each container, and the resource occupation of the containers is reduced; after the operation data of the application in the container and the operation data of the container are collected, the operation data of the application and the operation data of the container are subjected to correlation processing, and a processing result is displayed. Therefore, the reliable monitoring of the container and the operation condition of the application in the container is realized on the basis of not occupying resources, and the monitoring accuracy and reliability of the container and the application in the container are improved.
Drawings
Fig. 1 is a schematic flow chart of a container and a monitoring method for a container application according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a container and a monitoring method for container application according to a second embodiment of the present invention;
fig. 3 is a schematic flow chart of a container and a monitoring method for a container application according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a container and a monitoring device for a container application according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad invention. It should be further noted that, for convenience of description, only some structures, not all structures, relating to the embodiments of the present invention are shown in the drawings.
The container and the monitoring method, device, equipment and medium for the container application according to the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Example one
Fig. 1 is a schematic flow chart of a container and a monitoring method for a container application according to an embodiment of the present invention. The present embodiment is applicable to a scenario of monitoring operation conditions of a container and a container application, the method may be executed by a monitoring method of a container and a container application, and the apparatus may be composed of hardware and/or software and may be integrated in an electronic device. In an embodiment of the present invention, the electronic device is a monitoring device. As shown in fig. 1, the method specifically includes the following steps:
s101, controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers.
It should be noted that, in the embodiment of the present invention, a container refers to an open source software project, which enables automation of work of application deployment under the container, thereby providing an additional software abstraction layer on an operating system and an automatic management mechanism of operating system layer virtualization. The container may be a private cloud, a public cloud, or a stand-alone machine, and accordingly the application may be executed in the private cloud, the public cloud, or the stand-alone machine, which is not specifically limited herein.
Wherein, the target container refers to any container in the container cluster; the first identification of the target container refers to the IP address of the target container; the other container means any container other than the target container.
In this embodiment, the container cluster may be composed of a plurality of servers, and each server includes a plurality of containers. Wherein at least one application is deployed within each container. The application may be any type of application, such as a life class, a tool class, an entertainment class, or a social class, among others. Accordingly, the running data of the application may be, but is not limited to: memory utilization, disk utilization, network information, and CPU occupancy. That is, when the types of applications are different, the corresponding operation data are also different.
Optionally, the first data collector is preferably a lightweight data collector (beat collector). Wherein, the beat collector includes but is not limited to: a light-weight index collector (Metricbed), a light-weight log file collector (fileback), an operation time collector (Heartback) and the like.
Since the beat collector can generally collect the operation data of the container and the operation data of the application in the container. However, when the beat collector collects the operation data of any container, the beat collector needs to be disposed in the container in advance, so that the beat collector can collect the operation data of the container. If the beat collector is deployed in the container, resources required by normal operation of at least one application in the container are occupied, so that the application may fail to operate due to insufficient resources.
Therefore, in order to avoid the problem that the disposition of the beat collector in the container in advance to save the container resources occupied by the disposition of the beat collector, the embodiment of the present invention disposes the beat collector on at least one container in the container cluster to collect the running data of at least one application in other containers (target containers) except the container where the beat collector is located. The at least one container may refer to a container in which an application is not deployed, and the like, and is not particularly limited herein.
Specifically, the control instruction may be sent to other containers in which the beat collector is deployed, so that the beat collectors in the other containers collect the operation data of at least one application in any container (target container) except the container in which the beat collector is located according to the control instruction.
Optionally, in this embodiment, a control instruction may also be periodically sent to another container in which a beat collector is deployed, so that the beat collector in the other container periodically collects the operation data of at least one application in the target container according to the control instruction, thereby achieving the purpose of automatically collecting the operation data of at least one application in the target container, avoiding manual triggering of a collection instruction, and improving automation and intelligence of operation data collection.
For example, controlling the beat collector to collect the running data of at least one application in the target container and the first identifier of the target container once every one hour (h); or controlling the beat collector to collect the operation data of at least one application in the target container and the first identifier of the target container once every two hours (h), and the like, which is not limited herein.
S102, controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin.
The target container bin specifically refers to pod (kubernetes pod) of the target container. Wherein the POD includes a plurality of containers of the same type as the target container, in addition to the target container.
The POD information may include a second identification of the target POD in addition to the first identification of the target POD and the first identification of the target POD. It should be noted that, in this embodiment, the first identifier of the target container bin refers to an ID of the target container bin; the second identification of the target container bin refers to the target container bin IP address.
In the embodiment of the present invention, the second data collector is preferably: resource monitoring tool (Prometheus).
Since the Prometheus can usually collect the operation data of the container and the operation data of the at least one application in the container, when the Prometheus collects the operation data of the at least one application in the container, the collected data is incomplete, so that the monitoring result of the operation condition of the application in the container is unreliable.
For this reason, the embodiment only utilizes the advantage of Prometheus to collect the operation data of the container, and controls Prometheus to collect the information of the target container bin (kubernets pod) according to the first identifier of the target container collected by the bed collector.
S103, controlling the second data collector to collect a second identifier of the target container according to the first identifier of the target container bin, and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container.
Wherein the second identification of the target container refers to the target container ID.
The operational data of the target container includes at least one of: memory utilization, disk utilization, network information, and CPU occupancy.
Optionally, after acquiring the first identifier of the target container bin, the monitoring device may control Prometheus to acquire the target container ID having the first identifier of the target container bin based on the first identifier of the target container bin.
And controlling Prometous to acquire the operation data of the target container corresponding to the target container ID according to the target container ID.
And S104, performing correlation processing on the target container and the running data of at least one application in the target container, and displaying a processing result.
Optionally, before performing association processing on the target container and the running data of at least one application in the target container, the method further includes: and acquiring the running data of at least one application in the target container collected by the beat collector and the running data of the target container collected by Prometheus. And further, performing correlation processing on the acquired target container and the running data of at least one application in the target container, and displaying a processing result.
For example, the present embodiment may obtain the target container and the running data of at least one application in the target container in the following manner;
in a first mode
The beat collector and the Prometheus send the collected operation data to the processor, so that the processor can obtain the two types of operation data.
The beat collector and the promemeus send the collected operation data to the processor, which may be sent in real time or periodically, and is not limited herein.
Mode two
The beat collector acquires the running data of the target container collected by Prometheus from the Prometheus based on a preset API (application program interface), and then the running data of at least one application in the target container collected by the beat collector and the running data of the target container collected by the Prometheus from the Prometheus are jointly sent to the processor, so that the processor can acquire the two types of running data.
And further, the processor performs correlation processing on the operation data of at least one application in the target container collected by the beat collector and the operation data of the target container collected by Prometheus so as to display a processing result to a user.
Wherein, when the processing result is displayed to the user, the optional embodiment may be displayed by a visualization tool (Kibana).
It can be understood that, in the embodiment of the present invention, the beat collector collects the operation data of at least one application in the target container, and the Prometheus collects the operation data of the target container, so that not only can the operation data of the application in the container be collected on the basis of not occupying container resources, but also the operation data of the container can be reliably obtained. After the operation data of at least one application in the target container and the target container are acquired, the operation data of at least one application in the target container acquired by the beat collector and the operation data of the target container acquired by Prometheus are subjected to correlation processing, so that the operation data of at least one application in the target container and the target container can be displayed through a display interface, a user can visually display the processing result through the display interface, the operation condition of the container and the operation condition of the application in the container are checked, manual statistics of the operation condition of the container and the operation condition of the application in the container are avoided, user operation is simplified, and user use experience is improved.
According to the technical scheme provided by the embodiment of the invention, the first data collector and the second data collector are combined, so that the advantages that the first data collector collects the operation data applied in the container and the second data collector collects the operation data of the container are fully utilized, the first data collector is prevented from being deployed in each container, and the resource occupation of the containers is reduced; after the operation data of the application in the container and the operation data of the container are collected, the operation data of the application and the operation data of the container are subjected to correlation processing, and a processing result is displayed. Therefore, the reliable monitoring of the container and the operation condition of the application in the container is realized on the basis of not occupying resources, and the monitoring accuracy and reliability of the container and the application in the container are improved.
Example two
Fig. 2 is a schematic flow chart of a container and a monitoring method for a container application according to a second embodiment of the present invention. Based on the foregoing embodiment, the further optimization, specifically, after "performing association processing on the target container and the running data of at least one application in the target container", further includes: and storing the processing result. As shown in fig. 2, the method specifically includes:
s201, controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers.
S202, controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin.
S203, controlling the second data collector to collect the second identifier of the target container according to the first identifier of the target container bin, and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container.
S204, performing correlation processing on the target container and the running data of at least one application in the target container, and storing a processing result.
Optionally, after performing association processing on the target container and the running data of at least one application in the target container to obtain the processing result, the embodiment of the present invention may store the processing result, so that when a subsequent user performs a running data (processing result) query operation, the corresponding target processing result may be obtained from the stored processing result.
In the embodiment of the present invention, the processing result may be stored in the following manner;
first mode
Storing according to the mapping relation between the processing result and the acquisition time;
second mode
And storing according to the mapping relation between the processing result and the target container identifier.
In order to increase the speed of querying the running data of the subsequent user, the embodiment of the invention preferably stores the processing result into the local database of the monitoring device. Further, when an abnormal condition (such as power failure) may occur during the operation of the monitoring device, the processing result stored in the local database is lost. For this reason, the embodiment of the present invention may further store the processing result in a server in communication connection with the monitoring device, so as to backup the processing result stored in the local database through the server. The processing result to be inquired by the user can be still obtained through interaction with the server when the processing result stored in the local database of the monitoring device is lost, so that the reliability of the storage of the processing result is ensured.
Further, when the processing result is stored in the local database of the monitoring device, the storage capacity of the local database is limited, which may result in that the new processing result cannot be normally stored in the local database. Therefore, after the processing result is stored in the local database, the present embodiment may further monitor in real time whether the storage duration of any processing result in the processing result stored in the local database reaches the preset retention period, and if it is determined that the storage duration of any processing result reaches the preset retention period, delete the processing result whose storage duration reaches the preset retention period to vacate an available space, so that a new processing result may be normally stored in the local database.
The preset retention period can be adaptively set according to the size of the local database. For example, set to two weeks or one month, etc.
That is, after storing the processing result, the present embodiment may further include:
determining whether the storage duration of the processing result reaches a preset retention period or not;
and if the preset retention period is reached, deleting the processing result.
And S205, displaying the stored processing result.
Optionally, after the processing result is stored in the embodiment, the stored processing result may be displayed, so that the user determines whether the operation condition of the target container and the application in the target container is good or not based on the displayed processing result.
According to the technical scheme provided by the embodiment of the invention, the first data collector and the second data collector are combined, so that the advantages that the first data collector collects the operation data applied in the container and the second data collector collects the operation data of the container are fully utilized, the first data collector is prevented from being deployed in each container, and the resource occupation of the containers is reduced; after the operation data of the application in the container and the operation data of the container are collected, the operation data of the application and the operation data of the container are subjected to correlation processing, the processing result is stored, and the stored processing result is displayed. Therefore, the reliable monitoring of the container and the operation condition of the application in the container is realized on the basis of not occupying resources, and the monitoring accuracy and reliability of the container and the application in the container are improved. In addition, the processing result is stored, so that when a user inquires the historical processing result subsequently, the target processing result can be obtained from the stored processing result, and the processing result inquired by the user can still be obtained through interaction with the server when the processing result stored in the local database is lost, so that the reliability of the storage of the processing result is ensured.
Based on the above embodiment, after storing the processing result, the embodiment of the present invention may further include: receiving a target time period sent by a user; and acquiring a target processing result according to the target time period, and displaying the target processing result.
That is to say, after the processing result is stored, the user can send the running data time period to be checked to the monitoring device according to actual needs, so that the monitoring device obtains the target processing result corresponding to the target time period, and displays the obtained target processing result to the user, thereby satisfying the personalized requirement of the user for checking the processing result, and further improving the user experience.
EXAMPLE III
Fig. 3 is a schematic flow chart of a container and a monitoring method for a container application according to a third embodiment of the present invention. On the basis of the above embodiments, the present embodiment is further optimized. Specifically, before "before displaying the processing result", the method further includes: and determining abnormal operation data exceeding a safety threshold in the processing result, and marking and displaying the abnormal operation data. As shown in fig. 3, the method is as follows:
s301, a first data collector is controlled to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers.
S302, controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin.
And S303, controlling the second data collector to collect the second identifier of the target container according to the first identifier of the target container bin, and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container.
S304, performing correlation processing on the target container and the running data of at least one application in the target container to obtain a processing result.
S305, determining abnormal operation data exceeding a safety threshold in the processing result, and marking and displaying the abnormal operation data.
The safety threshold may be adaptively set according to the type of the operation data, and is not particularly limited herein. I.e., different operational data has different safety thresholds, for example the safety threshold for CPU occupancy may be 80%, or 85%, etc.
Optionally, after the processing result is obtained, the monitoring device may compare each piece of operation data in the processing result with the corresponding safety threshold, and determine which pieces of operation data exceed the corresponding safety threshold. When any operation data is determined to exceed the corresponding safety threshold value, the operation data can be determined as abnormal operation data, and the abnormal operation data is marked and displayed. Therefore, the method helps a user to quickly position which containers and applications in the containers have abnormal operation conditions and what the abnormal conditions are specifically based on the abnormal operation data displayed by the marks, so that the user can conveniently adjust and process the abnormal containers and the applications in the containers in a targeted manner based on the abnormal operation data displayed by the marks, the abnormal containers and the applications in the containers can be recovered to be normal as soon as possible, and adverse effects are reduced.
For example, assuming that the memory usage safety threshold of the application X1 in the target container a is 85%, when it is determined that the operation data of the application X1 in the target container a and the target container a are subjected to correlation processing, and the memory usage of the application X1 in the processing result is 92%, it indicates that the memory usage of the application X1 exceeds the safety threshold of 85%, at this time, the memory usage of the application X1 in the target container a is displayed in a label manner, or the content usage of the application X1 in the target container a and the target container a is displayed in a label manner.
In the embodiment of the present invention, the marking and displaying the abnormal operation data specifically includes: highlighting, bolding and/or flashing the abnormal operation data.
It is understood that, in the embodiment, the highlighting mark, the font bolding and/or the blinking display may be a highlighting mark; or, the font can be thickened; alternatively, a blinking display may also be possible; or, the highlighting mark and the font can be thickened; alternatively, highlighting and blinking may also be possible; or, the font can be bolded and displayed in a flashing way; or highlighting, font bolding, blinking, and the like, which are not specifically limited herein.
According to the technical scheme provided by the embodiment of the invention, the operation data of the application acquired by the first data acquisition unit and the operation data of the container acquired by the second data acquisition unit are subjected to correlation processing to obtain a processing result, abnormal operation data exceeding a safety threshold in the processing result is determined, and the abnormal operation data is marked and displayed. Therefore, the reliable monitoring of the container and the operation condition of the application in the container is realized on the basis of not occupying resources, and the monitoring accuracy and reliability are improved. In addition, the abnormal operation data are marked and displayed to help a user to quickly position the abnormal container and/or the container application based on the marked and displayed abnormal operation data, so that the user can conveniently and pertinently adjust and process the abnormally operated container and/or the application in the container, the abnormal container and/or the application in the container can be restored to be normal as soon as possible, and adverse effects are reduced.
Example four
Fig. 4 is a schematic structural diagram of a container and a monitoring device for container application according to a fourth embodiment of the present invention. The container and the monitoring device applied to the container are configured on the monitoring equipment. As shown in fig. 4, a monitoring device 400 for a container and a container application according to an embodiment of the present invention includes: a first control module 410, a second control module 420, a third control module 430, and a processing module 440.
The first control module 410 is configured to control a first data collector to collect operation data of at least one application in a target container and a first identifier of the target container, where the first data collector is deployed in another container;
the second control module 420 is configured to control the second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin;
the third control module 430 is configured to control the second data collector to collect a second identifier of the target container according to the first identifier of the target container bin, and control the second data collector to obtain the operation data of the target container according to the second identifier of the target container;
the processing module 440 is configured to perform correlation processing on the target container and the running data of at least one application in the target container, and display a processing result.
As an optional implementation manner of the embodiment of the present invention, the monitoring apparatus 400 for a container and a container application further includes: a processing result storage module;
and the processing result storage module is used for storing the processing result.
As an optional implementation manner of the embodiment of the present invention, the monitoring apparatus 400 for a container and a container application further includes: the device comprises a first determining module and a deleting module;
the first determining module is used for determining whether the storage duration of the processing result reaches a preset retention period or not;
and the deleting module is used for deleting the processing result if the preset retention period is reached.
As an optional implementation manner of the embodiment of the present invention, the monitoring apparatus 400 for a container and a container application further includes: the device comprises a receiving module and an obtaining module;
the receiving module is used for receiving a target time period sent by a user;
the acquisition module is used for acquiring a target processing result according to the target time period;
correspondingly, the processing module 440 is specifically configured to: and displaying the target processing result.
As an optional implementation manner of the embodiment of the present invention, the monitoring apparatus 400 for a container and a container application further includes: a second determination module;
the second determining module is used for determining abnormal operation data exceeding a safety threshold in the processing result;
correspondingly, the processing module 440 is specifically configured to:
and marking and displaying the abnormal operation data.
As an optional implementation manner of the embodiment of the present invention, the displaying and identifying the abnormal operation data includes: highlighting, bolding and/or flashing the abnormal operation data.
As an optional implementation manner of the embodiment of the present invention, the operation data includes at least one of the following: memory utilization, disk utilization, network information, and CPU occupancy.
It should be noted that the foregoing explanation of the embodiment of the monitoring method applied to the container and the container is also applicable to the container and the monitoring device applied to the container of the embodiment, and the implementation principle thereof is similar, and is not repeated herein.
According to the technical scheme provided by the embodiment of the invention, the first data collector and the second data collector are combined, so that the advantages that the first data collector collects the operation data applied in the container and the second data collector collects the operation data of the container are fully utilized, the first data collector is prevented from being deployed in each container, and the resource occupation of the containers is reduced; after the operation data of the application in the container and the operation data of the container are collected, the operation data of the application and the operation data of the container are subjected to correlation processing, and a processing result is displayed. Therefore, the reliable monitoring of the container and the operation condition of the application in the container is realized on the basis of not occupying resources, and the monitoring accuracy and reliability of the container and the application in the container are improved.
EXAMPLE five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary electronic device 500 suitable for use in implementing embodiments of the present invention. The electronic device 500 shown in fig. 5 is only an example and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the electronic device 500 is embodied in the form of a general purpose computing device. The components of the electronic device 500 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 500 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 500 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 700 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The electronic device 500 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 500, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with the other modules of the electronic device 500 over the bus 18. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the container and the monitoring method for the container application provided by the embodiment of the present invention includes:
controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers;
controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin;
controlling the second data collector to collect a second identifier of a target container according to the first identifier of the target container bin, and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container;
and performing correlation processing on the target container and the running data of at least one application in the target container, and displaying a processing result.
It should be noted that the foregoing explanation of the embodiment of the monitoring method applied to the container and the container is also applicable to the electronic device of the embodiment, and the implementation principle thereof is similar and will not be described herein again.
According to the electronic device provided by the embodiment of the invention, the first data collector and the second data collector are combined, so that the advantages that the first data collector collects the operation data applied in the container and the second data collector collects the operation data of the container are fully utilized, the first data collector is prevented from being deployed in each container, and the resource occupation of the containers is reduced; after the operation data of the application in the container and the operation data of the container are collected, the operation data of the application and the operation data of the container are subjected to correlation processing, and a processing result is displayed. Therefore, the reliable monitoring of the container and the operation condition of the application in the container is realized on the basis of not occupying resources, and the monitoring accuracy and reliability of the container and the application in the container are improved.
EXAMPLE six
In order to achieve the above object, the present invention also provides a computer-readable storage medium.
The computer-readable storage medium provided by the embodiment of the present invention stores thereon a computer program, which when executed by a processor implements the container and the method for monitoring the container application according to the embodiment of the present invention, the method includes:
controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers;
controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin;
controlling the second data collector to collect a second identifier of a target container according to the first identifier of the target container bin, and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container;
and performing correlation processing on the target container and the running data of at least one application in the target container, and displaying a processing result.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A container and a monitoring method for container application are characterized in that the method is applied to monitoring equipment, and comprises the following steps:
controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, wherein the first data collector is deployed in other containers;
controlling a second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin;
controlling the second data collector to collect a second identifier of a target container according to the first identifier of the target container bin, and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container;
and performing correlation processing on the target container and the running data of at least one application in the target container, and displaying a processing result.
2. The method according to claim 1, wherein after performing the association processing on the target container and the running data of the at least one application in the target container, further comprising: and storing the processing result.
3. The method of claim 2, wherein after storing the processing result, further comprising:
determining whether the storage duration of the processing result reaches a preset retention period or not;
and if the preset retention period is reached, deleting the processing result.
4. The method of claim 2, wherein after storing the processing result, further comprising:
receiving a target time period sent by a user;
acquiring a target processing result according to the target time period;
correspondingly, the display processing result comprises: and displaying the target processing result.
5. The method of claim 1, wherein prior to displaying the processing results, further comprising:
determining abnormal operation data exceeding a safety threshold in a processing result;
correspondingly, the display processing result comprises:
and marking and displaying the abnormal operation data.
6. The method of claim 5, wherein the displaying the abnormal operation data comprises: highlighting, bolding and/or flashing the abnormal operation data.
7. The method of claim 1, wherein the operational data comprises at least one of: memory utilization, disk utilization, network information, and CPU occupancy.
8. A container and a monitoring device for use with the container, configured for use in a monitoring apparatus, comprising:
the system comprises a first control module, a second control module and a third control module, wherein the first control module is used for controlling a first data collector to collect running data of at least one application in a target container and a first identifier of the target container, and the first data collector is deployed in other containers;
the second control module is used for controlling the second data collector to collect the information of the target container bin according to the first identifier of the target container; the target bin information at least comprises: a first identification of the target container and a first identification of the target container bin;
the third control module is used for controlling the second data collector to collect a second identifier of the target container according to the first identifier of the target container bin and controlling the second data collector to obtain the operating data of the target container according to the second identifier of the target container;
and the processing module is used for performing correlation processing on the target container and the running data of at least one application in the target container and displaying a processing result.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of monitoring containers and container applications as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of monitoring a container and a container application according to any one of claims 1 to 7.
CN202010567164.8A 2020-06-19 2020-06-19 Container and monitoring method, device, equipment and medium for container application Active CN111737082B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010567164.8A CN111737082B (en) 2020-06-19 2020-06-19 Container and monitoring method, device, equipment and medium for container application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010567164.8A CN111737082B (en) 2020-06-19 2020-06-19 Container and monitoring method, device, equipment and medium for container application

Publications (2)

Publication Number Publication Date
CN111737082A true CN111737082A (en) 2020-10-02
CN111737082B CN111737082B (en) 2024-07-23

Family

ID=72651762

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010567164.8A Active CN111737082B (en) 2020-06-19 2020-06-19 Container and monitoring method, device, equipment and medium for container application

Country Status (1)

Country Link
CN (1) CN111737082B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835766A (en) * 2021-02-10 2021-05-25 杭州橙鹰数据技术有限公司 Application monitoring method and device
CN114936048A (en) * 2022-05-10 2022-08-23 北京达佳互联信息技术有限公司 Configuration management method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729219A (en) * 2017-11-17 2018-02-23 北京联想超融合科技有限公司 Resource monitoring method, device and terminal based on super fusion storage system
CN109522183A (en) * 2018-10-23 2019-03-26 东软集团股份有限公司 Instrument operating condition monitoring method and system, collector, server and storage medium
CN109542714A (en) * 2018-09-29 2019-03-29 中国平安人寿保险股份有限公司 Method for monitoring application program and device, computer installation and computer storage medium
US20190199601A1 (en) * 2017-12-26 2019-06-27 International Business Machines Corporation Data-centric predictive container migration based on cognitive modelling
CN110262944A (en) * 2019-06-21 2019-09-20 四川长虹电器股份有限公司 The method that a kind of pair of K8s cluster container resource is monitored and is alerted
CN110290189A (en) * 2019-06-17 2019-09-27 深圳前海微众银行股份有限公司 A kind of container cluster management method, apparatus and system
CN110569168A (en) * 2019-08-26 2019-12-13 腾讯科技(深圳)有限公司 data interaction method, related equipment and storage medium
CN111124673A (en) * 2019-12-11 2020-05-08 中盈优创资讯科技有限公司 Data acquisition system and method
CN111130925A (en) * 2019-11-29 2020-05-08 广州文远知行科技有限公司 Resource monitoring method and device, computer equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729219A (en) * 2017-11-17 2018-02-23 北京联想超融合科技有限公司 Resource monitoring method, device and terminal based on super fusion storage system
US20190199601A1 (en) * 2017-12-26 2019-06-27 International Business Machines Corporation Data-centric predictive container migration based on cognitive modelling
CN109542714A (en) * 2018-09-29 2019-03-29 中国平安人寿保险股份有限公司 Method for monitoring application program and device, computer installation and computer storage medium
CN109522183A (en) * 2018-10-23 2019-03-26 东软集团股份有限公司 Instrument operating condition monitoring method and system, collector, server and storage medium
CN110290189A (en) * 2019-06-17 2019-09-27 深圳前海微众银行股份有限公司 A kind of container cluster management method, apparatus and system
CN110262944A (en) * 2019-06-21 2019-09-20 四川长虹电器股份有限公司 The method that a kind of pair of K8s cluster container resource is monitored and is alerted
CN110569168A (en) * 2019-08-26 2019-12-13 腾讯科技(深圳)有限公司 data interaction method, related equipment and storage medium
CN111130925A (en) * 2019-11-29 2020-05-08 广州文远知行科技有限公司 Resource monitoring method and device, computer equipment and storage medium
CN111124673A (en) * 2019-12-11 2020-05-08 中盈优创资讯科技有限公司 Data acquisition system and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835766A (en) * 2021-02-10 2021-05-25 杭州橙鹰数据技术有限公司 Application monitoring method and device
CN114936048A (en) * 2022-05-10 2022-08-23 北京达佳互联信息技术有限公司 Configuration management method and device, electronic equipment and storage medium
CN114936048B (en) * 2022-05-10 2024-03-19 北京达佳互联信息技术有限公司 Configuration management method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN111737082B (en) 2024-07-23

Similar Documents

Publication Publication Date Title
CN111737082B (en) Container and monitoring method, device, equipment and medium for container application
CN110647318B (en) Method, device, equipment and medium for creating instance of stateful application
CN110635956A (en) Equipment management method, platform, system, equipment and storage medium
CN112223284A (en) Robot elevator taking fault processing method and device, electronic equipment and storage medium
CN111679911A (en) Management method, device, equipment and medium for GPU (graphics processing Unit) card in cloud environment
US10209905B2 (en) Reusing storage blocks of a file system
CN112306833A (en) Application program crash statistical method and device, computer equipment and storage medium
CN112907040B (en) Event processing method, device, equipment and storage medium
CN110033242B (en) Working time determining method, device, equipment and medium
US7680921B2 (en) Management system, management computer, managed computer, management method and program
CN116974934A (en) Memory leakage detection method, device, equipment and storage medium
CN111784176A (en) Data processing method, device, server and medium
CN112818204B (en) Service processing method, device, equipment and storage medium
US11977636B2 (en) Storage transaction log
CN111400282B (en) Data processing strategy adjustment method, device, equipment and storage medium
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN113094000A (en) Vehicle signal storage method and device, storage equipment and storage medium
CN110602162B (en) Terminal evidence obtaining method, device, equipment and storage medium
CN113624224A (en) Method, device, equipment and medium for verifying position validity
CN113806416A (en) Method and device for realizing real-time data service and electronic equipment
CN107872874B (en) Method for updating positioning data, server and computer readable medium
CN111159237A (en) System data distribution method and device, storage medium and electronic equipment
CN110928814A (en) Method and device for detecting transmission abnormality of serial hard disk and electronic equipment
CN117216011B (en) File transmission method and device and electronic equipment
CN112087474B (en) Cluster-based port information acquisition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220914

Address after: 25 Financial Street, Xicheng District, Beijing 100033

Applicant after: CHINA CONSTRUCTION BANK Corp.

Address before: 25 Financial Street, Xicheng District, Beijing 100033

Applicant before: CHINA CONSTRUCTION BANK Corp.

Applicant before: Jianxin Financial Science and Technology Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant