Cloud host management method and device, computer equipment and storage medium

文档序号:7405 发布日期:2021-09-17 浏览:62次 中文

1. A cloud host management method is characterized by comprising the following steps:

when a cloud host channel management instruction is received, acquiring identification information of a cloud host to be managed according to the channel management instruction;

detecting whether the cloud host identification information exists in a database;

if the connection channel exists, the connection channel of the cloud host corresponding to the cloud host identification information is managed according to the channel management instruction;

detecting the connection channel state of the cloud host;

and updating the connection channel state of the cloud host in the database according to the connection channel state.

2. The cloud host management method according to claim 1, wherein the connection channels of the cloud host include a first connection channel and a second connection channel, and the managing the connection channels of the cloud host corresponding to the cloud host identification information according to the channel management instruction includes:

if the channel management instruction is a channel management instruction of a first connection channel, connecting the cloud host through the second connection channel;

managing the first connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction;

if the channel management instruction is a channel management instruction of a second connection channel, connecting the cloud host through the first connection channel;

and managing the second connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction.

3. The cloud host management method of claim 1, wherein said channel management instruction comprises a connection channel repair instruction;

when a cloud host channel management instruction is received, acquiring identification information of a cloud host to be managed according to the channel management instruction, wherein the method comprises the following steps: when a connection channel repairing instruction is received, acquiring the cloud host identification information of which the connection channel state is an inactive state according to the connection channel repairing instruction;

the managing the channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction includes: and repairing the connection channel of the cloud host corresponding to the cloud host identification information according to the connection channel repairing instruction.

4. The cloud host management method of claim 1, further comprising:

when a cloud host information management instruction is received, acquiring cloud host information to be managed according to the information management instruction;

detecting whether a record corresponding to the cloud host information to be managed exists in a database;

if so, comparing the cloud host information to be managed with the cloud host information stored in the database to determine whether data abnormality exists and obtain an abnormal result;

and updating the database according to the abnormal result and the information of the cloud host to be managed.

5. The cloud host management method of claim 4, wherein the information management instruction comprises a cloud host information deletion instruction; the connection channel corresponding to the cloud host comprises a first connection channel and a second connection channel;

if a record corresponding to the cloud host information to be managed exists in the database, the cloud host management method further includes:

and deleting the client corresponding to the first connection channel on the cloud host through the second connection channel.

6. The cloud host management method of claim 4, wherein the information management instruction comprises a cloud host information addition instruction; the cloud host management method further comprises the following steps:

if the record corresponding to the cloud host information to be managed does not exist in the database, inquiring whether the record of inputting the IP or registering the IP equal to the IP in the cloud host information to be managed exists in the database;

if so, acquiring the record quantity of the records, and determining whether data exception exists according to the record quantity to obtain an exception result;

and updating the database according to the abnormal result and the information of the cloud host to be managed.

7. The cloud host management method according to claim 4, wherein the comparing the information of the cloud host to be managed with the information of the cloud host stored in the database to determine whether there is a data abnormality and obtain an abnormality result includes:

acquiring the IP of the cloud host in the cloud host information to be managed, and matching the IP of the cloud host with the IP of the corresponding cloud host in the database;

if the matching is successful, acquiring the operating system type of the cloud host in the cloud host information to be managed, and comparing the operating system type of the cloud host with the operating system type of the corresponding cloud host in the database to obtain a comparison result;

determining an abnormal result of data abnormality according to the comparison result;

if the matching is not successful, acquiring the input IP and the registered IP of the corresponding cloud host in the database, and judging whether the input IP and the registered IP are equal to obtain a judgment result;

and determining an abnormal result of data abnormality according to the judgment result.

8. A cloud host management apparatus, comprising:

the cloud host management system comprises a first acquisition unit, a second acquisition unit and a management unit, wherein the first acquisition unit is used for acquiring identification information of a cloud host to be managed according to a channel management instruction when the channel management instruction of the cloud host is received;

the first detection unit is used for detecting whether the cloud host identification information exists in a database;

the first management unit is used for managing a connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction if the cloud host identification information exists;

the state detection unit is used for detecting the channel state of the cloud host;

and the first updating unit is used for updating the connection channel state of the cloud host in the database according to the connection channel state.

9. A computer device, characterized in that the computer device comprises:

one or more processors; a memory; and one or more applications, wherein the processor is coupled to the memory, the one or more applications being stored in the memory and configured to be executed by the processor to implement the cloud host management method of any of claims 1 to 7.

10. A computer storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps in the cloud host management method of any of claims 1 to 7.

Background

With the increase of the operation scale of the cloud host, managing operation and maintenance of a large number of cloud hosts has become a relatively troublesome problem for current cloud service providers, and although some cloud host management operation and maintenance tools in the prior art can realize some basic operation and maintenance functions of the cloud host, the operation and maintenance functions are not perfect, and meanwhile, the degree of freedom of the operation and maintenance management is not high and the efficiency is low. For example, when the cloud host communicates with the server, the cloud host communicates through the connection channel, and once the connection channel is abnormal, the cloud host cannot communicate with the server, so that the difficulty of managing operation and maintenance of the cloud host is improved.

Disclosure of Invention

The embodiment of the invention provides a cloud host management method and device, computer equipment and a storage medium, which can realize management operation and maintenance of a cloud host connection channel and improve the efficiency of the management operation and maintenance of the cloud host.

The embodiment of the invention provides a cloud host management method, which comprises the following steps:

when a cloud host channel management instruction is received, acquiring identification information of a cloud host to be managed according to the channel management instruction;

detecting whether the cloud host identification information exists in a database;

if the connection channel exists, the connection channel of the cloud host corresponding to the cloud host identification information is managed according to the channel management instruction;

detecting the connection channel state of the cloud host;

and updating the connection channel state of the cloud host in the database according to the connection channel state.

An embodiment of the present invention further provides a cloud host management apparatus, including:

the cloud host management system comprises a first acquisition unit, a second acquisition unit and a management unit, wherein the first acquisition unit is used for acquiring identification information of a cloud host to be managed according to a channel management instruction when the channel management instruction of the cloud host is received;

the first detection unit is used for detecting whether the cloud host identification information exists in a database;

the first management unit is used for managing a connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction if the cloud host identification information exists;

the state detection unit is used for detecting the channel state of the cloud host;

and the first updating unit is used for updating the connection channel state of the cloud host in the database according to the connection channel state.

An embodiment of the present invention further provides a computer device, where the computer device includes: one or more processors; a memory; and one or more applications, wherein the processor is coupled to the memory, and the one or more applications are stored in the memory and configured to be executed by the processor in the cloud host management method.

The embodiment of the invention also provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program is loaded by a processor to execute the cloud host management method.

When a cloud host channel management instruction is received, acquiring identification information of a cloud host to be managed according to the channel management instruction; if the cloud host identification information to be managed exists in the database; managing a connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction; detecting the connection channel state of the cloud host; and updating the connection channel state of the cloud host in the database according to the connection channel state. According to the embodiment of the invention, the management of the connection channel of the cloud host is realized, the state of the connection channel of the cloud host is updated, the problem that the cloud host cannot work due to the abnormity of the connection channel is avoided, and the management, operation and maintenance efficiency of the cloud host is improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a schematic diagram of a cloud host management system provided by an embodiment of the present invention;

fig. 2 is a schematic flowchart of a cloud host management method according to an embodiment of the present invention;

