CN113407403B - Cloud host management method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN113407403B
CN113407403B CN202010180973.3A CN202010180973A CN113407403B CN 113407403 B CN113407403 B CN 113407403B CN 202010180973 A CN202010180973 A CN 202010180973A CN 113407403 B CN113407403 B CN 113407403B
Authority
CN
China
Prior art keywords
cloud host
connection channel
channel
management
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010180973.3A
Other languages
Chinese (zh)
Other versions
CN113407403A (en
Inventor
詹念
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SF Technology Co Ltd
Original Assignee
SF Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN202010180973.3A priority Critical patent/CN113407403B/en
Publication of CN113407403A publication Critical patent/CN113407403A/en
Application granted granted Critical
Publication of CN113407403B publication Critical patent/CN113407403B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating

Abstract

The embodiment of the invention discloses a cloud host management method, a cloud host management device, computer equipment and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: when a cloud host channel management instruction is received, acquiring cloud host identification information to be managed according to the channel management instruction; if 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 state of a connection channel of a cloud host; and updating the connection channel state of the cloud host in the database according to the connection channel state. The embodiment of the invention realizes the management of the connection channel of the cloud host, updates the state of the connection channel of the cloud host, avoids the failure of the cloud host caused by the abnormality of the connection channel, and improves the management operation and maintenance efficiency of the cloud host.

Description

Cloud host management method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a cloud host management method, a cloud host management device, a computer device, and a storage medium.
Background
Along with the increase of the operation scale of cloud hosts, the management operation and maintenance of mass cloud hosts has become a relatively troublesome problem of current cloud service providers, and although some cloud host management and maintenance tools in the prior art can realize some basic management and maintenance functions of the cloud hosts, the management and maintenance functions are not perfect, and meanwhile, the degree of freedom of management and maintenance 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 increased.
Disclosure of Invention
The embodiment of the invention provides a cloud host management method, a cloud host management 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 cloud host management operation and maintenance.
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 cloud host identification information to be managed according to the channel management instruction;
detecting whether the cloud host identification information exists in a database;
if the cloud host identification information exists, managing a connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction;
Detecting the state of a connection channel of the cloud host;
and updating the connection channel state of the cloud host in the database according to the connection channel state.
The embodiment of the invention also provides a cloud host management device, which comprises:
the first acquisition unit is used for acquiring cloud host identification information to be managed according to the channel management instruction when receiving the cloud host channel management instruction;
the first detection unit is used for detecting whether the cloud host identification information exists in the database;
the first management unit is used for managing the 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.
The embodiment of the invention also provides a computer device, which comprises: one or more processors; a memory; and one or more application programs, wherein the processor is connected with the memory, and the one or more application programs are stored in the memory and configured to execute the cloud host management method by the processor.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, the computer program being loaded by a processor to execute the cloud host management method.
When a cloud host channel management instruction is received, the embodiment of the invention acquires cloud host identification information to be managed according to the channel management instruction; if 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 state of a connection channel of a cloud host; and updating the connection channel state of the cloud host in the database according to the connection channel state. The embodiment of the invention realizes the management of the connection channel of the cloud host, updates the state of the connection channel of the cloud host, avoids the failure of the cloud host caused by the abnormality of the connection channel, and improves the management operation and maintenance efficiency of the cloud host.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a cloud host management system according to an embodiment of the present invention;
fig. 2 is a flow chart of a cloud host management method according to an embodiment of the present invention;
fig. 2a is a schematic flow chart of channel management of a cloud host management method according to an embodiment of the present invention;
fig. 2b is a schematic flow chart of channel management of a cloud host management method according to an embodiment of the present invention;
fig. 2c is a schematic flow chart of channel management of a cloud host management method according to an embodiment of the present invention;
fig. 2d is a schematic flow chart of channel management of a cloud host management method according to an 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 flow chart of 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 provided by an embodiment of the present invention;
FIG. 6 is another schematic block diagram of a cloud host management apparatus provided by 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 following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
In the description of the present invention, it should 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 a relative importance or number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise. In addition, the terms "first" and "second" are used to distinguish a plurality of elements from one another. 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 present invention. The first constraint and the second constraint are both constraints, but they are not the same constraint.
In the present invention, the term "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described as "exemplary" in this disclosure 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 purposes 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 have not been described in detail so as not to obscure 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, a cloud host management device, computer equipment and a storage medium. The cloud host management method is operated in computer equipment, wherein 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 invention, the embodiment of the invention provides a structural schematic 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 host, including information management of the cloud host, connection channel management of the cloud host, 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 is operated 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, wherein cloud host information reported by the cloud host platform and cloud host information reported by the controller cluster are stored in the database. The management monitoring platform further comprises a total Redis, wherein the total Redis is used for storing cloud host information required by executing the job, and the cloud host information required by executing the job is used as target cloud host information. Redis (Remote Dictionary Server), which represents a remote dictionary service, is a storage system. In the embodiment of the invention, the total Redis is used for caching cloud host information required for executing the job. After target cloud host information required for executing the job is acquired from the total Redis, the information is provided to a job (task) entry for use in executing the corresponding job (task). The operation includes all operations on the cloud host, including starting the cloud host, restarting the cloud host, expanding the capacity of the cloud host, shrinking the capacity of the cloud host, modifying passwords on 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 and monitoring platform, a corresponding graphical user interface (Graphical User Interface, abbreviated GUI), also called graphical user interface, is also provided. And sending some cloud host management instructions, such as channel management instructions, cloud host information management instructions and the like, to the server through the graphic user interface.
The cloud host platform comprises a plurality of cloud host information, wherein the cloud host comprises bare host information and non-bare host information. Where bare host refers to a machine that has not created any virtual machine, and non-bare host refers to a machine that has created a virtual machine. When a virtual machine needs to be created, for example, when the virtual machine is created on a bare host, a unique identifier of a machine and an IP are allocated to the created virtual machine (cloud host), and the allocated IP is used as an entry IP. It should be noted that in the embodiment of the present application, a 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 can report the relevant information of the cloud host to the management monitoring platform. The relevant information of the cloud host comprises: the available area in the relevant information of the cloud host refers to the environments of research and development environment, functional test, test available area, production, disaster tolerance, melting and the like, and each environment corresponds to one available area and each available area is independent of each other.
The controller cluster comprises a plurality of controllers, wherein the controllers are computer equipment provided with agent server software, and the controllers provide gateway services for cloud hosts provided with agent client software. It will be appreciated that the controller is a controller Server, corresponding to the registration Server in FIG. 3. When the cloud host with the agent client software is about to communicate with the controller, the cloud host needs to report information of the cloud host to the controller cluster, for example, report an IP of the cloud host, and the IP 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 communicates with the cloud host. This connection channel is called a first connection channel or agent channel or anyx channel, which communicates by maintaining a long connection. It should be noted that, in addition to the agent channel, the first connection channel in the embodiment of the present invention may further include other connection channels similar to the agent channel that need to be installed with software (such as client software) to connect. After the controller cluster establishes connection with the cloud host, information of the cloud host is reported to the management and monitoring platform. The information of the cloud host reported to the management monitoring platform by the controller cluster comprises: unique identification of machine (ins_id), registration ip (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 to the management monitoring platform by the controller is stored in the region Redis database.
In the embodiment of the present invention, the communication between the controller cluster and the cloud host uses the first connection channel to perform communication, and the controller cluster and the cloud host are connected through the second connection channel to perform communication. The second connection channel includes a channel for establishing connection by means of Secure Shell (SSH), that is, a connection channel for establishing connection with the cloud host through information such as IP of the cloud host or IP and connection password of the cloud host. It should be noted that the second connection channel may also comprise other connection channels similar to the SSH-like connection, i.e. connection channels that are accessible without requiring installation of software. The second connection channel may also be referred to as an anyw channel. It can be understood that the connection channels for connecting the cloud host provided in the embodiments of the present invention include two types: a first connection channel (agent channel or anyx channel) and a second connection channel (anyw channel). If the cloud host is to be connected through the first connection channel, the agent client needs to be installed on the cloud host.
The cluster of controllers is also used to receive a job (task) and execute the job. For example, the cloud host in the job is connected through the first connection channel of the controller cluster, and a corresponding job instruction is issued to the cloud host, so that the cloud host executes the job.
Hereinafter, a cloud host management method, a device, a computer device and a storage medium provided by the embodiments of the present invention will be specifically described, where the cloud host management method operates in a server that manages a monitoring platform.
Fig. 2 is a flow chart 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 procedures:
101, when a cloud host channel management instruction is received, acquiring cloud host identification information to be managed according to the channel management instruction.
The cloud host channel management instruction can be triggered by executing corresponding operations on a graphical user interface provided by the management monitoring platform, such as 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, and triggering the cloud host channel management instruction; or triggering by voice, for example, detecting that the user sends corresponding voice for cloud host channel management, and triggering a cloud host channel management instruction; or may be triggered by directly executing a corresponding command, etc. The user triggers a cloud host channel management instruction on the 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 instructions comprise 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. The connection channel update instruction, the connection channel start instruction, and the connection channel stop instruction are specific to the first connection channel, and if the cloud host needs to be connected through the first connection channel, the agent client software needs to be installed on the cloud host according to the above description, so that update, start and stop of the agent client software are involved.
102, detecting whether cloud host identification information exists in a database.
After the cloud host identification information is acquired, inquiring the cloud host identification information in a database, and determining whether the cloud host identification information exists in the database.
If the cloud host identification information does not exist in the database, executing step 103; if cloud host identification information exists in the database, step 104 is performed.
103, prompting. If the data of the cloud host identification information which does not exist in the database is written into the list, or written into the operation log, or prompted in a dialog box form and the like; or in combination with each other.
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 checking instruction, managing the connection channel of the cloud host to check 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 to realize updating of the first connection channel; if the channel management instruction is a connection channel starting instruction, managing the connection channel of the cloud host to realize the 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 to stop the first connection channel; if the channel management instruction is a connection channel repair instruction, managing the connection channel of the cloud host is repairing the connection channel with the connection channel state being inactive.
The connection channel of the cloud host comprises a first connection channel and a second connection channel. Except that the channel management instruction is a connection channel state checking instruction, that is, if the cloud host channel management instruction is a connection channel update instruction, a connection channel start instruction, a connection channel stop instruction, a connection channel repair instruction, and the like, the method for managing the connection channel of the cloud host according to the channel management instruction includes: if the management instruction is a channel management instruction of the first connecting channel, connecting the cloud host through a second connecting channel; managing a first connection channel of the cloud host according to the channel management instruction; if the channel management instruction is a channel management instruction of the second connection channel, connecting the cloud host through the first connection channel; and managing the 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 connecting channel needs to be repaired, the cloud host is connected through the first connecting channel, so that the second connecting channel of the cloud host is repaired.
The corresponding cloud host channel management instruction can be triggered according to the preset time interval, and the connection channel of the cloud host is managed according to the channel management instruction. It will be appreciated that the management of the connection channels of the cloud host is performed regularly.
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 portal, the job portal is used for transmitting the information to the controller cluster, 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; 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 implement updating of the first connection channel, and detecting a first connection channel state of the cloud host after the updating is performed; if the channel management instruction is a connection channel starting instruction, managing the connection channel of the cloud host to realize the starting of the first connection channel, and detecting the state of the first connection channel of the cloud host after the starting is executed; if the channel management instruction is a connection channel stop instruction, managing the connection channel of the cloud host to stop the first connection channel, and detecting the state of the first connection channel after the execution of the stop; 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 with the connection channel state being in an inactive state, and detecting the connection channel state (including the first connection channel and the second connection channel) after performing repair.
And 106, updating the connection channel state of the cloud host in the database according to the connection channel state.
I.e. updating the connection channel status of the cloud host in the database based on the detected connection channel status. To update the connection channel state of the cloud host in real time.
According to the embodiment of the invention, the connection channel of the cloud host is managed, the state of the connection channel of the cloud host is updated, the phenomenon that the cloud host cannot work due to the abnormal connection channel is avoided, and the efficiency of managing operation and maintenance of the cloud host is improved.
If the cloud host channel management instruction is a cloud host connection channel status checking instruction, the cloud host management method is as shown in fig. 2a, and includes the following steps:
101a, when a cloud host connection channel state checking instruction is received, acquiring cloud host identification information to be checked according to the connection channel state checking instruction.
Cloud host information is displayed on a graphical user interface provided by the management monitoring platform, and a cloud host to be checked can be determined through the graphical user interface provided by the management monitoring platform. For example, there is a selection box before each cloud host information, and by clicking the selection box, it is determined that the cloud host is the cloud host to be inspected. It will be appreciated 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 inspected, for example, a search expression: an anyw state is complete; an anyx state; OS type, liunex, windows, means checking the anyw state and the anyx state of all cloud hosts of the OS type Liunex, windows. It will be appreciated that the condition search box is also provided on the graphical user interface, and the cloud host to be inspected is determined according to the selected search condition. It can be understood that, a corresponding operation control, for example, an "inspection" control, may be correspondingly provided in an area corresponding to each cloud host information display, and the cloud host connection channel inspection instruction may be triggered by triggering the "inspection" control in the area displaying the cloud host information, and the identification information of the corresponding cloud host may be obtained according to the connection channel inspection instruction. As particularly shown in fig. 3.
After the cloud host to be checked is determined, the identification information of the cloud host to be checked is acquired. The identification information of the cloud host is a unique identification (ins_id) of the machine.
102a, acquiring a cloud host identifier from cloud host identifier information to be checked.
For example, a cloud host identifier may be obtained from the identifier information of the cloud host to be inspected according to the sorting order. The cloud host identifier may also be obtained from the identifier information of the cloud host to be inspected according to other rules.
103a, detecting whether the acquired cloud host identification exists in the database.
If the acquired cloud host identifier exists in the database, executing step 104a; if the acquired cloud host identifier does not exist in the database, step 109a is performed.
104a, checking the connection channel state of the cloud host corresponding to the acquired cloud host identifier.
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 checking interface. The preset checking 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 checking interface detects whether a return result is received, if the preset checking interface receives the connection channel state corresponding to the return result, the connection channel state is a connected state (or is called an active state), and if the preset checking interface does not receive the return result, the corresponding connection channel state is a non-connected state (or is called an inactive state). For example, the preset checking interface sends a heartbeat packet through the first connection channel Xiang Yun host, and if a return result is received, the first connection channel state 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 a state of not being connected; the second connection channel is the same.
105a, judging whether the connection channel state of the cloud host is successfully checked.
If the server receives the checking result (including on and not on) returned by the preset checking interface, the connection channel state of the cloud host is determined to be checked successfully. If the detection result returned by the preset detection interface is not received, determining that the connection channel state of the cloud host is not successfully detected. If the connection channel state of the cloud host is successfully checked, executing step 106a; if the connection channel status of the cloud host is not successfully checked, step 109a is performed.
106a, updating the connection channel state of the cloud host in the database according to the connection channel state of the cloud host.
When updating the connection channel state of the cloud host in the database, the update time in the database needs to be modified.
107a, detecting whether the connection channel state of the cloud host is successfully updated.
For example, whether to successfully update the connection channel state of the cloud host can be detected through the prompt, and if no prompt occurs, the connection channel state of the cloud host is successfully updated; if the corresponding prompt appears, the updating of the connection channel state of the cloud host fails.
If the updating of the connection channel state of the cloud host is successful, the identification information of the cloud host is added to the checking success list, and then step 108a is executed; if the updating of the connection channel state of the cloud host fails, step 109a is performed.
108a, detecting whether the cloud host identification information to be checked is acquired.
If the acquisition is finished, ending; if the cloud host identification information to be checked is not acquired, step 102a is performed.
109a, adding the corresponding cloud host identity to the checking failure list.
The checking failure list and the checking success list can be recorded in the log file, and further, the cloud host information corresponding to the checking failure list and the checking success list is displayed on the graphical user interface, so that related 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 a 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 as shown in fig. 2b, and the cloud host management method includes the following steps:
101b, when receiving a cloud host connection channel updating instruction, acquiring cloud host identification information to be updated according to the connection channel updating instruction.
The connection channel update instruction updates agent client software in the cloud host.
The cloud host to be updated may be determined by on a graphical user interface provided by the management monitoring platform. For example, in the area where information of each cloud host is displayed, corresponding operation controls, for example, controls such as "anyx update", "anyx start", "anyx stop", "anyx repair", are correspondingly provided, and by triggering the "anyx update" control in the area where information of the cloud host is displayed, a cloud host connection channel update instruction is triggered, and identification information of the corresponding cloud host is obtained according to the connection channel update instruction. As shown in fig. 3. The corresponding search expression can also be input in a search expression input box on the graphical user interface, and the cloud host identification information to be updated is determined according to the search expression. The method can also select corresponding search conditions in a condition search box provided on a graphical user interface, and determine identification information of the cloud host to be updated according to the selected search conditions.
The corresponding cloud host identification information can be acquired according to the connection channel updating instruction, and the cloud host identification information can be one or a plurality of cloud host identification information. The identification information of the cloud host is a unique identification (ins_id) of the machine.
102b, detecting whether 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 104b; if the cloud host identification information to be updated does not exist in the database, step 103b is executed.
103b, prompting.
If the prompt is carried out in the dialog box or the corresponding color or the highlighting is displayed on the image user interface, the prompt is carried out, so that the operation and maintenance personnel can obtain the related information quickly, 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 updating result.
Specifically, the connection channel is set as a second connection channel, and the first connection channel is updated by calling a preset updating interface. For example, run-way, anyw (set connection channel as second connection channel), anyx_update (preset update interface). The preset updating interface generates 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 connection channel, and the first connection channel of the cloud host is updated. Updating the first connection channel of the cloud host, specifically, includes: downloading the agent client software of the newer version, uninstalling the agent client software installed previously on the cloud host, and installing the agent client software of the newer version on the cloud host. And returning an updating result of updating the first connection channel of the cloud host to a preset updating interface. The update result includes information about whether the update is successful or not, and information about the corresponding agent client software version after the update is successful.
105b, checking the updated first connection channel state of the cloud host.
Specifically, the first connection channel state of the cloud host is checked by calling the preset checking interface, and the detailed description is referred to above, which is not repeated here.
106b, updating the updated version and the first connection channel state corresponding to the first connection channel of the cloud host in the data according to the updating result and the first connection channel state.
The updated version corresponding to the first connection channel of the cloud host refers to a software version of the agent client corresponding to the cloud host after updating.
The embodiment further defines that when the cloud host channel management instruction is a cloud host connection channel update 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 as shown in fig. 2c, and the cloud host management method includes the following steps:
101c, when a cloud host connection channel starting instruction is received, acquiring cloud host identification information to be started according to the connection channel starting instruction.
The connection channel starting instruction corresponds to the starting instruction of the first connection channel.
Specifically, the cloud host identification information corresponding to the connection channel start instruction may be obtained in the same manner as the cloud host identification information corresponding to the connection channel update instruction is obtained in fig. 2 b. Please refer to the above description specifically, and the detailed description is omitted herein.
102c, detecting whether 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 104c; if there is no cloud host identification information to be started in the database, step 103c is executed.
103c, prompting.
And prompting to improve the operation and maintenance efficiency. The specific prompting manner is referred to the corresponding description above, and is not repeated here.
104c, starting a 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, run-way, an anyw (setting the connection channel as the second connection channel), an anyx_start (preset starting interface), the preset starting interface generates a job (task), the job is sent to the controller cluster, the controller cluster connects the cloud host corresponding to the cloud host identification information through the second connection channel, and the first connection channel of the cloud host is started. Specifically, after the controller cluster is connected with the cloud host corresponding to the cloud host identification information through the second connection channel, a starting instruction is sent to the cloud host, and the cloud host executes the starting instruction to start agent client software on the cloud host, so that the purpose of starting the first connection channel is achieved. And returning a starting result for starting the first connecting channel to a preset starting interface. The start-up results include unsuccessful start-up, successful start-up, etc.
105c, detecting a first connection channel state of the cloud host.
Specifically, the first connection channel state of the cloud host is checked by calling the preset checking interface, and the detailed description is referred to above, which is not repeated here.
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 when the cloud host connection channel is started as shown in fig. 2 c. 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 a cloud host connection channel repair instruction is received, acquiring cloud host identification information with a connection channel state being an inactive state.
Specifically, cloud host identification information with the connection channel state being inactive is screened from the database. The connection channel state being inactive includes the first connection channel state being inactive and the second connection channel state being inactive. And storing the cloud host identification information of which the first connection channel state is the inactive state into a first list, and storing the cloud host identification information of which the second connection channel state is the inactive state into a second list.
Prior to step 102d, the following may be performed: detecting whether cloud host identification information in an inactive state exists in the database, if yes, executing 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 setting the connection channel as a second connection channel for the cloud host with the inactive state of the first connection channel in the first list, and repairing the first connection channel by calling a preset repairing interface corresponding to the first connection channel. For example, run-way, anyw (set connection channel as second connection channel), anyx.repair (preset repair interface corresponding to first connection channel). The preset repairing interface corresponding to the first connecting channel generates an operation (task), the operation 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. Returning the repair result of the first connection channel to a preset repair interface corresponding to the first connection channel.
And setting the connection channel as a first connection channel for the cloud host with the inactive state of the second connection channel in the second list, and repairing the second connection channel by calling a preset repairing interface corresponding to the second connection channel. For example, run-way, anyx (set connection channel as first connection channel), anyw.repair (preset repair interface corresponding to second connection channel). And returning the repair result of the second connecting channel to a preset repair interface corresponding to the second connecting channel.
The repair result includes whether the repair is successful, the corresponding cause and repair mode of the repair.
103d, detecting the state of a connection channel of the cloud host.
Specifically, if the first connection channel is repaired, detecting a first connection channel state of the cloud host; and if the second connection channel is repaired, 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 a corresponding preset check interface, for example, the first connection channel state of the cloud host is checked by calling a preset check interface of the first connection channel, and the second connection channel state of the cloud host is checked by calling a preset check interface of the second connection channel. The specific details are described above, and are not repeated here.
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 restoration instruction, the first connection channel and the second connection channel of the cloud host are automatically restored, the state of the first connection channel and the state of the second connection channel are determined, the cloud host management operation and maintenance efficiency is improved, and the manual operation and maintenance cost is reduced.
The above embodiments illustrate specific methods of cloud host channel management in some management scenarios of cloud host channel management, and it is understood that these management scenarios are only examples. Cloud host channel management may also involve more management scenarios, which are not described herein.
The following will refer to managing cloud host information. According to the foregoing description, the cloud host platform may report the cloud host information to the server that manages the monitoring platform, and the controller cluster may also report the cloud host information to the server that manages the monitoring platform. In general, the cloud host information reported by the cloud host platform is received first, and then the cloud host information reported by the controller cluster is received, so that it can be understood that the IP is allocated first (there may be a change in the allocated IP), the corresponding entry IP is allocated when the IP is allocated, and after the controller cluster establishes a connection with the cloud host, the corresponding IP is a registered IP, where the registered IP is already a determined IP (the registered IP does not change, or can be understood as an IP that has been successfully allocated). In a database of the management monitoring platform, a machine unique identifier is used as a primary key, and all information of the related cloud host is recorded.
It can be understood that the cloud host information reported by the cloud service platform and the like cannot be guaranteed to be all correct information, but the server can automatically judge the reported cloud host information to determine whether data abnormality exists or not and mark the data abnormality, so that failure of executing the operation (task) is avoided, and the operation and maintenance efficiency is improved.
Therefore, before formally introducing the cloud host management method provided by the embodiment of the present invention, the situations of data anomalies in some cloud host information management are introduced, including: IP inconsistency, id inconsistency, IP duplication, unregistered, unsynchronized, whether tasks can be performed using IP, etc.
IP inconsistency: the entry IP and the registration IP of one record are inconsistent. For example, the seventh record in the table of fig. 3, the entry IP is 10.203.192.221 and the registration IP is 10.203.192.206.
id is inconsistent: two records, one with an entry IP and the other with a registration IP, are equal but the machine unique identification (ins_id) is not identical. For example, the third record and the fifth record in the table in fig. 3, where the third record has a registration IP of 10.203.192.219 and a machine unique identifier of 06GPDCD; the fifth record had an entry IP of 10.203.192.219 and a machine unique identifier of 2102312FLT10JC000053.
IP repetition: one IP is used by several machines, i.e. the registered IP and the entered IP corresponding to the unique identities of the different machines are the same. This situation exists reasonably in the case of public clouds, but private clouds do not exist for IP multiplexing. In the embodiment of the invention, private cloud is taken as an example for illustration, so that IP repetition does not exist. It should be noted that IP duplication is allowed in public clouds.
Unregistered: one record has no registered IP. This is typically the case for channel anomalies, where no cloud host information is actively reported.
Unsynchronized: the logging IP does not exist. Generally, other professional groups (such as a cloud host platform) do not push the cloud host information to a server, and synchronization is not performed at the moment; it is also the case that these machines are not built on the cloud, but are manually built off-line, in which case the cloud host information is not automatically sent to the server, which requires the server to be desynchronized.
In the case of the data anomaly exemplified above, the data anomaly may be marked with 1 if there is a corresponding anomaly, and the data anomaly may be marked with 0 if there is no corresponding anomaly, which will be described below. Other ways of marking may also be used. The above is merely an example of a few data anomalies, and it will be appreciated that other data anomalies exist.
Fig. 4 is a flow chart 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 procedures:
201, when a cloud host information management instruction is received, acquiring cloud host information to be managed according to the information management instruction.
The cloud host platform and the controller cluster send corresponding cloud host information to a server managing the monitoring platform. In some cases, for example, when cloud host information is newly added in the cloud host platform, the server is triggered to generate a cloud host information management instruction, such as a cloud host information newly added instruction, where the cloud host information newly added instruction includes newly added cloud host information, and the cloud host information is corresponding cloud host information. Understandably, when the cloud host platform newly adds the cloud host, a server managing the monitoring platform is triggered to newly add the cloud host information. Or it is understood that when the cloud host information is newly added in the cloud host platform, a cloud host information new instruction is simultaneously sent to the server, and the cloud host information new instruction carries the newly added cloud host information. Update and delete are the same. When the controller cluster receives the newly-added cloud host information sent by the agent client on the cloud host, the controller cluster also triggers the server to generate a cloud host information management instruction or sends the newly-added cloud host 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 cloud host information to be managed exists in a database.
And detecting whether a record corresponding to the cloud host information to be managed exists in the database according to the unique machine 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 queried from the database to determine whether a corresponding record exists. And if the record which is the same as the unique identification of the machine exists in the database, determining that the record corresponding to the acquired cloud host information exists.
If the database does not have the record corresponding to the acquired cloud host information, executing step 203; if there is a record corresponding to the acquired cloud host information in the database, step 207 is performed.
203, inquiring whether records of which the input IP or the registered IP is equal to the IP in the cloud host information to be managed exist in the database.
If the corresponding IP information is obtained from the cloud host information to be managed, whether records of the input IP and the registered IP equal to the IP to be managed exist or not is inquired in a database.
If there is no record of the input IP or the registered IP is equal to the IP in the cloud host information to be managed, executing 204; if there is a record that the entry IP or the registration IP is equal to the IP in the cloud host information to be managed, step 205 is performed.
And 204, determining an abnormal result of the data abnormality, and updating a database according to the abnormal result and cloud host information to be managed.
I.e. if there is no record of the entry IP or the registration IP equals the IP in the cloud host information to be managed, it means that there is no related record of the cloud host information to be managed in the database.
The abnormal result of the data abnormality includes: there is no IP inconsistency, no id inconsistency, no IP duplication, etc.; if the cloud host information to be managed is the cloud host information uploaded by the controller cluster, the cloud host information is not synchronized; if the cloud host information to be managed is the cloud host information uploaded by the cloud host platform, unregistered cloud host information exists.
The method for updating the database according to the abnormal result and the cloud host information to be managed comprises the following steps: and marking in the database according to the abnormal result, and updating (newly 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 inconsistent exists), the id inconsistent field as 0 (no id inconsistent exists), and the IP repeated field as 0 (no IP multiplexing exists); if the cloud host information to be managed is the cloud host information uploaded by the controller cluster, marking an unregistered field as 1 (unregistered exists) and an unsynchronized field as 0 (unsynchronized does not exist); if the cloud host information to be managed is the cloud host information uploaded by the cloud host platform, the unregistered field is marked as 0 (no unregistered exists), and the unsynchronized field is marked as 0 (no unsynchronized exists).
Further, the execution mode may also be marked. Specifically, the type of an operating system in cloud host information to be managed is obtained; if the type of the operating system is windows, marking an execution mode field run-way; if the operating system type is liunx, the execution mode run-way is anyx, anyw. It should be noted that, if the operating system is windows, because windows do not support to establish connection with the cloud host through the SSH manner, connection with the cloud host cannot be established through the SSH manner (an anyw channel), but connection with the cloud host only can be established through an anyx channel. It will be appreciated that if the operating system type is liunx, then a connection may be established with the cloud host through the anyw channel and the anyx channel.
Further, it is also possible to flag whether or not a job (task) can be executed using IP, for example, whether or not a job field is 0 using IP, that is, a job can be executed using IP.
205, obtaining the record number of the existing records, and determining whether the data is abnormal according to the record number to obtain an abnormal result.
Specifically, step 205 includes: if records of the input IP or the registered IP equal to the IP in the cloud host information to be managed exist, inquiring whether records of the input IP which is empty and the registered IP which is the IP in the cloud host information to be managed exist in a database or records of the input IP which is the IP in the cloud host information to be managed and the registered IP which is empty exist in the database; if the record exists (the record of which the input IP is empty and the registered IP is the IP in the cloud host information to be managed or the record of which the input IP is the IP in the cloud host information to be managed and the registered IP is empty), acquiring the second record number of the existing corresponding record and acquiring the first record number of the record of which the input IP or the registered IP is equal to the IP in the acquired cloud host information; subtracting the first record number from the second record number to obtain a subtraction result; determining whether data are abnormal according to the subtraction result to obtain an abnormal result; if the record is not present (the record that the input IP is null and the registered IP is the IP in the cloud host information to be managed or the record that the input IP is the IP in the cloud host information to be managed and the registered IP is null is not present), an abnormal result of the data abnormality is determined.
Determining whether there is an abnormality in the data according to the subtraction result to obtain an abnormality result, including: if the subtraction result is less than 1, meaning that no machine for determining the IP is found in the database, the anomaly result of the data anomaly includes: there is no IP inconsistency, there is an id inconsistency, there is no IP duplication, etc.; further, the execution mode is determined to be run-way, anyx, and tasks cannot be executed by using IP. It will be appreciated that, due to the inconsistent ids, there may be a case where the same IP is shared by a plurality of machines, and the IP cannot be used to execute a job (task), and the cloud host cannot be connected by using the SSH method, and the execution method is determined to be anyx.
If the subtraction result is not less than 1, which means that at least one of the IP in the database is the same as the IP to be managed, the abnormal result of the data abnormality includes: the existence of inconsistent ids, the existence of IP repetition and the like; further, the execution mode is determined to be run-way, anyx, and tasks cannot be executed by using IP. It will be appreciated that if there is IP duplication, problems may arise due to network group allocation IP.
If there is no record (there is no record that the entry IP is null and the registration IP is the IP in the cloud host information to be managed, or the entry IP is the IP in the cloud host information to be managed and the registration IP is null), determining an abnormal result of the data abnormality, including: the existence of inconsistent ids, the existence of IP repetition 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 (newly 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, the flag IP inconsistent field is 0, the id inconsistent field is 1, the IP repetition field is 0, the execution mode field is anyx, whether the IP execution task field can be used is 1, etc.; if the subtraction result is not less than 1, the tag id inconsistency field is 1, the IP repetition field is 1, the execution mode field is anyx, whether the IP execution task can be used is 1, etc.
If not (there is no record that the input IP is null and the registered IP is the IP in the cloud host information to be managed, or the input IP is the IP in the cloud host information to be managed and the registered IP is null), marking in the database according to the abnormal result, including: the tag id inconsistency field is 1, the IP repetition field is 1, the execution mode field is anyx, whether or not the IP execution task field can be used is 1, etc.
The foregoing steps 203 to 206 correspond to a corresponding flow of newly adding 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 newly-added instruction.
It should be noted that, in the above steps 203 to 206, the cloud host management method further includes: extracting cloud host information required by executing the job from cloud host information to be managed, and storing the cloud host information required by executing the job to a total Redis. The cloud host information required by the execution of the job is cached through the total Redis, and the required cloud host information is acquired from the cache when the job is executed, so that the speed of executing the job can be increased.
And 207, comparing the cloud host information to be managed with the cloud host information stored in the local database to determine whether data abnormality exists or not, and obtaining an abnormality result.
If a record corresponding to the cloud host information to be managed exists in the database, comparing the cloud host information to be managed with the cloud host information stored in the local database to determine whether data abnormality exists or not, and obtaining an abnormal result.
Specifically, step 207 includes: acquiring the IP of a cloud host in cloud host information to be managed, and matching the IP with the IP of a corresponding cloud host in a database; if the matching is successful (i.e. 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), the type of the operating system of the cloud host in the cloud host information to be managed is obtained, and the type of the operating system of the cloud host is compared with the type of the operating system of the corresponding cloud host in the database to obtain a comparison result; determining an abnormal result of the data abnormality according to the comparison result; if the matching is unsuccessful (i.e. 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, which can be understood as the IP of the cloud host needs to be updated), 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 each other or not so as to obtain a judging result; and determining an abnormal result of the data abnormality according to the judging result.
Determining an abnormal result of the data abnormality according to the comparison result, wherein the abnormal result comprises: if the type of the operating system of the cloud host to be managed is the same as the type of the operating system of the cloud host in the database, namely the comparison result is the same, the unique machine identifier, the IP, the operating system of the cloud host to be managed are the same as the corresponding cloud host in the record determined in the database; the anomaly result of the data anomaly is determined as: there is no IP inconsistency, no IP duplication, no id inconsistency, etc. (simply understood as no data anomalies). If the type of the operating system of the cloud host to be managed is different from the type of the operating system of the cloud host in the database, namely, the comparison result is different, which means that the unique machine identifier of the cloud host to be managed, the IP and the correspondence of the cloud host in the record determined in the database are the same, and the types of the operating systems are different (which can be understood as the type of the operating system of the cloud host needs to be updated); the anomaly result of the data anomaly is determined as: there is no IP inconsistency, no IP duplication, no id inconsistency, etc. (simply understood as no data anomalies).
If the matching is unsuccessful (i.e. 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, which may be understood as the IP of the cloud host needs to be updated), the corresponding entry IP and registration IP of the cloud host in the database are obtained, and whether the entry IP and registration IP are equal is determined, so as to obtain a determination result, including: if the matching is unsuccessful, 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 related information of the IP to be managed in the total Redis (which can be understood as deleting the related information of the IP not needed in the total Redis); if the total Redis does not have the IP to be managed, acquiring the input IP and the registered IP of the cloud host corresponding to the record determined by the database; judging whether the input IP and the registered IP are equal, wherein the judging result comprises the following steps: equal and unequal.
Determining an abnormal result of the data abnormality according to the judging result, wherein the abnormal result comprises: if the input IP and the registered IP are equal, which means that the unique machine identification of the cloud host to be managed is equal to the corresponding IP 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, the abnormal result of data abnormality is determined as follows: there is no IP inconsistency, no IP duplication, no id inconsistency, etc. (simply understood as no data anomalies). If the input IP and the registered IP are not equal, which means that the unique machine identification of the cloud host to be managed is equal to the corresponding IP 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 meanwhile, the input IP and the registered IP in the database are not equal, whether the IP is inconsistent is judged to be ignored or not; if the IP is ignored to be inconsistent, the corresponding cloud host information in the database is updated based on the IP in the cloud host to be managed, and further, whether the IP is repeated is determined according to the IP in the cloud host to be managed; if the IP is not ignored to be inconsistent, the corresponding cloud host information in the database is updated based on the registered IP in the database, and further, whether the IP is repeated is determined 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: 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 illustrated in step 207, if there is no data anomaly, no marking in the database is necessary. If it is determined that there is an IP duplication, a marking is required.
If the unique machine identifier, the IP, the operating system and the cloud host in the record determined in the database are all corresponding to the same, updating the database according to the information of the cloud host to be managed without updating the total Redis; if the unique machine identifier, IP (Internet protocol) 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 cloud host information to be managed, extracting the cloud host information for executing the operation in the cloud host information, and updating to the total Redis; if the unique machine identification of the cloud host to be managed is equal to the corresponding IP 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; updating a database according to cloud host information to be managed, extracting cloud host information for executing the job from the cloud host information, and updating to a total Redis; if the unique machine identification of the cloud host to be managed is equal to the corresponding IP in the database, the IP of the cloud host to be managed is unequal to the IP in the corresponding record in the database, and the input IP and the registered IP in the database are unequal, when the IP in the cloud host to be managed is determined to be on time, the database is updated according to the cloud host information to be managed, the cloud host information for executing the operation in the cloud host information is extracted, and the cloud host information is updated to the total Redis; if the unique machine identification of the cloud host to be managed is equal to the corresponding IP 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 input IP in the database is not equal to the registered IP in the database, when the registered IP in the database is determined to be the standard, the database is updated according to the information except the IP information in the cloud host information to be managed, the cloud host information for executing the operation in the cloud host information is extracted, and the cloud host information is updated to the total Redis.
The total Redis is updated in this step to ensure that the data held in the total Redis is up-to-date.
It should be noted that, the above steps 207 to 208 correspond to a corresponding flow 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 instruction is a cloud host information update instruction.
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 cloud host information to be deleted exists in a database; if not, prompting is carried out; if the cloud host information to be deleted exists, the corresponding cloud host information to be deleted stored in the region Redis is deleted; deleting a client corresponding to the first connection channel on the cloud host through the second connection channel, namely deleting agent client software; and executing the corresponding steps in the steps 207 to 208, wherein the updating is replaced by deleting, so as to delete the relevant information of the corresponding cloud host to be deleted in the total Redis and delete the cloud host information 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 cloud host information to be synchronized; detecting whether a record corresponding to 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 unique machine identifier exists in the cloud host information to be synchronized and the unique machine identifier does not exist in the database, executing the corresponding flow of the newly added cloud host information corresponding to the steps 203 to 206 to update the total Redis and the database; if the cloud host information to be synchronized has a corresponding unique machine identifier and the database also has a unique machine identifier, executing corresponding processes of updating the cloud host information corresponding to the steps 207 to 208 to update the total Redis and the database; if the corresponding unique machine identifier does not exist in the cloud host information to be synchronized and the corresponding unique machine identifier exists in the database, determining that the cloud host information in the database is abnormal, and marking.
In the embodiment of cloud host information management, the marks of the abnormal results of the abnormal data are displayed on the graphical user interface, so that the operation and maintenance of the cloud host are better realized, and the operation and maintenance experience and efficiency are improved.
In the embodiment for managing the cloud host information, the cloud host information to be managed is compared with the cloud host information stored in the database, whether data abnormality exists is determined according to the comparison result, and an abnormal result is obtained; and updating the database according to the abnormal result and the cloud host information to be managed. It can be understood that when the cloud host information to be managed in the embodiment of the invention is managed, functions such as adding, updating, deleting and synchronizing are realized, and meanwhile, the marking of abnormal data whether the abnormality exists is also realized, so that operation and maintenance can be conveniently performed by operation and maintenance personnel according to the marked abnormal data, 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 provided by an embodiment of the present invention. The cloud host management apparatus includes a first acquisition unit 301, a first detection unit 302, a first management unit 303, a state detection unit 304, and a first update unit 305.
The first obtaining unit 301 is configured to obtain, when receiving a cloud host channel management instruction, cloud host identification information to be managed according to the channel management instruction.
A first detection unit 302, configured to detect whether cloud host identification information to be managed exists in the local database.
The channel management unit 303 is configured to manage, if there is cloud host identification information to be managed, a connection channel of the cloud host according to a channel management instruction.
The state detection unit 304 is configured to detect a connection channel state of the cloud host.
The first updating unit 305 is configured to update the connection channel state of the cloud host in the database according to the connection channel state.
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 liquid crystal display device comprises a liquid crystal display device,
the second obtaining unit 401 is configured to obtain, when receiving the cloud host information management instruction, cloud host information to be managed according to the information management instruction.
The second detecting unit 402 is configured to detect whether a record corresponding to cloud host information to be managed exists in the database.
The anomaly determination unit 403 is configured to compare, if there is a record corresponding to the cloud host information to be managed, the cloud host information to be managed with the cloud host information stored in the database, so as to determine whether there is a data anomaly, and obtain an anomaly result.
And the second updating unit 404 is configured to update the database according to the abnormal result and the cloud host information to be managed.
Wherein, cloud host management device still includes: and deleting the unit. 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 a query unit. The query unit is configured to query whether a record corresponding to the cloud host information to be managed exists in the database, or whether a record with an entry IP or a registration 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 records of the records, and determine whether there is a data anomaly 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 involved in the embodiments of fig. 5 and fig. 6 described above.
It should be noted that, as those skilled in the art can clearly understand the specific implementation process and the achieved beneficial effects of the above device and each unit, reference may be made to the corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, no further description is given here.
The embodiment of the invention also provides a computer device, which integrates any one of the cloud host management methods provided by the embodiment of the invention, and the computer device comprises:
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 in the cloud host management method described in any of the cloud host management method embodiments above.
The embodiment of the invention also provides computer equipment which integrates any cloud host management device provided by the embodiment of the invention. As shown in fig. 7, a schematic structural diagram of a computer device according to an embodiment of the present invention is shown, specifically:
the computer device may include one or more processing cores 'processors 501, one or more computer-readable storage media's memory 502, a power supply 503, and an input unit 504, among other components. It will be appreciated by those skilled in the art that the computer device structure shown in the figures is not limiting of the computer device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The processor 501 is the control center of the computer device and uses various interfaces and lines to connect the various parts of the overall computer device, and by running or executing software programs and/or modules stored in the memory 502, and invoking data stored in the memory 502, performs various functions of the computer device and processes the data, thereby performing overall monitoring of the computer device. Optionally, processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily 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 executing the software programs and modules stored in the memory 502. The memory 502 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, 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 access to the memory 502 by the processor 501.
The computer device further includes a power supply 503 for powering the various components, and preferably the power supply 503 may be logically coupled to the processor 501 via a power management system such that functions such as charge, discharge, and power consumption management are performed by the power management system. The power supply 503 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 504, which input unit 504 may be used to receive input numeric or character information and to 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 or the like, which is not described herein. In particular, in this embodiment, the processor 501 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 502 according to the following instructions, and the processor 501 executes 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.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, 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, random Access Memory), magnetic or optical disk, and the like. And a computer program stored thereon, the computer program being loaded by a processor to perform the steps of any one of the cloud host management methods provided by the embodiments of the present invention. For example, the loading of the computer program by the processor may perform the steps corresponding to any of the embodiments of the cloud host management method described above.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and the portions of one embodiment that are not described in detail in the foregoing embodiments may be referred to in the foregoing detailed description of other embodiments, which are not described herein again.
In the implementation, each unit or structure may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit or structure may be referred to the foregoing method embodiments and will not be repeated herein.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The cloud host management method, the cloud host management device, the cloud host management computer device and the cloud host management storage medium provided by the embodiment of the invention are described in detail, and specific examples are applied to illustrate the principles and the implementation modes of the invention, and the description of the above embodiments is only used for helping to understand the method and the core ideas of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (10)

1. The cloud host management method is characterized by being applied to a server for managing a monitoring platform and comprising the following steps:
when a cloud host channel management instruction is received, acquiring cloud host identification information to be managed according to the channel management instruction;
detecting whether cloud host identification information exists in a database of the management monitoring platform;
if the cloud host identification information exists, managing a connection channel of the cloud host corresponding to the cloud host identification information according to the channel management instruction, wherein the connection channel of the cloud host comprises a connection channel between a cloud host on a cloud host platform and a controller server in a controller cluster, the connection channel comprises a first connection channel and a second connection channel, the first connection channel comprises a connection channel for establishing connection between a gateway service provided by the controller server and the cloud host, and the second connection channel comprises a connection channel for establishing connection between the cloud host and the controller server in a remote safe connection mode;
The step of managing the connection channel of the cloud host corresponding to the cloud host identification information includes: managing the first connection channel of the cloud host corresponding to the cloud host identification information and/or managing the second connection channel of the cloud host corresponding to the cloud host identification information;
detecting a connection channel state of the cloud host, wherein if management of the first connection channel is realized, the connection channel state of the first connection channel of the cloud host is detected; if the management of the second connection channel is realized, detecting the connection channel state of the second connection channel 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 managing the connection channel 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 instructions comprise connection channel repair instructions;
when receiving a cloud host channel management instruction, acquiring cloud host identification information to be managed according to the channel management instruction, including: when a connection channel repair instruction is received, acquiring cloud host identification information of which the connection channel state is an inactive state according to the connection channel repair instruction;
the managing the channels of the cloud hosts 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 or not, and obtaining an abnormality result;
and updating a database according to the abnormal result and the cloud host information to be managed.
5. The cloud host management method of claim 4, wherein said information management instructions comprise cloud host information deletion instructions; the connection channels corresponding to the cloud host comprise 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 said information management instruction comprises a cloud host information addition instruction; the cloud host management method further comprises the following steps:
if no record corresponding to the cloud host information to be managed exists in the database, inquiring whether record of the input IP or the registration IP equal to the IP in the cloud host information to be managed exists in the database;
If yes, acquiring the recorded number of the records, and determining whether data abnormality exists according to the recorded number to obtain an abnormal result;
and updating a database according to the abnormal result and the cloud host information to be managed.
7. The cloud host management method according to claim 4, wherein the comparing 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 includes:
acquiring the IP of a cloud host in cloud host information to be managed, and matching the IP with the IP of a corresponding cloud host in a database;
if the matching is successful, the type of the operating system of the cloud host in the cloud host information to be managed is obtained, and the type of the operating system of the cloud host is compared with the type of the operating system of the corresponding cloud host in the database, so that a comparison result is obtained;
determining an abnormal result of data abnormality according to the comparison result;
if the matching is unsuccessful, acquiring an input IP and a registered IP of a corresponding cloud host in a database, and judging whether the input IP and the registered IP are equal to each other or not so as to obtain a judging result;
and determining an abnormal result of the data abnormality according to the judging result.
8. A cloud host management apparatus, comprising:
the first acquisition unit is used for acquiring cloud host identification information to be managed according to the channel management instruction when receiving the cloud host channel management instruction;
the first detection unit is used for detecting whether the cloud host identification information exists in the 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, wherein the connection channel of the cloud host comprises a connection channel between the cloud host on a cloud host platform and a controller server in a controller cluster, the connection channel comprises a first connection channel and a second connection channel, the first connection channel comprises a connection channel for establishing connection between a gateway service provided by the controller server and the cloud host, and the second connection channel comprises a connection channel for establishing connection between the cloud host and the controller server in a remote secure connection mode;
the first management unit is configured to manage the first connection channel of the cloud host corresponding to the cloud host identification information and/or manage the second connection channel of the cloud host corresponding to the cloud host identification information;
The state detection unit is used for detecting the channel state of the cloud host, wherein if the management of the first connection channel is realized, the connection channel state of the first connection channel of the cloud host is detected; if the management of the second connection channel is realized, detecting the connection channel state of the second connection channel 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, the computer device comprising:
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 hosting method of any of claims 1 to 7.
10. A computer storage medium having stored thereon a computer program, 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.
CN202010180973.3A 2020-03-16 2020-03-16 Cloud host management method and device, computer equipment and storage medium Active CN113407403B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010180973.3A CN113407403B (en) 2020-03-16 2020-03-16 Cloud host management method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010180973.3A CN113407403B (en) 2020-03-16 2020-03-16 Cloud host management method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113407403A CN113407403A (en) 2021-09-17
CN113407403B true CN113407403B (en) 2023-04-25

Family

ID=77676335

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010180973.3A Active CN113407403B (en) 2020-03-16 2020-03-16 Cloud host management method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113407403B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899518A (en) * 2017-02-27 2017-06-27 腾讯科技(深圳)有限公司 A kind of method for processing resource and device based on Internet data center
CN109218349A (en) * 2017-06-29 2019-01-15 北京微影时代科技有限公司 A kind of method and device of management server cluster
CN109560835A (en) * 2019-01-14 2019-04-02 广州供电局有限公司 Power communication multi-channel testing method, apparatus, computer equipment and storage medium
CN109995564A (en) * 2017-12-31 2019-07-09 中国移动通信集团辽宁有限公司 Automatically the method, apparatus, equipment and medium of maintenance port are opened

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202798798U (en) * 2012-07-17 2013-03-13 江西省电力公司信息通信分公司 High availability system based on cloud computing technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106899518A (en) * 2017-02-27 2017-06-27 腾讯科技(深圳)有限公司 A kind of method for processing resource and device based on Internet data center
CN109218349A (en) * 2017-06-29 2019-01-15 北京微影时代科技有限公司 A kind of method and device of management server cluster
CN109995564A (en) * 2017-12-31 2019-07-09 中国移动通信集团辽宁有限公司 Automatically the method, apparatus, equipment and medium of maintenance port are opened
CN109560835A (en) * 2019-01-14 2019-04-02 广州供电局有限公司 Power communication multi-channel testing method, apparatus, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113407403A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
CN108234170B (en) Monitoring method and device for server cluster
US20080263217A1 (en) Connection control in thin client system
CN109697109B (en) Method, system, device and storage medium for distinguishing and identifying conflict virtual machines
JP2011013729A (en) Virtual machine management program and method for managing virtual machine
CN101079881B (en) A quick login system and method
CN109408310B (en) Debugging method of server, server and readable storage medium
CN109697078B (en) Repairing method of non-high-availability component, big data cluster and container service platform
CN110838953A (en) Test method, test system, electronic equipment and storage medium
CN114185577A (en) Configuration management system, configuration management method, server, and storage medium
JP2012069088A (en) Medical information processor and software distribution system
CN111464603A (en) Server capacity expansion method and system
CN111506358A (en) Method and device for updating container configuration
CN113535262A (en) Method, device, equipment and storage medium for controlling starting of proxy node
CN111831567B (en) Application test environment configuration method, device, system and medium
CN113407403B (en) Cloud host management method and device, computer equipment and storage medium
CN116225832A (en) Automatic detection method, storage medium and equipment for automatic deployment of database cluster
CN114598604B (en) Monitoring method, monitoring device and terminal for virtual network function instance information
CN112181785B (en) Method, terminal and storage medium for automatically adding monitoring equipment
KR20160049568A (en) System and method for comparing and managing source code
CN111600751B (en) Data center management method and system
CN114764379A (en) Access switching method and device for application software and computer readable storage medium
CN111324374B (en) Application program registration method and device based on application performance management system
CN112667512A (en) Data drive test method, device, equipment and computer readable storage medium
WO2003003244A1 (en) Method of rapidly eliminating different information in databases
JP2015103827A (en) Management device, method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant