CN115794475A - Container abnormity detection method, device, equipment and storage medium - Google Patents

Container abnormity detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN115794475A
CN115794475A CN202211654678.2A CN202211654678A CN115794475A CN 115794475 A CN115794475 A CN 115794475A CN 202211654678 A CN202211654678 A CN 202211654678A CN 115794475 A CN115794475 A CN 115794475A
Authority
CN
China
Prior art keywords
target
container
migration
cluster
namespace
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211654678.2A
Other languages
Chinese (zh)
Inventor
叶斯伟
汪劲松
茅天倪
孙茜颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank 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 Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202211654678.2A priority Critical patent/CN115794475A/en
Publication of CN115794475A publication Critical patent/CN115794475A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a container abnormity detection method, a device, equipment and a storage medium. The method comprises the following steps: acquiring a target index corresponding to a target name space; if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace; and migrating the configuration file information of the resource object in the target name space to the disaster recovery cluster. By the technical scheme, the dependence on the alarm rule of the monitoring component can be released, the abnormal response time of the container can be shortened, and the migration error rate of the container is reduced.

Description

Container abnormity detection method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a container abnormity detection method, a device, equipment and a storage medium.
Background
At present, a common way to ensure that a container application is highly available is a multi-kubernets cluster deployment, and more in container exception detection, monitoring indexes of a cluster are set by relying on an alarm rule of a monitoring component (such as promemeus). If the cluster container is abnormal, the operation and maintenance personnel generally carry out manual handling to transfer the container to another cluster in an emergency, the process is tedious and time-consuming, the efficiency is low, and errors are easy to occur.
Disclosure of Invention
The embodiment of the invention provides a container abnormity detection method, a device, equipment and a storage medium, and solves the problems that the migration process is complicated and time-consuming, the efficiency is low and errors are easy to occur due to the fact that cluster container abnormity needs to be manually processed by operation and maintenance personnel.
According to an aspect of the present invention, there is provided a container abnormality detection method including:
acquiring a target index corresponding to a target name space;
if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace;
and migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster.
Further, the target index corresponding to the target namespace includes: state information of a container in the target namespace and/or state information of a host in the cluster;
correspondingly, if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace, including:
and if the state information of the container in the target namespace and/or the state information of the host in the cluster meet preset conditions, acquiring the configuration file information of the resource object in the target namespace.
Further, the preset condition includes at least one of the following:
the state information of at least one container in the target name space is an abnormal state;
the proportion of the containers with abnormal state information in the target namespace is greater than a first proportion threshold value;
the abnormal state duration of the container with the abnormal state information in the target namespace is greater than a time threshold;
the state information of the host machine to which at least one container in the target name space belongs is an abnormal state;
and the proportion of the hosts with abnormal state information in the cluster is greater than a second proportion threshold value.
Further, migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster, including:
acquiring a migration strategy;
and migrating the configuration file information of the resource objects in the target name space to the disaster recovery cluster based on the migration strategy.
Further, the migration policy includes: the proportion of vessels per migration and the time interval between each migration.
Further, the migration policy further includes: migration timeout time and/or destination cluster identification.
Further, migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster based on the migration policy, including:
and migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster corresponding to the target cluster identification according to the container proportion of each migration and the time interval between each migration.
According to another aspect of the present invention, there is provided a container abnormality detection apparatus including:
the first acquisition module is used for acquiring a target index corresponding to a target name space;
the second obtaining module is used for obtaining the configuration file information of the resource object in the target namespace if the target index corresponding to the target namespace meets the preset condition;
and the first migration module is used for migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the container anomaly detection method according to any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the container anomaly detection method according to any one of the embodiments of the present invention when executed.
The embodiment of the invention obtains the target index corresponding to the target name space; if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace; the configuration file information of the resource objects in the target namespace is transferred to the disaster recovery cluster, so that the problems of complexity, time consumption, low efficiency and easiness in fault occurrence in the transfer process due to the fact that the cluster container abnormity needs to be manually processed by operation and maintenance personnel are solved, dependence on the alarm rule of the monitoring assembly can be eliminated, the abnormal response time of the container can be shortened, and the migration fault rate of the container is reduced.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of a container anomaly detection method according to a first embodiment of the present invention;
fig. 2 is a schematic structural view of a container abnormality detection apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device in a third embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It is understood that before the technical solutions disclosed in the embodiments of the present disclosure are used, the type, the use range, the use scene, etc. of the personal information related to the present disclosure should be informed to the user and obtain the authorization of the user through a proper manner according to the relevant laws and regulations.
Example one
Fig. 1 is a flowchart of a container anomaly detection method in a first embodiment of the present invention, where this embodiment is applicable to cluster container anomaly detection and migration, and the method may be executed by a container anomaly detection apparatus in an embodiment of the present invention, where the apparatus may be implemented in a software and/or hardware manner, as shown in fig. 1, where the method specifically includes the following steps:
and S110, acquiring a target index corresponding to the target name space.
The target namespace can define a namespace for the user, and the namespace can be determined by the namespace identifier.
The target index may be state information of the container, or may be state information of a host to which the container belongs, or may be state information of the container and state information of the host to which the container belongs.
Specifically, the manner of obtaining the target index corresponding to the target namespace may be as follows: the user can limit the target name space and set the target index corresponding to the target name space in advance.
The abnormal condition of the cluster container is detected through the user-defined target index, so that the expansion can be facilitated, and the alarm rule setting of a monitoring platform is not required.
And S120, if the target index corresponding to the target name space meets the preset condition, acquiring the configuration file information of the resource object in the target name space.
The preset condition may be a condition set for the target index that can detect abnormality of the container. And calculating a target index in the timing task, if the target index meets a preset condition, detecting that the container is in an abnormal state, and migrating the configuration file information corresponding to the resource in the target namespace.
The resource object is a kubernets resource object and comprises a container, a configuration file and a storage object corresponding to a target namespace, wherein configuration file information can be configuration file information, the format of the configuration file information can be yaml, and it needs to be stated that the configuration file information can also be in other formats.
Specifically, if the target index corresponding to the target namespace meets the preset condition, the manner of obtaining the configuration file information of the resource object in the target namespace may be as follows: each target index can be calculated through a timing task, and if the calculated target index meets a preset condition, configuration file information of a resource object corresponding to a target namespace is obtained.
Optionally, the target indexes corresponding to the target namespace include: state information of a container in the target namespace and/or state information of a host in the cluster;
correspondingly, if the target index corresponding to the target namespace meets a preset condition, obtaining the configuration file information of the resource object in the target namespace includes:
and if the state information of the container in the target namespace and/or the state information of the host in the cluster meet preset conditions, acquiring the configuration file information of the resource object in the target namespace.
The state information of the container can comprise an abnormal state of the container, an abnormal state container proportion and an abnormal state duration; the state information of the hosts in the cluster may include the abnormal state of the host to which the container belongs and the proportion of hosts in the abnormal state.
Specifically, if the state information of the container in the target namespace and/or the state information of the host in the cluster meet a preset condition, the manner of obtaining the configuration file information of the resource object in the target namespace may be: if the container in the target namespace is in an abnormal state and/or the proportion of the containers in the abnormal state meets the preset condition and/or the duration time of the abnormal state meets the preset condition and/or the proportion of the hosts of which the hosts belong to the container are in the abnormal state and/or the abnormal state meets the preset condition, acquiring the configuration file information of the resource object in the target namespace.
Optionally, the preset condition includes at least one of the following conditions:
the state information of at least one container in the target name space is an abnormal state;
the proportion of the containers with abnormal state information in the target namespace is greater than a first proportion threshold value;
the abnormal state duration of the container with the abnormal state information in the target namespace is greater than a time threshold;
the state information of a host machine to which at least one container in the target name space belongs is an abnormal state;
and the proportion of the hosts with abnormal state information in the cluster is greater than a second proportion threshold value.
The abnormal state is a state information of at least one container being in a non-ready state, or a state information of a host to which at least one container belongs being in a non-ready state. The container proportion of the abnormal state is the proportion of the container of the abnormal state to all containers in the target namespace, and the proportion of the host of the abnormal state is the proportion of the host of the abnormal state to all hosts in the target namespace. The abnormal state duration is a duration when the container is in the abnormal state.
The first proportional threshold, the time threshold and the second proportional threshold can be set according to the requirements of the user.
The determination method of the container proportion with the state information in the target namespace being in the abnormal state may be as follows: acquiring the total number of containers in a target name space; acquiring a first number of containers in an abnormal state in a target namespace; and determining the ratio of the first number to the total number of the containers as the proportion of the containers with abnormal state in the state information in the target namespace.
The determining mode of the proportion of hosts with abnormal state information in the cluster may be as follows: acquiring the total number of host machines in the cluster; acquiring a second number of hosts in abnormal state in the cluster; and determining the ratio of the first quantity to the total number of the host machines as the proportion of the host machines with abnormal state information in the cluster.
S130, migrating the configuration file information of the resource object in the target name space to the disaster recovery cluster.
The disaster recovery cluster is a cluster which replaces the host cluster to continue working when the host cluster can not work normally. It should be noted that, when selecting a disaster recovery cluster, a destination cluster identifier may be set, and a corresponding disaster recovery cluster is determined according to the destination cluster identifier, or an idle disaster recovery cluster may be directly selected to perform migration of configuration file information of a resource object in a target namespace.
Specifically, the manner of migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster may be as follows: and when the target index meets a preset condition, acquiring configuration file information and a migration strategy of the resource object in the target namespace, determining the disaster recovery cluster, and migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster based on the migration strategy.
Optionally, migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster, including:
acquiring a migration strategy;
and migrating the configuration file information of the resource objects in the target name space to the disaster recovery cluster based on the migration strategy.
Optionally, the migration policy includes: the proportion of vessels per migration and the time interval between each migration. The proportion of the containers transferred each time and the time interval between transfers each time are preset values and are set according to the requirements of users.
Optionally, the migration policy further includes: migration timeout time and/or destination cluster identification. The migration timeout time is the time when the total migration time obtained after the completion of the migration exceeds the preset time. The destination cluster identifier is an identifier of a disaster recovery cluster to which the configuration file information of the resource object in the target namespace is migrated.
Optionally, migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster based on the migration policy includes:
and migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster corresponding to the target cluster identification according to the container proportion of each migration and the time interval between each migration.
Specifically, the manner of migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster corresponding to the destination cluster identifier according to the container proportion of each migration and the time interval between each migration may be as follows: presetting the container proportion of each migration and the time interval between each migration, determining the disaster recovery cluster corresponding to the target cluster identifier, and migrating the configuration file information of the resource objects in the target namespace to the disaster recovery cluster corresponding to the target cluster identifier in batches according to the preset container proportion of each migration and the time interval between each migration.
Optionally, migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster based on the migration policy includes:
and migrating the configuration file information of the resource objects in the target namespace to the disaster recovery cluster corresponding to the target cluster identification according to the container proportion of each migration, the time interval between each migration and the migration overtime.
Specifically, the manner of migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster corresponding to the destination cluster identifier according to the container proportion of each migration, the time interval between each migration, and the migration timeout time may be: presetting the container proportion of each migration, the time interval between each migration and the migration overtime time, determining the disaster recovery cluster corresponding to the target cluster identifier, and migrating the configuration file information of the resource objects in the target namespace to the disaster recovery cluster corresponding to the target cluster identifier in batches according to the preset container proportion of each migration, the time interval between each migration and the migration overtime time.
It should be noted that, each migration process is executed by one thread in the thread pool, the kubernets client API is called to send the configuration file information of the resource object in the target namespace to the disaster recovery cluster corresponding to the destination cluster identifier according to the container proportion of each migration and the time interval between each migration, and if the migration process is abnormal or all migrations are completed or the preset timeout time is reached, the task is stopped; an optional mid-stream manual trigger cancellation task may also terminate the migration.
According to the technical scheme of the embodiment, the target indexes corresponding to the target name space are obtained; if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace; the configuration file information of the resource objects in the target namespace is transferred to the disaster recovery cluster, so that the problems of complexity, time consumption, low efficiency and easiness in fault occurrence in the transfer process due to the fact that the cluster container abnormity needs to be manually processed by operation and maintenance personnel are solved, dependence on the alarm rule of the monitoring assembly can be eliminated, the abnormal response time of the container can be shortened, and the migration fault rate of the container is reduced.
Example two
Fig. 2 is a schematic structural diagram of a container abnormality detection apparatus according to a second embodiment of the present invention. The present embodiment is applicable to the case of cluster container anomaly detection and migration, the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in any device that provides a container anomaly detection function, as shown in fig. 2, where the container anomaly detection apparatus specifically includes: a first acquisition module 210, a second acquisition module 220, and a first migration module 230.
The first obtaining module 210 is configured to obtain a target index corresponding to a target namespace;
a second obtaining module 220, configured to obtain configuration file information of the resource object in the target namespace if the target index corresponding to the target namespace meets a preset condition;
the first migration module 230 is configured to migrate the configuration file information of the resource object in the target namespace to the disaster recovery cluster.
Optionally, the target indexes corresponding to the target namespace include: state information of a container in the target namespace and/or state information of a host in the cluster;
correspondingly, the second obtaining module is specifically configured to:
and if the state information of the container in the target namespace and/or the state information of the host in the cluster meet preset conditions, acquiring the configuration file information of the resource object in the target namespace.
Optionally, the preset condition includes at least one of the following conditions:
the state information of at least one container in the target namespace is an abnormal state;
the proportion of the containers with abnormal state information in the target namespace is greater than a first proportion threshold value;
the abnormal state duration of the container with the abnormal state information in the target namespace is greater than a time threshold;
the state information of a host machine to which at least one container in the target name space belongs is an abnormal state;
and the proportion of the hosts with abnormal state information in the cluster is greater than a second proportion threshold value.
Optionally, the first migration module is specifically configured to:
acquiring a migration strategy;
and migrating the configuration file information of the resource objects in the target name space to the disaster recovery cluster based on the migration strategy.
Optionally, the migration policy includes: the proportion of vessels per migration and the time interval between each migration.
Optionally, the migration policy further includes: migration timeout time and/or destination cluster identification.
Optionally, the first migration module is specifically configured to:
and migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster corresponding to the target cluster identification according to the container proportion of each migration and the time interval between each migration.
The product can execute the method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
According to the technical scheme of the embodiment, the target indexes corresponding to the target name space are obtained; if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace; the configuration file information of the resource object in the target naming space is transferred to the disaster recovery cluster, so that the problems that due to the fact that cluster container abnormity needs to be manually processed by operation and maintenance personnel, the transfer process is complicated and time-consuming, low in efficiency and prone to faults are solved, dependence on alarm rules of the monitoring assembly can be eliminated, container abnormity response time can be shortened, and container transfer fault rate is reduced.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an electronic device in a third embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM12, and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The processor 11 performs the various methods and processes described above, such as the container anomaly detection method.
In some embodiments, the container anomaly detection method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into RAM13 and executed by processor 11, one or more steps of the container anomaly detection method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the container anomaly detection method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on 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 compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for detecting an abnormality in a container, comprising:
acquiring a target index corresponding to a target name space;
if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace;
and migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster.
2. The method of claim 1, wherein the target metrics corresponding to the target namespace comprise: state information of a container in the target namespace and/or state information of hosts in the cluster;
correspondingly, if the target index corresponding to the target namespace meets a preset condition, acquiring configuration file information of the resource object in the target namespace, including:
and if the state information of the container in the target namespace and/or the state information of the host in the cluster meet preset conditions, acquiring the configuration file information of the resource object in the target namespace.
3. The method of claim 1, wherein the preset condition comprises at least one of:
the state information of at least one container in the target name space is an abnormal state;
the proportion of the containers with abnormal state information in the target namespace is greater than a first proportion threshold value;
the abnormal state duration of the container with the abnormal state information in the target namespace is greater than a time threshold;
the state information of a host machine to which at least one container in the target name space belongs is an abnormal state;
and the proportion of the hosts with abnormal state information in the cluster is greater than a second proportion threshold value.
4. The method of claim 1, wherein migrating profile information for resource objects in the target namespace to a disaster recovery cluster comprises:
acquiring a migration strategy;
and migrating the configuration file information of the resource objects in the target name space to the disaster recovery cluster based on the migration strategy.
5. The method of claim 4, wherein the migration policy comprises: the proportion of vessels per migration and the time interval between each migration.
6. The method of claim 5, wherein the migration policy further comprises: migration timeout time and/or destination cluster identification.
7. The method of claim 6, wherein migrating the profile information for the resource object in the target namespace to a disaster recovery cluster based on the migration policy comprises:
and migrating the configuration file information of the resource object in the target namespace to the disaster recovery cluster corresponding to the target cluster identification according to the container proportion of each migration and the time interval between each migration.
8. A container abnormality detection device characterized by comprising:
the first acquisition module is used for acquiring a target index corresponding to a target name space;
the second obtaining module is used for obtaining the configuration file information of the resource object in the target namespace if the target index corresponding to the target namespace meets the preset condition;
and the first migration module is used for migrating the configuration file information of the resource object in the target name space to the disaster recovery cluster.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the container anomaly detection method of any one of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a processor to perform the container anomaly detection method of any one of claims 1-7 when executed.
CN202211654678.2A 2022-12-20 2022-12-20 Container abnormity detection method, device, equipment and storage medium Pending CN115794475A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211654678.2A CN115794475A (en) 2022-12-20 2022-12-20 Container abnormity detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211654678.2A CN115794475A (en) 2022-12-20 2022-12-20 Container abnormity detection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115794475A true CN115794475A (en) 2023-03-14

Family

ID=85427695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211654678.2A Pending CN115794475A (en) 2022-12-20 2022-12-20 Container abnormity detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115794475A (en)

Similar Documents

Publication Publication Date Title
CN114662953A (en) Internet of things equipment operation and maintenance method, device, equipment and medium
CN115242731A (en) Message processing method, device, equipment and storage medium
CN115794475A (en) Container abnormity detection method, device, equipment and storage medium
CN115687406A (en) Sampling method, device and equipment of call chain data and storage medium
CN113590287B (en) Task processing method, device, equipment, storage medium and scheduling system
CN115890684A (en) Robot scheduling method, device, equipment and medium
CN115617800A (en) Data reading method and device, electronic equipment and storage medium
CN115392383A (en) Early warning method and device for electricity utilization abnormity, electronic equipment and storage medium
CN115495151A (en) Rule engine migration method, device, equipment, storage medium and program product
CN114186738A (en) Fault early warning method and device, electronic equipment and storage medium
CN114938521A (en) Network state detection method and device, electronic equipment and storage medium
CN117290179A (en) Method, device, equipment and storage medium for determining event timeout state
CN116302370A (en) Method, device, equipment and medium for generating return code abnormality alarm
CN113656231A (en) Processing method, device, equipment and storage medium for disk failure
CN117471238A (en) Method and device for determining stability of power grid system and electronic equipment
CN114844920A (en) Internet of things equipment checking method and device, electronic equipment and storage medium
CN118132533A (en) Data processing method, device, equipment and storage medium
CN116860459A (en) Method, device, equipment and medium for monitoring resource pool in cloud platform
CN117331737A (en) Fault processing method and device, electronic equipment and storage medium
CN116028228A (en) Bitmap memory occupation detection method, device, equipment and storage medium
CN115454973A (en) Data migration method, device, equipment and storage medium
CN118152096A (en) Task allocation method, device, equipment and storage medium
CN117608904A (en) Fault positioning method and device, electronic equipment and storage medium
CN115509880A (en) Service system safety condition prediction method, device, equipment and medium
CN116340303A (en) Building internet of things data processing method and device, electronic equipment and medium

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