fig. 2a is a schematic flowchart of channel management of a cloud host management method according to an embodiment of the present invention;

fig. 2b is a schematic flowchart of channel management of a cloud host management method according to an embodiment of the present invention;

fig. 2c is a schematic flowchart of channel management of the cloud host management method according to the embodiment of the present invention;

fig. 2d is a schematic flowchart of channel management of the cloud host management method according to the embodiment of the present invention;

FIG. 3 is a schematic diagram of a graphical user interface provided by an embodiment of the present invention;

fig. 4 is a flowchart illustrating a cloud host management method according to an embodiment of the present invention;

fig. 5 is a schematic block diagram of a cloud host management apparatus according to an embodiment of the present invention;

fig. 6 is another schematic block diagram of a cloud host management apparatus according to an embodiment of the present invention;

FIG. 7 is a schematic block diagram of a computer device provided by an embodiment of the present invention.

Detailed Description

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.

In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise. In addition, the terms "first" and "second" are used to distinguish a plurality of elements from each other. For example, a first constraint may be referred to as a second constraint, and similarly, a second constraint may be referred to as a first constraint, without departing from the scope of the invention. The first constraint and the second constraint are both constraints, but they are not the same constraint.

In the present disclosure, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the invention. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present invention may be practiced without these specific details. In other instances, well-known structures and processes are not shown in detail to avoid obscuring the description of the invention with unnecessary detail. Thus, the present invention is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.

The embodiment of the invention provides a cloud host management method and device, computer equipment and a storage medium. The cloud host management method runs in computer equipment, the computer equipment is a server, and the computer equipment can be desktop computers, notebook computers and other equipment. The server may be a single server or a server cluster composed of a plurality of servers.

In order to better understand the embodiment of the present invention, the embodiment of the present invention provides a schematic structural diagram of a cloud host management system. As shown in fig. 1, the cloud host management system includes a management monitoring platform, a cloud host platform, a controller cluster, and the like.

The management monitoring platform is used for managing the cloud hosts, and includes information management of the cloud hosts, connection channel management of the cloud hosts, and the like, which will be described in detail below. The management monitoring platform comprises a server, and the cloud host management method provided by the embodiment of the invention operates in the server; the cloud host management device provided by the embodiment of the invention is integrated in the server. The management monitoring platform further comprises a database, and the database stores the cloud host information reported by the cloud host platform and the cloud host information reported by the controller cluster. The management monitoring platform further comprises a total Redis, wherein the total Redis is used for storing the cloud host information required by executing the job, and the cloud host information required by executing the job is used as the target cloud host information. Here, redis (remote Dictionary server) indicates a remote Dictionary service, and is a storage system. In an embodiment of the present invention, total Redis is used to cache cloud host information needed to execute a job. After target cloud host information required by executing the job is acquired from the total Redis, the information is provided to a job (task) inlet for use in executing the corresponding job (task). The operation comprises all operations on the cloud host, including starting the cloud host, restarting the cloud host, expanding the volume of the cloud host, reducing the volume of the cloud host, modifying the password of the cloud host, backing up the cloud host, unlocking the cloud host, detecting the connection state with the cloud host and the like. In the management monitoring platform, a corresponding Graphical User Interface (GUI) is also provided. And sending some cloud host management instructions, such as a channel management instruction, a cloud host information management instruction and the like, to the server through the graphical user interface.

The cloud host platform comprises a plurality of pieces of cloud host information, wherein the cloud hosts comprise bare hosts and non-bare host information. Wherein a bare host refers to a machine that has not yet created any virtual machine, and a non-bare host refers to a machine that has already created a virtual machine. When a virtual machine needs to be created, such as creating a virtual machine on a bare host, a unique identifier of one machine and an IP are allocated to the created virtual machine (cloud host), and the allocated IP is used as a logging IP. It should be noted that in the embodiment of the present application, one virtual machine is regarded as a cloud host, and information of the cloud host refers to information of the virtual machine. Meanwhile, the cloud host platform reports the relevant information of the cloud host to the management monitoring platform. Wherein, the relevant information of the cloud host comprises: the method comprises the following steps of determining the available area, namely the area id (az _ id) of the available area, the unique identifier (ins _ id) of a machine, the entry ip (ip _ address), the tag (non-bare host cvm, bare host bms), the type (type, comprising a ctrl node management side and a tenant side), the operating system type (os _ type) (only two types (linux, windows) and the like are used at present.

The controller cluster comprises a plurality of controllers, the controllers are computer equipment provided with agent server software, and the controllers provide gateway service for cloud hosts provided with agent client software. It is understood that the controller is a controller Server, corresponding to the registration Server in fig. 3. When the cloud host provided with agent client software needs to communicate with the controller, the cloud host needs to report information of the cloud host to the controller cluster, and if the information of the cloud host is reported, the IP of the cloud host is used as a registration IP. After the cloud host reports the information of the cloud host, the controller cluster is connected with the cloud host through a connection channel (agent channel) provided by the gateway service, so that the controller cluster is communicated with the cloud host. This connection channel, called the first connection channel or agent channel or anyx channel, communicates by maintaining a long connection. It should be noted that, in the embodiment of the present invention, the first connection channel may include, in addition to the agent channel, other connection channels that need to be connected by installing software (e.g., client software) similar to the agent channel. After the controller cluster is connected with the cloud host, the information of the cloud host is reported to the management monitoring platform. The information of the cloud host reported by the controller cluster to the management monitoring platform includes: unique identification of the machine (ins _ id), register _ ip, update time (update), first connection channel state (anyx _ state), second connection channel state (anyw _ state), agent client version (version), etc. The agent client version refers to an agent client version installed on the cloud host. The update time refers to the update time of the information of the cloud host itself. And the information of the cloud host reported by the controller to the management monitoring platform is stored in an area Redis database.

It should be noted that, in addition to the communication between the controller cluster and the cloud host using the first connection channel, the communication between the controller cluster and the cloud host also establishes a connection through the second connection channel to perform communication in the embodiment of the present invention. The second connection channel includes a channel for establishing connection in a Secure Shell (SSH) manner, that is, a connection channel for establishing connection with the cloud host through the IP of the cloud host or information such as the IP of the cloud host and a connection password. It should be noted that the second connection channel may also comprise other connection channels similar to SSH connections, i.e. accessible connection channels that do not require software to be installed. The second connecting channel may also be referred to as an anyw channel. It can be understood that the connection channel for connecting the cloud host provided in the embodiment of the present invention includes two types: a first ligation channel (agent channel or anyx channel) and a second ligation channel (anyw channel). If the cloud host is connected through the first connection channel, the agent client needs to be installed on the cloud host.

The controller cluster is also used to receive jobs (tasks) and execute the jobs. For example, the cloud host in the job is connected through the first connection channel of the controller cluster, and the corresponding job instruction is issued to the cloud host, so that the cloud host executes the job.

Hereinafter, a cloud host management method, an apparatus, a computer device, and a storage medium according to embodiments of the present invention will be described in detail, where the cloud host management method is executed in a server of a management monitoring platform.

Fig. 2 is a schematic flowchart of a cloud host management method according to an embodiment of the present invention. As shown in the figure, the method comprises the following specific processes:

101, when a cloud host channel management instruction is received, acquiring identification information of a cloud host to be managed according to the channel management instruction.

The cloud host channel management instruction can be triggered by executing corresponding operation on a graphical user interface provided by the management monitoring platform, for example, triggering a control corresponding to cloud host channel management, for example, clicking a button corresponding to cloud host channel management on the graphical user interface to trigger the cloud host channel management instruction; or triggering through a voice mode, for example, triggering a cloud host channel management instruction when detecting that a user sends corresponding voice for cloud host channel management; or may directly execute a corresponding command to trigger, etc. The method comprises the steps that a user triggers a cloud host channel management instruction on an image user interface, the channel management instruction is sent to a server of a management monitoring platform, and when the server receives the cloud host channel management instruction, cloud host identification information to be managed is obtained according to the channel management instruction. The cloud host identification information is a unique identification (ins _ id) of the machine.

The cloud host channel management instruction comprises a connection channel state checking instruction, a connection channel updating instruction, a connection channel starting instruction, a connection channel stopping instruction, a connection channel repairing instruction and the like. According to the above, if the cloud host needs to be connected through the first connection channel, agent client software needs to be installed on the cloud host, and therefore updating, starting and stopping of the agent client software can be involved.

And 102, detecting whether cloud host identification information exists in the database.

After the cloud host identification information is obtained, the cloud host identification information is inquired in the database, and whether the cloud host identification information exists in the database or not is determined.

If the cloud host identification information does not exist in the database, executing step 103; if the cloud host identification information exists in the database, step 104 is executed.

And 103, presenting. If the data which does not have the corresponding cloud host identification information in the database can be written into the list, or written into an operation log, or prompted in a dialog box manner and the like; or in various combinations with each other.

And 104, managing the connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction.

If the channel management instruction is a connection channel state check instruction, managing the connection channel of the cloud host, namely checking the connection channel state of the connection channel; if the channel management instruction is a connection channel updating instruction, managing the connection channel of the cloud host is to update the first connection channel; if the channel management instruction is a connection channel starting instruction, managing the connection channel of the cloud host is to realize starting of the first connection channel; if the channel management instruction is a connection channel stop instruction, managing the connection channel of the cloud host is to stop the first connection channel; and if the channel management instruction is a connection channel repairing instruction, managing the connection channel of the cloud host, namely repairing the connection channel with the connection channel state being an inactive state.

The connection channel of the cloud host comprises a first connection channel and a second connection channel. Except that the channel management command is a connection channel state checking command, namely if the cloud host channel management command is a connection channel updating command, a connection channel starting command, a connection channel stopping command, a connection channel repairing command and the like, the connection channel of the cloud host is managed according to the channel management command, and the method comprises the following steps: if the management instruction is a channel management instruction of the first connection channel, connecting the cloud host through a second connection channel; managing a first connection channel of the cloud host according to the channel management instruction; if the channel management instruction is the channel management instruction of the second connection channel, connecting the cloud host through the first connection channel; and managing a second connection channel of the cloud host according to the channel management instruction.

For example, when the first connection channel needs to be updated, the cloud host is connected through the second connection channel, so that the first connection channel is updated on the cloud host; when the second connection channel needs to be repaired, the cloud host is connected through the first connection channel so as to repair the second connection channel of the cloud host.

The corresponding cloud host channel management instruction can be triggered according to a preset time interval, and the connection channel of the cloud host is managed according to the channel management instruction. It is to be appreciated that the timing implementation manages the connection channels of the cloud hosts.

105, detecting the connection channel state of the cloud host.

If the management of the first connection channel is realized, detecting the connection channel state of the first connection channel of the cloud host; and if the management of the second connection channel is realized, detecting the connection channel state of the second connection channel of the cloud host. Specifically, information of the cloud host is transmitted to a job entry, the information is sent to the controller cluster through the job entry, and the controller cluster selects a corresponding channel to detect a corresponding connection channel state. For example, if the first connection channel state of the cloud host is detected, the controller cluster selects the first connection channel to detect the connection channel state of the first connection channel; and if the state of the second connection channel of the cloud host is detected, the controller cluster selects the second connection channel to detect the state of the connection channel of the second connection channel.

It can be understood that if the channel management instruction is a connection channel update instruction, managing the connection channel of the cloud host is to update the first connection channel, and after the update is performed, detecting the state of the first connection channel of the cloud host; if the channel management instruction is a connection channel starting instruction, managing the connection channel of the cloud host is to realize starting of the first connection channel, and detecting the state of the first connection channel of the cloud host after starting; if the channel management instruction is a connection channel stop instruction, managing the connection channel of the cloud host to realize the stop of the first connection channel, and detecting the state of the first connection channel after execution is stopped; if the channel management instruction is a connection channel repair instruction, managing the connection channel of the cloud host is to repair the connection channel of which the connection channel state is an inactive state, and detecting the connection channel state (including the first connection channel and the second connection channel) after the repair is performed.

And 106, updating the connection channel state of the cloud host in the database according to the connection channel state.

Namely, the connection channel state of the cloud host in the database is updated according to the detected connection channel state. And updating the connection channel state of the cloud host in real time.

According to the embodiment of the invention, the management of the connection channel of the cloud host is realized, the state of the connection channel of the cloud host is updated, the problem that the cloud host cannot work due to the abnormal connection channel is avoided, and the management, operation and maintenance efficiency of the cloud host is improved.

If the cloud host channel management instruction is a cloud host connection channel status check instruction, the cloud host management method as shown in fig. 2a includes the following steps:

101a, when receiving a cloud host connection channel state check instruction, acquiring the cloud host identification information to be checked according to the connection channel state check instruction.

The cloud host information is displayed on the graphical user interface provided by the management monitoring platform, and the cloud host to be checked can be determined on the graphical user interface provided by the management monitoring platform. For example, each piece of cloud host information is preceded by a selection box, and the cloud host is determined to be the cloud host to be checked by clicking the selection box. It is to be understood that a search expression input box is also provided on the graphical user interface, in which a search expression is input to determine the cloud host to be checked, for example, the search expression: andyw state all; anyx state all; and the OS type is liunx, windows and represents any anyw state and any anyx state of all cloud hosts with the operating system type of liunx and windows being checked. It is understood that a condition retrieval box is also provided on the graphical user interface, and the cloud host to be checked is determined according to the selected retrieval condition. It can be understood that, corresponding operation controls, for example, an "inspection" control, may also be correspondingly arranged in the area corresponding to the display of each cloud host information, and the "inspection" control may be triggered in the area corresponding to the display of the cloud host information, trigger a cloud host connection channel inspection instruction, and obtain the identification information of the corresponding cloud host according to the connection channel inspection instruction. As shown in particular in figure 3.

And after the cloud host to be checked is determined, acquiring the identification information of the cloud host to be checked. The identification information of the cloud host is a unique identification (ins _ id) of the machine.

102a, obtaining a cloud host identifier from the cloud host identifier information to be checked.

For example, a cloud host identifier can be obtained from the identification information of the cloud host to be inspected according to the sorting order. Or acquiring a cloud host identifier from the identification information of the cloud host to be inspected according to other rules.

103a, detecting whether the acquired cloud host identity exists in the database.

If the acquired cloud host identity exists in the database, executing step 104 a; if the acquired cloud host identity does not exist in the database, step 109a is executed.

And 104a, checking the connection channel state of the cloud host corresponding to the acquired cloud host identification.

Specifically, the connection channel state of the cloud host, such as the first connection channel state and the second connection channel state, is checked by calling a preset check interface. The preset check interface generates a job (task), and sends the job to the controller cluster, and the controller cluster executes the job through the corresponding connection channel, for example, sends a heartbeat packet; the preset check interface detects whether a return result is received, if the preset check interface receives the return result, the corresponding connection channel state is a connected state (or also called an active state), and if the preset check interface does not receive the return result, the corresponding connection channel state is an unconnected state (or also called an inactive state). For example, the preset check interface sends a heartbeat packet to the cloud host through the first connection channel, and if a return result is received, the state of the first connection channel of the cloud host is a connected state; if the return result is not received, the first connection channel state of the cloud host is an unconnected state; the second connecting channel is the same.

And 105a, judging whether the connection channel state of the cloud host is successfully checked.

And if the server receives the check result (including connection and non-connection) returned by the preset check interface, determining that the connection channel state of the cloud host is successfully checked. And if the checking result returned by the preset checking interface is not received, determining that the connection channel state of the cloud host is not checked successfully. If the connection channel state of the cloud host is successfully checked, executing step 106 a; if the connection channel status of the cloud host is not successfully checked, step 109a is executed.

106a, updating the connection channel state of the cloud host in the database according to the connection channel state of the cloud host.

When the connection channel state of the cloud host in the database is updated, the update time in the database also needs to be modified.

And 107a, detecting whether the connection channel state of the cloud host is successfully updated.

For example, whether the connection channel state of the cloud host is successfully updated or not can be detected through prompting, and if no prompting appears, the fact that the connection channel state of the cloud host is successfully updated is meant; if the corresponding prompt appears, the fact that the state of the connection channel of the cloud host fails to be updated is meant.

If the state of the connection channel of the cloud host is updated successfully, adding the identification information of the cloud host into a checking success list, and then executing step 108 a; if the update of the connection channel status of the cloud host fails, step 109a is executed.

108a, detecting whether the cloud host identification information to be checked is obtained completely.

If all the acquisition is finished, ending; if the identification information of the cloud host that is yet to be checked is not obtained, step 102a is executed.

109a, adding the corresponding cloud host identity to the check failure list.

The check failure list and the check success list can be recorded in a log file, and furthermore, the cloud host information corresponding to the check failure list and the check success list is displayed on the graphical user interface, so that the relevant information can be better displayed through the graphical user interface, and the operation and maintenance efficiency and experience are improved. The embodiment further defines that when the cloud host channel management instruction is the cloud host connection channel state checking instruction, the connection channel state of the cloud host is automatically checked, and the efficiency of cloud host management operation and maintenance is improved.

If the cloud host channel management instruction is a cloud host connection channel update instruction, the cloud host management method is shown in fig. 2b, and the cloud host management method includes the following steps:

101b, when receiving a cloud host connection channel update instruction, obtaining the cloud host identification information to be updated according to the connection channel update instruction.

The agent client software in the cloud host is updated by the connection channel updating instruction.

The cloud host to be updated can be determined on a graphical user interface provided by the management monitoring platform. For example, in the area where each piece of cloud host information is displayed, corresponding operation controls are correspondingly arranged, for example, controls such as "anyx update", "anyx start", "anyx stop", and "anyx repair", and the like, the "anyx update" control may be triggered in the area where the cloud host information is displayed, a cloud host connection channel update instruction is triggered, and the identification information of the corresponding cloud host is obtained according to the connection channel update instruction. As shown in fig. 3. Or inputting a corresponding retrieval expression in a retrieval expression input box on the graphical user interface, and determining the cloud host identification information to be updated according to the retrieval expression. The corresponding retrieval condition can be selected in a condition retrieval frame provided on the graphical user interface, and the identification information of the cloud host to be updated is determined according to the selected retrieval condition.

And acquiring corresponding cloud host identification information according to the connection channel updating instruction, wherein the number of the cloud host identification information can be one or more. The identification information of the cloud host is a unique identification (ins _ id) of the machine.

102b, detecting whether the cloud host identification information to be updated exists in the database.

If the cloud host identification information to be updated exists in the database, executing step 104 b; if the cloud host identification information to be updated does not exist in the database, step 103b is executed.

103b, presenting.

If the prompt is performed in the dialog box, or the prompt is performed by displaying corresponding colors or highlighting on the image user interface, so that the operation and maintenance personnel can conveniently and quickly obtain related information, and the operation and maintenance efficiency is improved.

104b, updating the first connection channel of the cloud host corresponding to the cloud host identification information through the second connection channel to obtain an update result.

Specifically, the connection channel is set as a second connection channel, and the first connection channel is updated by calling a preset update interface. For example, run-way: anyw (setting the connection channel as the second connection channel), anyx _ update (preset update interface). The preset updating interface can generate a job (task), the job can be sent to the controller cluster, the controller cluster is connected with the cloud host corresponding to the cloud host identification information through the second connecting channel, and the first connecting channel of the cloud host is updated. Updating the first connection channel of the cloud host, specifically, the method includes: and downloading the agent client software with a newer version, unloading the previously installed agent client software on the cloud host, and installing the agent client software with the newer version on the cloud host. And returning an updating result of updating the first connecting channel of the cloud host to the preset updating interface. The update result includes information of whether the update is successful, information of the corresponding agent client software version after the update is successful, and the like.

105b, checking the updated first connection channel state of the cloud host.

Specifically, the state of the first connection channel of the cloud host is checked by calling a preset check interface, and please refer to the above description for details, which is not described herein again.

106b, updating the update version and the first connection channel state corresponding to the first connection channel of the cloud host in the data according to the update result and the first connection channel state.

The update version corresponding to the first connection channel of the cloud host refers to the agent client software version corresponding to the cloud host after updating.

The embodiment further defines that when the cloud host channel management instruction is the cloud host connection channel updating instruction, the first connection channel of the cloud host is automatically updated, the state of the first connection channel is determined, and the efficiency of cloud host management operation and maintenance is improved.

If the cloud host channel management instruction is a cloud host connection channel start instruction, the cloud host management method is shown in fig. 2c, and the cloud host management method includes the following steps:

101c, when receiving a cloud host connection channel starting instruction, acquiring identification information of the cloud host to be started according to the connection channel starting instruction.

And the starting instruction of the first connecting channel corresponds to the starting instruction of the connecting channel.

Specifically, the cloud host identification information corresponding to the connection channel starting instruction may be obtained in the same manner as in obtaining the cloud host identification information corresponding to the connection channel updating instruction in fig. 2 b. Please refer to the above description, which is not repeated herein.

102c, detecting whether the cloud host identification information to be started exists in the database.

If the cloud host identification information to be started exists in the database, executing step 104 c; if the cloud host identification information to be started does not exist in the database, step 103c is executed.

103c, presenting.

And prompting to improve the operation and maintenance efficiency. For a specific prompting manner, please refer to the corresponding description above, which is not repeated herein.

104c, starting the first connection channel of the cloud host corresponding to the cloud host identification information through the second connection channel.

Specifically, the connection channel is set as a second connection channel, and the first connection channel is started by calling a preset starting interface. For example, in run-way, anyw (setting the connection channel as the second connection channel), and anyx _ start (a preset start interface), the preset start interface generates a job (task), sends the job to the controller cluster, and the controller cluster connects the cloud host corresponding to the cloud host identification information through the second connection channel to start the first connection channel of the cloud host. Specifically, after the controller cluster is connected with the cloud host corresponding to the cloud host identification information through the second connection channel, a start instruction is sent to the cloud host, and the cloud host executes the start instruction to start the agent client software on the cloud host, so that the purpose of starting the first connection channel is achieved. The starting result of starting the first connecting channel is returned to the preset starting interface. The starting result comprises unsuccessful starting, successful starting and the like.

105c, detecting the first connection channel state of the cloud host.

Specifically, the state of the first connection channel of the cloud host is checked by calling a preset check interface, and please refer to the above description for details, which is not described herein again.

106c, updating the first connection channel state of the cloud host in the data according to the first connection channel state.

The embodiment further defines that when the cloud host channel management instruction is a cloud host connection channel starting instruction, the first connection channel of the cloud host is automatically started, the state of the first connection channel is determined, and the efficiency of cloud host management operation and maintenance is improved.

If the cloud host channel management instruction is a cloud host connection channel stop instruction, the corresponding cloud host management method is similar to the cloud host management method shown in fig. 2c when the cloud host connection channel start instruction is received. Only the stopping of the first connection channel of the cloud host is achieved, see in particular fig. 2 c.

If the cloud host channel management instruction is a cloud host connection channel repair instruction, the corresponding cloud host management method is shown in fig. 2d, and the cloud host management method includes the following steps:

101d, when receiving the cloud host connection channel repair instruction, obtaining the cloud host identification information of which the connection channel state is the inactive state.

Specifically, cloud host identification information with the connection channel state being an inactive state is screened from the database. The connection channel state being inactive state includes the first connection channel state being inactive state and the second connection channel state being inactive state. And storing the cloud host identification information with the first connection channel state as an inactive state into a first list, and storing the cloud host identification information with the second connection channel state as an inactive state into a second list.

Prior to step 102d, it may be performed: and detecting whether the cloud host identification information in the inactive state exists in the database, if so, executing the step 102d, and if not, prompting.

102d, calling a preset repair interface to repair the connection channel of the cloud host corresponding to the cloud host identification information.

And for the cloud host with the first connection channel in the first list in the inactive state, setting the connection channel as a second connection channel, and repairing the first connection channel by calling a preset repair interface corresponding to the first connection channel. For example, run-way: anyw (setting the connection channel as the second connection channel), and anyx.repair (the preset repair interface corresponding to the first connection channel). The preset repairing interface corresponding to the first connecting channel can generate a job (task), the job is sent to the controller cluster, the controller cluster is connected with the cloud host corresponding to the cloud host identification information through the second connecting channel, and the first connecting channel of the cloud host is automatically repaired. Automatic repair may repair problems with cloud host configuration, cloud host firewall problems, agent installation packages, and so on. And returning the repair result of the first connecting channel to the preset repair interface corresponding to the first connecting channel.

And for the cloud host with the second connection channel in the second list in the inactive state, setting the connection channel as the first connection channel, and repairing the second connection channel by calling a preset repair interface corresponding to the second connection channel. For example, run-way: anyx (setting the connection channel as the first connection channel), and anyw.repair (the preset repair interface corresponding to the second connection channel). And returning the repairing result of the second connecting channel to the preset repairing interface corresponding to the second connecting channel.

The repairing result includes whether the repairing is successful, and the corresponding reason and repairing mode for initiating the repairing.

103d, detecting the connection channel state of the cloud host.

Specifically, if the first connection channel is repaired, detecting the state of the first connection channel of the cloud host; and if the repaired second connection channel is the second connection channel, detecting the state of the second connection channel of the cloud host. Specifically, the first connection channel state and the second connection channel state of the cloud host are checked by calling the corresponding preset check interfaces, for example, the first connection channel state of the cloud host is checked by calling the preset check interface of the first connection channel, and the second connection channel state of the cloud host is checked by calling the preset check interface of the second connection channel. For details, please refer to the above description, which is not repeated herein.

And 104d, updating the connection channel state of the cloud host in the data according to the connection channel state.

Updating the first connection channel state of the cloud host in the database according to the first connection channel state; and updating the second connection channel state of the cloud host in the database according to the second connection channel state.

The embodiment further defines that when the cloud host channel management instruction is a cloud host connection channel repair instruction, the first connection channel and the second connection channel of the cloud host are automatically repaired, the state of the first connection channel and the state of the second connection channel are determined, the efficiency of cloud host management operation and maintenance is improved through automatic repair, and the labor operation and maintenance cost is reduced.

The above embodiments exemplify some management scenarios of cloud host channel management, and it should be understood that these management scenarios are only used as an example. Cloud host channel management may also involve more management scenarios, which are not described here.

The following will relate to managing cloud host information. According to the foregoing description, the cloud host platform may report the cloud host information to the server of the management monitoring platform, and the controller cluster may also report the cloud host information to the server of the management monitoring platform. Generally, cloud host information reported by a cloud host platform is received first, and then cloud host information reported by a controller cluster is received, so that an IP is allocated first (the allocated IP may be changed), a logged-in IP is corresponding to the allocated IP, and after the controller cluster is connected with the cloud host, the corresponding IP is a registered IP which is a determined IP (the registered IP is not changed, and can also be understood as an IP which is successfully allocated). And recording all information of the related cloud host in a database of the management monitoring platform by taking the unique machine identifier as a main key.

It can be understood that it cannot be guaranteed that the reported cloud host information of the cloud service platform and the like is all correct information, but the server can automatically judge the reported cloud host information to determine whether data exception exists and mark the data exception, so as to avoid the failure of executing the operation (task) and improve the operation and maintenance efficiency.

Therefore, before formally introducing the cloud host management method provided by the embodiment of the present invention, some cases of data abnormality in the cloud host information management are introduced, including: IP inconsistency, id inconsistency, IP duplication, unregistered, unsynchronized, whether a task can be performed using IP, and the like.

IP inconsistency: the entered IP and the registered IP of one record are inconsistent. For example, the seventh record in the table of fig. 3, has an entry IP of 10.203.192.221 and a registration IP of 10.203.192.206.

id inconsistency: two records, one with a logging IP and the other with a registration IP, are equal, but the machine unique identifications (ins _ id) are not consistent. For example, the third record and the fifth record in the table of fig. 3, the registered IP of the third record is 10.203.192.219, and the machine unique identifier is 06 GPDCD; the entry IP of the fifth record is 10.203.192.219 and the machine unique identification is 2102312FLT10JC 000053.

IP repetition: one IP is used by a plurality of machines, namely the logging IP and the registration IP corresponding to a plurality of different machine unique identifications are the same. It is reasonable that this situation exists in the case of a public cloud, but there is no IP multiplexing for a private cloud. In the embodiment of the present invention, a private cloud is taken as an example for description, so that there is no IP duplication. It should be noted that IP duplication in the public cloud is allowed.

Unregistered: one record has no registered IP. This condition is usually a channel anomaly, and the cloud host information is not actively reported.

Unsynchronized: the logging IP does not exist. Generally, other professional groups (such as a cloud host platform) do not push cloud host information to a server, and at the moment, synchronization does not exist; there is also a case where these machines are not built on the cloud, but are manually built off-line, in which case cloud host information is not automatically sent to the server, requiring the server to synchronize.

In the case of the data abnormality as described above, the flag may be 1 if there is a corresponding abnormality, or may be 0 if there is no corresponding abnormality, and the following description will be made in this manner. Other means of marking may also be used. The above is only an example of a few data abnormality situations, and it is understood that other data abnormality situations exist.

Fig. 4 is a schematic flowchart of a cloud host management method according to an embodiment of the present invention. As shown in the figure, the method comprises the following specific processes:

and 201, when receiving a cloud host information management instruction, acquiring the cloud host information to be managed according to the information management instruction.

The cloud host platform and the controller cluster can send corresponding cloud host information to a server of the management monitoring platform. In some cases, for example, when cloud host information is newly added to the cloud host platform, the server is triggered to generate a cloud host information management instruction, such as a cloud host information addition instruction, where the cloud host information addition instruction includes the newly added cloud host information, and the cloud host information is corresponding cloud host information. It can be understood that when a cloud host is newly added to the cloud host platform, the server for managing and monitoring the platform is triggered to newly add the cloud host information. Or, when the cloud host information is newly added in the cloud host platform, a cloud host information adding instruction is sent to the server at the same time, and the newly added cloud host information is carried in the cloud host information adding instruction. Update and delete are the same. When the controller cluster receives new cloud host information sent by an agent client on the cloud host, the controller cluster can trigger the server to generate a cloud host information management instruction or send the cloud host new instruction to the server. Update and delete are the same.

The cloud host information management instruction comprises a cloud host information adding instruction, a cloud host information updating instruction, a cloud host information deleting instruction, a cloud host information synchronizing instruction and the like.

202, detecting whether a record corresponding to the cloud host information to be managed exists in the database.

And detecting whether a record corresponding to the cloud host information to be managed exists in the database according to the machine unique identifier (ins _ id). If the unique machine identifier is obtained from the cloud host information to be managed, namely the unique cloud host identifier, the unique machine identifier is inquired from the database so as to determine whether a corresponding record exists. And if the record identical to the unique machine identifier exists in the database, determining that the record corresponding to the acquired cloud host information exists.

If the record corresponding to the acquired cloud host information does not exist in the database, executing step 203; if a record corresponding to the acquired cloud host information exists in the database, step 207 is executed.

And 203, inquiring whether a record of entering the IP or registering the IP equal to the IP in the cloud host information to be managed exists in the database.

If the corresponding IP information is obtained from the cloud host information to be managed, whether records of entering the IP and registering the IP equal to the IP to be managed exist in the database or not is inquired.

If the record of the input IP or the registered IP equal to the IP in the cloud host information to be managed does not exist, executing 204; if there is a record that the logged IP or the registered IP is equal to the IP in the cloud host information to be managed, step 205 is executed.

And 204, determining an abnormal result of the data abnormality, and updating the database according to the abnormal result and the cloud host information to be managed.

That is, if there is no record of logging in the IP or registering the IP equal to the IP in the cloud host information to be managed, it means that there is no relevant record of the cloud host information to be managed in the database.

The exception results of the data exception include: no IP inconsistency, no id inconsistency, no IP duplication and the like; if the cloud host information to be managed is the cloud host information uploaded by the controller cluster, the cloud host information to be managed is not synchronized; if the cloud host information to be managed is the cloud host information uploaded by the cloud host platform, the cloud host information to be managed is not registered.

Wherein, according to the abnormal result and the cloud host information update database of treating the management, include: and marking in the database according to the abnormal result, and updating (adding) the cloud host information to be managed in the database.

Wherein, marking in the database according to the abnormal result comprises: marking the IP inconsistent field as 0 (no IP inconsistency), the id inconsistent field as 0 (no id inconsistency) and the IP repeated field as 0 (no IP multiplexing); if the cloud host information to be managed is the cloud host information uploaded by the controller cluster, marking an unregistered field as 1 (existence of unregistered) and an unsynchronized field as 0 (absence of unsynchronization); if the to-be-managed cloud host information is the cloud host information uploaded by the cloud host platform, marking the unregistered field as 0 (no unregistered) and the unsynchronized field as 0 (no unsynchronized).

Further, execution modes may also be marked. Specifically, the operating system type in the cloud host information to be managed is obtained; if the operating system type is windows, marking an execution mode field run-way as anyx; if the operating system type is liunx, marking the execution mode run-way of anyx and anyw. It should be noted that, if the operating system type is windows, because the window does not support establishing connection with the cloud host in an SSH manner, connection with the cloud host cannot be established in an SSH manner (anyw channel), and connection with the cloud host can only be established through an anyx channel. It can be understood that if the operating system type is liunx, a connection can be established with the cloud host through the anyw channel and the anyx channel.

Further, whether the job (task) can be executed using IP may also be marked, such as whether the job field that can be executed using IP is 0, i.e., the job can be executed using IP.

205, obtaining the record number of the existing records, and determining whether the data exception exists according to the record number to obtain an exception result.

Specifically, step 205 includes: if the recorded IP or the registered IP is equal to the record of the IP in the cloud host information to be managed, inquiring whether a record of the recorded IP being empty and the registered IP being the IP in the cloud host information to be managed exists in a database or a record of the recorded IP being the IP in the cloud host information to be managed and the registered IP being empty exists in the database; if the records exist (the records that the recorded IP is empty and the registered IP is the IP in the cloud host information to be managed or the records that the recorded IP is the IP in the cloud host information to be managed and the registered IP is empty), acquiring a second number of the existing records corresponding to the records, and acquiring a first number of the records that the recorded IP exists or the registered IP is equal to the IP in the acquired cloud host information; subtracting the first record quantity from the second record quantity to obtain a subtraction result; determining whether data abnormality exists according to the subtraction result to obtain an abnormal result; if the abnormal result of the data abnormality does not exist (the record of logging in the IP as null and the registration IP as the IP in the cloud host information to be managed does not exist, or the record of logging in the IP as the IP in the cloud host information to be managed and the registration IP as null), determining the abnormal result of the data abnormality.

Determining whether data exception exists according to the subtraction result to obtain an exception result, wherein the determining comprises the following steps: if the subtraction result is less than 1, which means that the machine determined to use the IP is not found in the database, the abnormal result of the data exception includes: there is no IP inconsistency, id inconsistency, IP duplication, etc.; further, the execution mode is determined to be run-way: anyx, and the task cannot be executed by using IP. It is understood that, since there is inconsistency of ids, there may be a case where the same IP is commonly used by a plurality of machines, and the IP cannot be used to execute a job (task), and cannot be connected to a cloud host by using SSH, and the execution mode is determined to be anyx.

If the subtraction result is not less than 1, which means that the IP in the database is the same as at least one IP to be managed, the abnormal result of the data abnormality includes: the existence of id inconsistency, the existence of IP duplication and the like; further, the execution mode is determined to be run-way: anyx, and the task cannot be executed by using IP. It will be appreciated that if there is an IP duplication, it may be a problem with the network group assigning IP.

If the abnormal result of the data abnormality is determined, the abnormal result includes: the existence of id inconsistency, the existence of IP duplication and the like; further, the execution mode is determined to be anyx, and the task cannot be executed by using the IP.

And 206, updating the database according to the abnormal result and the cloud host information to be managed.

Specifically, the method comprises the following steps: and marking in the database according to the abnormal result, and updating (adding) the cloud host information to be managed in the database.

Wherein, marking in the database according to the abnormal result comprises: if the subtraction result is less than 1, marking that the IP inconsistent field is 0, the id inconsistent field is 1, the IP repeated field is 0, the execution mode field is anyx, whether the IP execution task field can be used is 1, and the like; if the subtraction result is not less than 1, the tag id inconsistency field is 1, the IP duplication field is 1, the execution mode field is anyx, whether the IP execution task can be used is 1, and the like.

If the abnormal result does not exist (the record that the recorded IP is empty and the registered IP is the IP in the cloud host information to be managed or the record that the recorded IP is the IP in the cloud host information to be managed and the registered IP is empty does not exist), marking in the database according to the abnormal result, wherein the method comprises the following steps: the tag id inconsistent field is 1, the IP duplication field is 1, the execution mode field is anyx, whether the IP execution task can be used is 1, and the like.

Corresponding to the above steps 203-206 is to add a corresponding process of the cloud host information to be managed in the database if there is no record corresponding to the cloud host information to be managed in the database. Correspondingly, the information management instruction is a cloud host information adding instruction.

It should be noted that, while updating the database according to the abnormal result and the cloud host information to be managed in the above steps 203 to 206, or after updating the database according to the abnormal result and the cloud host information to be managed, the cloud host management method further includes: and extracting the cloud host information required by executing the operation from the cloud host information to be managed, and storing the cloud host information required by executing the operation to the total Redis. The cloud host information required by executing the operation is cached through the total Redis, and the required cloud host information is obtained from the cache when the operation is executed, so that the operation executing speed can be increased.

207, comparing the information of the cloud host to be managed with the information of the cloud host stored in the local database to determine whether data abnormality exists or not, and obtaining an abnormal result.

That is, if a record corresponding to the cloud host information to be managed exists in the database, the cloud host information to be managed is compared with the cloud host information stored in the local database to determine whether data abnormality exists or not, and an abnormal result is obtained.

Specifically, step 207 includes: acquiring the IP of the cloud host in the cloud host information to be managed, and matching the IP of the cloud host with the IP of the corresponding cloud host in the database; if the matching is successful (namely the IP of the cloud host to be managed is the same as the IP of the cloud host in the record determined in the database), acquiring the operating system type of the cloud host in the cloud host information to be managed, and comparing the operating system type of the cloud host with the operating system type of the corresponding cloud host in the database to obtain a comparison result; determining an abnormal result of data abnormality according to the comparison result; if the matching is not successful (namely the IP of the cloud host to be managed is different from the IP of the cloud host in the record determined in the database, the IP of the cloud host can be understood as needing to be updated), acquiring the recorded IP and the registered IP of the corresponding cloud host in the database, and judging whether the recorded IP and the registered IP are equal to obtain a judgment result; and determining an abnormal result of data abnormality according to the judgment result.

Determining an abnormal result of the data abnormality according to the comparison result, wherein the abnormal result comprises: if the operating system type of the cloud host to be managed is the same as the operating system type of the cloud host in the database, that is, the comparison result is the same, it means that the unique machine identifier, the IP, the operating system of the cloud host to be managed and the cloud host in the record determined in the database are all correspondingly the same; then the abnormal result of the data exception is determined as: no IP inconsistency, no IP duplication, no id inconsistency, etc. (simply understood as no data exception). If the operating system type of the cloud host to be managed is different from the operating system type of the cloud host in the database, that is, the comparison result is different, it means that the machine unique identifier and the IP of the cloud host to be managed are the same as the correspondence between the cloud host in the record determined in the database, and the operating system types are different (it can be understood that the operating system type of the cloud host needs to be updated); then the abnormal result of the data exception is determined as: no IP inconsistency, no IP duplication, no id inconsistency, etc. (simply understood as no data exception).

If the matching is not successful (that is, the IP of the cloud host to be managed is different from the IP of the cloud host in the record determined in the database, and it can be understood that the IP of the cloud host needs to be updated), acquiring the entry IP and the registration IP of the corresponding cloud host in the database, and determining whether the entry IP and the registration IP are equal to each other to obtain a determination result, including: if the matching is not successful, detecting whether the IP to be managed exists in the total Redis; if the IP to be managed exists in the total Redis, deleting the relevant information of the IP to be managed in the total Redis (which can be understood as deleting the relevant information of the IP which is not needed in the total Redis); if the IP to be managed does not exist in the total Redis, acquiring the input IP and the registration IP of the corresponding cloud host in the record determined by the database; judging whether the input IP and the registered IP are equal, wherein the judgment result comprises the following steps: equal and unequal.

Determining an abnormal result of the data abnormality according to the judgment result, wherein the determining of the abnormal result of the data abnormality comprises the following steps: if the input IP and the registered IP are equal, it means that the unique machine identifier of the cloud host to be managed is equal to the corresponding identifier in the database, the IP of the cloud host to be managed is not equal to the IP in the corresponding record in the database (the IP of the cloud host needs to be updated), and meanwhile, the input IP and the registered IP in the database are equal, it is determined that the abnormal result of the data is: no IP inconsistency, no IP duplication, no id inconsistency, etc. (simply understood as no data exception). If the input IP and the registered IP are not equal, the unique machine identifier of the cloud host to be managed is equal to the corresponding identifier in the database, the IP of the cloud host to be managed is not equal to the IP in the corresponding record in the database, and the input IP and the registered IP in the database are not equal, judging whether the inconsistency of the IPs is ignored; if the inconsistency of the IP is ignored, updating corresponding cloud host information in the database with the IP in the cloud host to be managed as a standard, and further determining whether IP duplication exists according to the IP in the cloud host to be managed; if the inconsistency of the IP is not ignored, updating the corresponding cloud host information in the database on the basis of the registered IP in the database, and further determining whether IP duplication exists according to the IP in the cloud host to be managed.

And 208, updating the database according to the abnormal result and the cloud host information to be managed.

Wherein, include: and marking in the database according to the abnormal result, and updating the database according to the cloud host information to be managed.

In the case exemplified in step 207, if there is no data abnormality, it is not necessary to perform a marking in the database. If it is determined that there is an IP duplication, a marking is required.

If the unique machine identifier, the IP and the operating system of the cloud host to be managed correspond to the cloud host in the record determined in the database, updating the database according to the information of the cloud host to be managed without updating the total Redis; if the unique machine identifier and the IP of the cloud host to be managed are the same as the corresponding cloud host in the record determined in the database, and the types of the operating systems are different, updating the database according to the information of the cloud host to be managed, extracting the cloud host information used for executing the operation in the cloud host information, and updating to total Redis; if the unique machine identifier of the cloud host to be managed is equal to the corresponding identifier in the database, the IP of the cloud host to be managed is not equal to the IP in the corresponding record in the database (the IP of the cloud host needs to be updated), and the input IP in the database is equal to the registered IP; updating the database according to the cloud host information to be managed, extracting the cloud host information used for executing the operation from the cloud host information, and updating to total Redis; if the unique machine identifier of the cloud host to be managed is equal to the corresponding identifier in the database, the IP of the cloud host to be managed is not equal to the IP in the corresponding record in the database, and the input IP and the registered IP in the database are not equal, updating the database according to the information of the cloud host to be managed when the IP in the cloud host to be managed is determined to be on time, extracting the information of the cloud host used for executing the operation in the information of the cloud host, and updating the information to total Redis; if the unique machine identifier of the cloud host to be managed is equal to the corresponding identifier in the database, the IP of the cloud host to be managed is not equal to the IP in the corresponding record in the database, and the input IP and the registered IP in the database are not equal, when the registered IP in the database is determined as the standard, updating the database according to the information except the IP information in the information of the cloud host to be managed, extracting the information of the cloud host used for executing the operation in the information of the cloud host, and updating the information to the total Redis.

The total Redis is updated in this step to ensure that the data held in the total Redis is the most up-to-date data.

It should be noted that the above steps 207 to 208 correspond to a corresponding process of updating the cloud host information to be managed in the database if there is a record corresponding to the cloud host information to be managed in the database. Correspondingly, the information management command is a cloud host information updating command.

If the information management instruction is a cloud host information deletion instruction, the cloud host management method comprises the following steps: when a cloud host information deleting instruction is received, acquiring cloud host information to be deleted according to the information deleting instruction; detecting whether a record corresponding to the cloud host information to be deleted exists in a database; if not, prompting is carried out; if yes, deleting corresponding cloud host information to be deleted, which is stored in the area Redis; deleting the client corresponding to the first connection channel on the cloud host through the second connection channel, namely deleting agent client software; and then, executing corresponding steps in the steps 207-208, namely, replacing the updating with deleting to delete the corresponding related information of the cloud host to be deleted in the total Redis and delete the information of the cloud host to be deleted in the database.

If the information management instruction is a cloud host information synchronization instruction, the cloud host management method comprises the following steps: when a cloud host information synchronization instruction is received, acquiring cloud host information on a cloud host platform according to the information synchronization instruction, and taking the acquired cloud host information on the cloud host platform as the cloud host information to be synchronized; detecting whether a record corresponding to the cloud host information to be synchronized exists in a database, namely comparing a machine unique identifier in the cloud host information to be synchronized with a machine unique identifier of the cloud host information stored in the database; if the corresponding machine unique identifier exists in the cloud host information to be synchronized but does not exist in the database, executing a corresponding process of newly adding the cloud host information corresponding to the steps 203-206 to update the total Redis and the database; if the corresponding machine unique identifier exists in the cloud host information to be synchronized and the database also exists, executing a corresponding process for updating the cloud host information corresponding to the steps 207-208 to update the total Redis and the database; and if the cloud host information to be synchronized does not have the corresponding unique machine identifier and the database has the corresponding unique machine identifier, determining that the cloud host information in the database is abnormal and marking.

In the above embodiment of managing the cloud host information, the mark of the abnormal result of the abnormal data is also displayed on the graphical user interface, so as to better implement the operation and maintenance of the cloud host and improve the operation and maintenance experience and efficiency.

In the embodiment of the cloud host information management, the cloud host information to be managed is compared with the cloud host information stored in the database, whether data abnormality exists or not is determined according to the comparison result, and an abnormal result is obtained; and updating the database according to the abnormal result and the information of the cloud host to be managed. It can be understood that, when the cloud host information to be managed is managed in the embodiment of the present invention, not only functions such as adding, updating, deleting, and synchronizing are implemented, but also the marking of whether abnormal data exists is implemented, and according to the marked abnormal data, operation and maintenance personnel can conveniently perform operation and maintenance, and the efficiency and speed of operation and maintenance of the cloud host information are improved.

Fig. 5 is a schematic block diagram of a cloud host management apparatus according to an embodiment of the present invention. The cloud host management apparatus includes a first obtaining unit 301, a first detecting unit 302, a first managing unit 303, a status detecting unit 304, and a first updating unit 305.

The first obtaining unit 301 is configured to, when receiving a cloud host channel management instruction, obtain cloud host identifier information to be managed according to the channel management instruction.

A first detecting unit 302, configured to detect whether there is cloud host identification information to be managed in a local database.

The channel management unit 303 is configured to manage a connection channel of the cloud host according to the channel management instruction if the cloud host identification information to be managed exists.

And a state detection unit 304, configured to detect a connection channel state of the cloud host.

A first updating unit 305, configured to update the connection channel status of the cloud host in the database according to the connection channel status.

Fig. 6 is another schematic block diagram of a cloud host management apparatus according to an embodiment of the present invention. The cloud host management apparatus includes a second acquisition unit 401, a second detection unit 402, an abnormality determination unit 403, and a second update unit 404. Wherein the content of the first and second substances,

the second obtaining unit 401 is configured to, when receiving the cloud host information management instruction, obtain cloud host information to be managed according to the information management instruction.

A second detecting unit 402, configured to detect whether a record corresponding to the cloud host information to be managed exists in the database.

The anomaly determination unit 403 is configured to, if there is a record corresponding to the cloud host information to be managed, compare the cloud host information to be managed with the cloud host information stored in the database to determine whether there is a data anomaly, and obtain an anomaly result.

And a second updating unit 404, configured to update the database according to the abnormal result and the to-be-managed cloud host information.

Wherein, cloud host management device still includes: and a deletion unit. And the deleting unit is used for deleting the client corresponding to the first connecting channel on the cloud host through the second connecting channel.

Wherein, cloud host management device still includes: and querying the unit. The query unit is configured to query whether a record with an entered IP or a registered IP equal to the IP in the cloud host information to be managed exists in the database. The anomaly determination unit 308 is further configured to record that an entry IP or a registration IP is equal to an IP in the cloud host information to be managed, obtain the number of recorded records, and determine whether a data anomaly exists according to the number of records, so as to obtain an anomaly result.

In an embodiment, the cloud host management apparatus includes all the units related to the embodiments of fig. 5 and fig. 6.

It should be noted that, as will be clear to those skilled in the art, specific implementation procedures and achieved beneficial effects of the above-mentioned apparatus and units may refer to corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is provided herein.

The embodiment of the present invention further provides a computer device, which integrates any one of the cloud host management methods provided by the embodiments of the present invention, where the computer device includes:

one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to perform the steps of the cloud host management method in any of the cloud host management method embodiments described above.

The embodiment of the invention also provides computer equipment, which integrates any one of the cloud host management devices provided by the embodiment of the invention. Fig. 7 is a schematic diagram showing a structure of a computer device according to an embodiment of the present invention, specifically:

the computer device may include components such as a processor 501 of one or more processing cores, memory 502 of one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that the computer device configurations illustrated in the figures are not meant to be limiting of computer devices and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:

the processor 501 is a control center of the computer device, connects various parts of the entire computer device by using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby monitoring the computer device as a whole. Optionally, processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501.

The memory 502 may be used to store software programs and modules, and the processor 501 executes various functional applications and data processing by operating the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

The computer device further comprises a power supply 503 for supplying power to the various components, and preferably, the power supply 503 may be logically connected to the processor 501 through a power management system, so that functions of managing charging, discharging, power consumption, and the like are realized through the power management system. The power supply 503 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.

The computer device may also include an input unit 504, and the input unit 504 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 501 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and the processor 501 runs the application programs stored in the memory 502, so as to implement various functions, such as implementing the steps corresponding to any embodiment of the cloud host management method described above.

It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.

To this end, an embodiment of the present invention provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. The cloud host management method comprises a step of storing a computer program, and a step of loading the computer program by a processor to execute the steps of any one of the cloud host management methods provided by the embodiments of the invention. For example, the computer program loaded by the processor may perform the steps corresponding to any embodiment of the cloud host management method described above.

In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed descriptions of other embodiments, and are not described herein again.

In a specific implementation, each unit or structure may be implemented as an independent entity, or may be combined arbitrarily to be implemented as one or several entities, and the specific implementation of each unit or structure may refer to the foregoing method embodiment, which is not described herein again.

The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.

The cloud host management method, the cloud host management device, the computer device and the storage medium provided by the embodiments of the present invention are described in detail above, and a specific example is applied in the text to explain the principle and the implementation of the present invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:数据处理方法和装置、电子设备以及计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!