CN111679885B - Method, device, medium and electronic equipment for determining virtual machine drift - Google Patents

Method, device, medium and electronic equipment for determining virtual machine drift Download PDF

Info

Publication number
CN111679885B
CN111679885B CN202010477904.9A CN202010477904A CN111679885B CN 111679885 B CN111679885 B CN 111679885B CN 202010477904 A CN202010477904 A CN 202010477904A CN 111679885 B CN111679885 B CN 111679885B
Authority
CN
China
Prior art keywords
virtual machine
address
network traffic
drift
data
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
CN202010477904.9A
Other languages
Chinese (zh)
Other versions
CN111679885A (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.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group 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 Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN202010477904.9A priority Critical patent/CN111679885B/en
Publication of CN111679885A publication Critical patent/CN111679885A/en
Application granted granted Critical
Publication of CN111679885B publication Critical patent/CN111679885B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects

Abstract

The invention provides a method for determining virtual machine drift, each virtual machine is provided with an application system, and the method comprises the following steps: acquiring network traffic of an application system in a preset time period; analyzing the network traffic to obtain the IP in the network traffic, and if the IP address in the network traffic is matched with the IP address configured by each virtual machine, indicating that each virtual machine does not drift; or if no IP address of the IP addresses in the network flow is configured with the virtual machine, the virtual machine is indicated to drift, and the virtual machine with drift can be rapidly and accurately determined in this way. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved. The invention also provides a device for determining the drifting of the virtual machine, a medium and electronic equipment.

Description

Method, device, medium and electronic equipment for determining virtual machine drift
Technical Field
The invention relates to the technical field of data processing, in particular to a method, a device, a medium and electronic equipment for determining virtual machine drift.
Background
At present, as an application operation and maintenance person, due to the operation and maintenance working property of a system, the accuracy of data of an application monitoring system needs to be ensured, and the operation state of the application system can be monitored normally. However, as the server monitored by the application monitoring system often generates a virtual machine drifting phenomenon, the data of the application monitoring system is inaccurate, when the situation occurs, an operation and maintenance person is always unaware, and only can frequently log in the application monitoring system and the database manually, and then the data result is compared manually, so that a great deal of time is wasted, the labor is repeated, the labor cost is increased, and the accuracy of the result obtained by manually determining whether the virtual machine drifts is lower.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the invention and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a method, a device, a medium and electronic equipment for determining virtual machine drift, so that the virtual machine drift can be determined at least to a certain extent without manual intervention, the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved. And determining whether each virtual machine drifts according to the IP address in the network traffic and/or determining whether each virtual machine drifts according to the data in the network traffic, so that the drifted virtual machine can be rapidly and accurately determined.
Other features and advantages of the invention will be apparent from the following detailed description, or may be learned by the practice of the invention.
According to a first aspect of an embodiment of the present invention, there is provided a method for determining virtual machine drift, each virtual machine having an application system deployed therein, the method comprising: acquiring network traffic of the application system in a preset time period; analyzing the network traffic to obtain an IP address in the network traffic; if the IP address in the network flow is matched with the IP address configured by each virtual machine, the virtual machines are indicated to have no drift; or if no IP address of the IP addresses in the network traffic is configured by a certain virtual machine, the virtual machine is indicated to drift.
In some embodiments of the invention, the method further comprises: analyzing the network traffic to obtain data in the network traffic; and determining whether each virtual machine drifts according to the data in the network traffic.
In some embodiments of the invention, the method further comprises: writing the data of the application system into a production environment database in real time; and acquiring data received in the preset time period in the production environment database through a data query script.
In some embodiments of the invention, determining whether each virtual machine has drifted based on data in the network traffic comprises: matching the data in the network traffic with the data received in the preset time period in the production environment database; and determining whether each virtual machine drifts according to the matching result.
In some embodiments of the present invention, determining whether each virtual machine has drifted according to the matching result includes: if the data in the network flow and the data received in the production environment database within the preset time period are the same or similar, indicating that each virtual machine does not drift; or if the difference value between the data in the network traffic and the data received in the production environment database within the preset time period is greater than or equal to a preset threshold value, indicating that a drifting virtual machine exists in the plurality of virtual machines.
In some embodiments of the present invention, the IP address in the network traffic is a destination IP address in the network traffic, and the data in the network traffic is data related to the application system.
In some embodiments of the invention, the method further comprises: and if a certain virtual machine drifts, sending prompt information.
According to a second aspect of an embodiment of the present invention, there is provided a device for determining virtual machine drift, each virtual machine having an application system deployed therein, the method comprising: the first acquisition module is used for acquiring the network traffic of the application system in a preset time period; the first analysis module is used for analyzing the network traffic to obtain an IP address in the network traffic; the first matching module is used for indicating that each virtual machine does not drift if the IP address in the network flow is matched with the IP address configured by each virtual machine; or if no IP address of the IP addresses in the network traffic is configured by a certain virtual machine, the virtual machine is indicated to drift.
In some embodiments of the invention, the apparatus further comprises: the second analysis module is used for analyzing the network traffic to obtain data in the network traffic; and the determining module is used for determining whether each virtual machine drifts according to the data in the network traffic.
In some embodiments of the invention, the apparatus further comprises: the writing module is used for writing the data of the application system into a production environment database in real time; and the second acquisition module is used for acquiring the data received in the preset time period in the production environment database through a data query script.
In some embodiments of the present invention, the determining module includes: the second matching module is used for matching the data in the network traffic with the data received in the preset time period in the production environment database; and the drift determining module is used for determining whether each virtual machine drifts according to the matching result.
In some embodiments of the invention, the drift determination module is configured to: if the data in the network flow and the data received in the production environment database within the preset time period are the same or similar, indicating that each virtual machine does not drift; or if the difference value between the data in the network traffic and the data received in the production environment database within the preset time period is greater than or equal to a preset threshold value, indicating that a drifting virtual machine exists in the plurality of virtual machines.
In some embodiments of the present invention, the IP address in the network traffic is a destination IP address in the network traffic, and the data in the network traffic is data related to the application system.
In some embodiments of the invention, the apparatus further comprises: and the sending module is used for sending prompt information if a certain virtual machine drifts.
According to a third aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; and storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of determining virtual machine drift as described in the first aspect of the embodiments above.
According to a fourth aspect of embodiments of the present invention, there is provided a computer readable medium having stored thereon a computer program which when executed by a processor implements a method of determining virtual machine drift as described in the first aspect of the above embodiments.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
according to the technical scheme provided by the embodiments of the invention, the network traffic of the application system in a preset time period is obtained, the network traffic is analyzed to obtain the IP address in the network traffic and/or the data in the network traffic, then whether each virtual machine drifts or not is determined according to the IP address in the network traffic, and/or whether each virtual machine drifts or not is determined according to the data in the network traffic, so that the drifted virtual machine can be rapidly and accurately determined. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is evident that the drawings in the following description are only some embodiments of the present invention and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 illustrates a schematic diagram of an exemplary system architecture for determining a virtual machine drift method or determining a virtual machine drift device to which embodiments of the present invention may be applied;
FIG. 2 schematically illustrates a flow chart of a method of determining virtual machine drift according to an embodiment of the invention;
FIG. 3 schematically illustrates a flow chart of a method of determining virtual machine drift in accordance with another embodiment of the invention;
FIG. 4 schematically illustrates a flow chart of a method of determining virtual machine drift in accordance with another embodiment of the invention;
FIG. 5 schematically illustrates a block diagram of a means for determining virtual machine drift according to an embodiment of the present invention;
FIG. 6 schematically illustrates a block diagram of a means for determining virtual machine drift in accordance with another embodiment of the present invention;
FIG. 7 schematically illustrates a block diagram of a means for determining virtual machine drift in accordance with another embodiment of the present invention;
FIG. 8 schematically illustrates a block diagram of a means for determining virtual machine drift according to another embodiment of the present invention;
FIG. 9 illustrates a block diagram of a means for determining virtual machine drift in accordance with another embodiment of the present invention;
FIG. 10 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
FIG. 1 illustrates a schematic diagram of an exemplary system architecture for determining a virtual machine drift method or determining a virtual machine drift device to which embodiments of the present invention may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server 105 may be a server cluster formed by a plurality of servers.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. The terminal devices 101, 102, 103 may be various electronic devices with display screens including, but not limited to, smartphones, tablet computers, portable computers, desktop computers, and the like.
The server 105 may be a server providing various services. For example, the server 105 may monitor an interaction process between the terminal device 103 (or the terminal device 101 or 102) and an application system in the virtual machine, where the server 105 may obtain network traffic when the terminal device 103 (or the terminal device 101 or 102) interacts with the application system, for example, obtain network traffic of the application system in a preset period of time, analyze the network traffic to obtain an IP address in the network traffic and/or data in the network traffic, determine whether each virtual machine drift according to the IP address in the network traffic, and/or determine whether each virtual machine drift according to the data in the network traffic, so that the drifting virtual machine can be quickly and accurately determined. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved. The invention also provides a device for determining the drifting of the virtual machine, a medium and electronic equipment.
In some embodiments, the method for determining virtual machine drift provided by the embodiments of the present invention is generally performed by the server 105, and accordingly, the determining virtual machine drift device is generally disposed in the server 105. In other embodiments, some terminals may have similar functions as servers to perform the method. Therefore, the method for determining the virtual machine drift provided by the embodiment of the invention is not limited to be executed at the server side.
Fig. 2 schematically shows a flow chart of a method of determining virtual machine drift according to an embodiment of the invention.
As shown in fig. 2, the method of determining virtual machine drift may include steps S210 to S230.
In step S210, network traffic of the application system in a preset time period is obtained.
In step S220, the network traffic is analyzed to obtain an IP address in the network traffic.
In step S230, if the IP address in the network traffic matches the configured IP address of each virtual machine, it indicates that each virtual machine has not drifted; or if no IP address of the IP addresses in the network traffic is configured by a certain virtual machine, the virtual machine is indicated to drift.
According to the method, network traffic of an application system in a preset time period can be obtained, the network traffic is analyzed to obtain an IP address in the network traffic, and then if the IP address in the network traffic is matched with the IP address configured by each virtual machine, the fact that each virtual machine does not drift is indicated; or if no IP address of the IP addresses in the network flow is configured with the virtual machine, the virtual machine is indicated to drift, and the virtual machine with drift can be rapidly and accurately determined in this way. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved.
In one embodiment of the invention, an application system is deployed on each virtual machine, which the user can access on the terminal. For example, a user may use a terminal to send a request to an application system, thereby enabling interaction between the terminal and the application system. In this embodiment, the interaction process between the application system and the terminal may be monitored in real time. For example, network traffic between the terminal and the application system may be monitored. The network traffic may comprise any one or more of the following: source IP address, destination IP address, port number, and data in the request.
In one embodiment of the present invention, the method further comprises: analyzing the network traffic to obtain data in the network traffic; according to the data in the network traffic, whether each virtual machine drifts or not is determined, and the drifting virtual machines can be rapidly and accurately determined in the mode, so that whether each virtual machine drifts or not can be determined based on the IP address in the network traffic, whether each virtual machine drifts or not can be determined according to the data in the network traffic, and the determination mode is more flexible and accurate.
In one embodiment of the present invention, the network traffic of the application system in the preset time period is obtained through a preset data verification program, and the network traffic can be used for subsequent determination of virtual machine drift. The network traffic may comprise any one or more of the following: source IP address, destination IP address, port number, and data in the request. In this embodiment, the destination IP address and/or data in the network traffic may be used to subsequently determine virtual machine drift.
In one embodiment of the invention, the network traffic is analyzed to obtain the IP address in the network traffic and/or the data in the network traffic. For example, after network traffic is acquired within a preset period of time, the network traffic may be analyzed to acquire content in the network traffic, e.g., an IP address in the network traffic and/or data in the network traffic. In this embodiment, the IP address in the network traffic is the destination IP address. The data in the network traffic may be data related to the application system, such as, but not limited to, merchandise data, application data, user data, and the like.
In one embodiment of the invention, it is determined whether each virtual machine is drifting based on data in the network traffic. For example, the data in the network traffic and the data received in the preset time period in the environment database are matched, whether each virtual machine drifts or not is determined according to the matching result, and the drifting virtual machines can be rapidly and accurately determined in the mode, so that whether each virtual machine drifts or not can be determined based on the IP address in the network traffic, whether each virtual machine drifts or not can be determined according to the data in the network traffic, and the determination mode is more flexible and accurate. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved.
In one embodiment of the invention, it is determined whether each virtual machine is drifting based on the IP address in the network traffic. For example, the IP address in the network traffic and the configured IP address of each virtual machine are matched, and whether each virtual machine drifts or not is determined according to the matching result. For example, determining whether each virtual machine has drifted according to the matching result includes indicating that each virtual machine has not drifted if the IP address in the network traffic matches the IP address for which each virtual machine is configured; or if no IP address of a certain virtual machine is configured in the IP addresses in the network traffic, the virtual machine is indicated to drift, and the virtual machine with drift can be rapidly and accurately determined in the mode. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved.
In one embodiment of the invention, the IP address in the network traffic may be the destination IP address carried in the request by the terminal. The IP address where each virtual machine is configured may be an IP configured in advance for each virtual machine. For example, the application monitoring system monitors the application systems in 5 virtual machines, and each virtual machine is configured with an IP address of A, B, C, D, E. When the destination IP address carried in the terminal request contains A, B, C, D, E, it indicates that there is no virtual machine that has drifted out of the 5 virtual machines. Conversely, when the destination IP address carried in the terminal request does not contain one or more of A, B, C, D, E, it indicates that there is a drifting virtual machine among the 5 virtual machines.
In one embodiment of the present invention, the method may further include: if a certain virtual machine drifts, prompt information is sent, so that operation and maintenance personnel can be timely informed of resetting the drifted virtual machine, data loss is effectively avoided, data flow correctness of an application monitoring system is guaranteed, safety and accuracy of monitoring data are guaranteed, repeated workload of manual operation is reduced, and operation and maintenance efficiency is improved. For example, when the operation and maintenance personnel receive the prompt information, the configuration of the application monitoring system can be verified and modified, so that the influence caused by the drift of the virtual machine can be eliminated in time.
Fig. 3 schematically shows a flow chart of a method of determining virtual machine drift according to another embodiment of the invention.
As shown in fig. 3, the above method further includes steps S310 and S320.
In step S310, the data of the application system is written into the production environment database in real time.
In step S320, data received in the production environment database during the preset time period is acquired through a data query script.
The method can write the data of the application system into the production environment database in real time, and then acquire the data received in the production environment database in the preset time period through the data query script, so that the data received in the production environment database in the preset time period can be used for determining the virtual machine drift subsequently.
In one embodiment of the present invention, when a user interacts with the application system using a terminal, the method according to the present invention may write data of the application system into a production environment database in real time, and then acquire data received in the production environment database within the preset time period through a data query script, so that the data received in the production environment database within the preset time period may be used for subsequent determination of virtual machine drift.
In one embodiment of the invention, data received in a production environment database over a preset period of time is obtained. And acquiring the network traffic of the application system in a preset time period. In this embodiment, the preset time periods of both are the same, for example, the preset time period may be set to 1 hour, 2 hours, or the like, and specifically may be set according to actual situations.
Fig. 4 schematically shows a flow chart of a method of determining virtual machine drift according to another embodiment of the invention.
As shown in fig. 4, determining whether each virtual machine has drifted according to the data in the network traffic may include steps S410 to S420.
In step S410, the data in the network traffic and the data received in the production environment database during the preset time period are matched.
In step S420, it is determined whether each virtual machine drifts according to the matching result.
The method can match the data in the network flow with the data received in the preset time period in the environment database, and determine whether each virtual machine drifts according to the matching result, so that the drifting virtual machine can be rapidly and accurately determined. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved.
In one embodiment of the present invention, determining whether each virtual machine has drifted according to the matching result may include: if the data in the network flow and the data received in the production environment database within the preset time period are the same or similar, indicating that each virtual machine does not drift; or if the difference value between the data in the network traffic and the data received in the production environment database within the preset time period is greater than or equal to a preset threshold value, indicating that a drifting virtual machine exists in the plurality of virtual machines.
In one embodiment of the present invention, the data in the network traffic and the data received in the above-described preset time period in the production environment database may be commodity data, application data, user data, or the like, but is not limited thereto. Taking the application data as an example, the application data may be, for example, the number of policies. The data in the network traffic may be the number of policies monitored in a preset time period, and the data received in the preset time period in the environment database may be the number of policies written in the environment database in real time when the terminal interacts with the application system. And when the number of the insurance policies in the network traffic is smaller than the number of the insurance policies in the production environment database and the difference between the number of the insurance policies in the network traffic and the number of the insurance policies in the production environment database is larger than or equal to a preset threshold value, indicating that a plurality of virtual machines in monitoring have virtual machines with drifting. In contrast, when the number of policies in the network traffic is the same or similar to the number of policies in the production environment database, it indicates that there are no virtual machines that drift among the multiple virtual machines under monitoring.
In one embodiment of the present invention, the method for determining the drifting of the virtual machine described in fig. 2 to fig. 4 may be selectively executed at intervals, so that it is possible to discover which virtual machine drifts in time, thereby avoiding data loss of the application monitoring system.
Fig. 5 schematically shows a block diagram of a means for determining virtual machine drift according to an embodiment of the invention.
As shown in fig. 5, the determining virtual machine drift apparatus 200 includes a first obtaining module 210, a first analyzing module 220, and a first matching module 230.
Specifically, the first obtaining module 210 is configured to obtain network traffic of the application system in a preset period of time.
The first analysis module 220 is configured to analyze the network traffic to obtain an IP address in the network traffic.
A first matching module 230, if the IP address in the network traffic matches the configured IP address of each virtual machine, indicating that each virtual machine has not drifted; or if no IP address of the IP addresses in the network traffic is configured by a certain virtual machine, the virtual machine is indicated to drift.
The virtual machine drifting device 200 can acquire the network traffic of the application system in a preset time period, analyze the network traffic to obtain an IP address in the network traffic, and then indicate that each virtual machine does not drift if the IP address in the network traffic is matched with the IP address configured by each virtual machine; or if no IP address of the IP addresses in the network flow is configured with the virtual machine, the virtual machine is indicated to drift, and the virtual machine with drift can be rapidly and accurately determined in this way. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved.
According to an embodiment of the present invention, the virtual machine drift determining apparatus 200 may be used to implement the virtual machine drift determining method described in the embodiment of fig. 2.
Fig. 6 schematically shows a block diagram of a means for determining virtual machine drift according to another embodiment of the invention.
As shown in fig. 6, the above-mentioned virtual machine drift determining apparatus 200 further includes a writing module 240 and a second obtaining module 250.
Specifically, the writing module 240 is configured to write the data of the application system into the production environment database in real time.
And the second obtaining module 250 is configured to obtain, through a data query script, data received in the production environment database during the preset time period.
The virtual machine drift determining device 200 may write the data of the application system into the production environment database in real time, and then obtain the data received in the production environment database in the preset time period through the data query script, so that the data received in the production environment database in the preset time period may be used for determining the virtual machine drift subsequently.
According to an embodiment of the present invention, the virtual machine drift determining apparatus 200 may be used to implement the virtual machine drift determining method described in the embodiment of fig. 3.
Fig. 7 schematically shows a block diagram of a means for determining virtual machine drift according to another embodiment of the invention.
As shown in fig. 7, the above-mentioned virtual machine drift determining apparatus 200 further includes a second analyzing module 260 and a determining module 270.
Specifically, the second analysis module 260 is configured to analyze the network traffic to obtain data in the network traffic.
A determining module 270 is configured to determine whether each virtual machine drift according to the data in the network traffic.
The device 200 for determining the drifting of the virtual machines analyzes the network traffic to obtain data in the network traffic, determines whether each virtual machine drifts according to the data in the network traffic, and can rapidly and accurately determine the drifting virtual machine in the manner, so that the method for determining the drifting virtual machine not only can determine whether each virtual machine drifts based on the IP address in the network traffic, but also can determine whether each virtual machine drifts according to the data in the network traffic, and the determination manner is more flexible and accurate.
Fig. 8 schematically shows a block diagram of a means for determining virtual machine drift according to another embodiment of the invention.
As shown in fig. 8, the above-described determination module 270 includes a second matching module 271 and a drift determination module 272.
Specifically, the second matching module 271 is configured to match data in the network traffic with data received in the production environment database during the preset time period.
The drift determining module 272 is configured to determine whether each virtual machine drift according to the matching result.
The determining module 270 can match the data in the network traffic with the data received in the preset time period in the environment database, and determine whether each virtual machine drifts according to the matching result, so that the drifting virtual machine can be quickly and accurately determined. And the virtual machine drift is determined without manual intervention to a certain extent, so that the labor cost is reduced, a large number of repeated operation and maintenance works are avoided, and the operation and maintenance work efficiency is improved.
The determination module 270 may be used to implement the method of determining virtual machine drift described in the embodiment of fig. 4, according to an embodiment of the present invention.
In some embodiments of the invention, the drift determination module 272 is configured to: if the data in the network flow and the data received in the production environment database within the preset time period are the same or similar, indicating that each virtual machine does not drift; or if the difference value between the data in the network traffic and the data received in the production environment database within the preset time period is greater than or equal to a preset threshold value, indicating that a drifting virtual machine exists in the plurality of virtual machines.
Fig. 9 is a block diagram illustrating a means for determining virtual machine drift according to another embodiment of the present invention.
As shown in fig. 9, the above-mentioned virtual machine drift determining device 200 further includes a sending module 280.
Specifically, the sending module 280 sends the hint information if a certain virtual machine drift occurs.
If a certain virtual machine in the determined virtual machine drifting device 200 drifts, prompt information is sent, and an operation and maintenance person can be timely informed of resetting the drifting virtual machine, so that data loss is effectively avoided, data flow correctness of an application monitoring system is guaranteed, safety and accuracy of monitoring data are guaranteed, repeated workload of manual operation is reduced, and operation and maintenance efficiency is improved. For example, when the operation and maintenance personnel receive the prompt information, the configuration of the application monitoring system can be verified and modified, so that the influence caused by the drift of the virtual machine can be eliminated in time.
Since each module of the virtual machine drift determining apparatus 200 according to the exemplary embodiment of the present invention may be used to implement the steps of the exemplary embodiments of the virtual machine drift determining method described in the foregoing 2 to fig. 4, for details not disclosed in the embodiments of the apparatus according to the present invention, please refer to the embodiments of the virtual machine drift determining method described in the foregoing embodiments of the present invention.
It is understood that the first acquisition module 210, the first analysis module 220, the first matching module 230, the writing module 240, the second acquisition module 250, the second analysis module 260, the determination module 270, the second matching module 271, the drift determination module 272, and the transmission module 280 may be combined in one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the invention, at least one of the first acquisition module 210, the first analysis module 220, the first matching module 230, the writing module 240, the second acquisition module 250, the second analysis module 260, the determination module 270, the second matching module 271, the drift determination module 272, and the sending module 280 may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or any other reasonable manner of integrating or packaging circuitry, or any other suitable combination of hardware, and firmware implementations. Alternatively, at least one of the first acquisition module 210, the first analysis module 220, the first matching module 230, the writing module 240, the second acquisition module 250, the second analysis module 260, the determination module 270, the second matching module 271, the drift determination module 272, and the transmission module 280 may be at least partially implemented as a computer program module, which may perform the functions of the respective modules when the program is run by a computer.
Referring now to FIG. 10, a schematic diagram of a computer system 300 suitable for use in implementing an electronic device of an embodiment of the present invention is shown. The computer system 300 of the electronic device of fig. 10 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
As shown in fig. 10, the computer system 300 includes a Central Processing Unit (CPU) 301 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage section 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the system operation are also stored. The CPU 301, ROM 302, and RAM 303 are connected to each other through a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The following components are connected to the I/O interface 305: an input section 306 including a keyboard, a mouse, and the like; an output portion 307 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 308 including a hard disk or the like; and a communication section 309 including a network interface card such as a LAN card, a modem, or the like. The communication section 309 performs communication processing via a network such as the internet. The drive 310 is also connected to the I/O interface 305 as needed. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 310 as needed, so that a computer program read therefrom is installed into the storage section 308 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 309, and/or installed from the removable medium 311. The above-described functions defined in the system of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 301.
The computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
As another aspect, the present application also provides a computer-readable medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the method of determining virtual machine drift as described in the above embodiments.
For example, the electronic device may implement the method as shown in fig. 2: in step S210, network traffic of the application system in a preset time period is obtained. In step S220, the network traffic is analyzed to obtain an IP address in the network traffic. In step S230, if the IP address in the network traffic matches the configured IP address of each virtual machine, it indicates that each virtual machine has not drifted; or if no IP address of the IP addresses in the network traffic is configured by a certain virtual machine, the virtual machine is indicated to drift.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a touch terminal, or a network device, etc.) to perform the method according to the embodiments of the present application.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (9)

1. A method of determining virtual machine drift, wherein an application system is deployed in each virtual machine, the method comprising:
acquiring network traffic of the application system in a preset time period;
analyzing the network traffic to obtain an IP address in the network traffic;
if the IP address in the network flow is matched with the IP address configured by each virtual machine, the virtual machines are indicated to have no drift; or if no IP address of the IP address in the network flow is configured by a certain virtual machine, indicating that the virtual machine drifts;
the IP address in the network flow is a destination IP address carried in a terminal request, and the IP address configured by each virtual machine is an IP address configured for each virtual machine in advance;
the terminal request is a request initiated by the terminal to an application system of each virtual machine.
2. The method according to claim 1, characterized in that the method further comprises:
Analyzing the network traffic to obtain data related to an application system in the network traffic;
and determining whether each virtual machine drifts according to the data related to the application system in the network traffic.
3. The method according to claim 2, characterized in that the method further comprises:
writing the network flow of the application system in a preset time period into a production environment database in real time;
and acquiring data received in the preset time period in the production environment database through a data query script.
4. The method of claim 3, wherein determining whether each virtual machine has drifted based on data in the network traffic comprises:
matching the data in the network traffic with the data received in the preset time period in the production environment database;
determining whether each virtual machine drifts according to the matching result;
if the data in the network flow and the data received in the production environment database within the preset time period are the same or similar, indicating that each virtual machine does not drift; or alternatively
And if the difference value between the data in the network flow and the data received in the preset time period in the production environment database is greater than or equal to a preset threshold value, indicating that a drifting virtual machine exists in the plurality of virtual machines.
5. The method of claim 2, wherein the data in the network traffic is data related to the application system.
6. The method according to claim 1, characterized in that the method further comprises:
and if a certain virtual machine drifts, sending prompt information.
7. A device for determining virtual machine drift, wherein an application system is deployed in each virtual machine, the device comprising:
the first acquisition module is used for acquiring the network traffic of the application system in a preset time period;
the first analysis module is used for analyzing the network traffic to obtain an IP address in the network traffic;
the first matching module is used for indicating that each virtual machine does not drift if the IP address in the network flow is matched with the IP address configured by each virtual machine; or if no IP address of the IP address in the network flow is configured by a certain virtual machine, indicating that the virtual machine drifts;
the IP address in the network flow is a destination IP address carried in a terminal request, and the IP address configured by each virtual machine is an IP address configured for each virtual machine in advance;
The terminal request is a request initiated by the terminal to an application system of each virtual machine.
8. An electronic device, comprising:
one or more processors; and
storage means for storing one or more programs which when executed by the one or more processors cause the one or more processors to implement the method of any of claims 1-6.
9. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any one of claims 1-6.
CN202010477904.9A 2020-05-29 2020-05-29 Method, device, medium and electronic equipment for determining virtual machine drift Active CN111679885B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010477904.9A CN111679885B (en) 2020-05-29 2020-05-29 Method, device, medium and electronic equipment for determining virtual machine drift

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010477904.9A CN111679885B (en) 2020-05-29 2020-05-29 Method, device, medium and electronic equipment for determining virtual machine drift

Publications (2)

Publication Number Publication Date
CN111679885A CN111679885A (en) 2020-09-18
CN111679885B true CN111679885B (en) 2023-10-13

Family

ID=72434470

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010477904.9A Active CN111679885B (en) 2020-05-29 2020-05-29 Method, device, medium and electronic equipment for determining virtual machine drift

Country Status (1)

Country Link
CN (1) CN111679885B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174415B (en) * 2022-06-30 2023-07-14 苏州浪潮智能科技有限公司 Information release control method, device and equipment for virtual tunnel endpoint

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103229478A (en) * 2012-12-13 2013-07-31 华为技术有限公司 Method and device for virtual-machine drift determination
CN108391269A (en) * 2018-02-28 2018-08-10 南京铁道职业技术学院 A kind of method that attack AP equipment is prevented in WLAN
CN109660419A (en) * 2018-10-08 2019-04-19 平安科技(深圳)有限公司 Predict method, apparatus, equipment and the storage medium of network equipment exception
CN110198329A (en) * 2018-03-26 2019-09-03 腾讯科技(深圳)有限公司 Database deployment method, device and system, electronic equipment and readable medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9588821B2 (en) * 2007-06-22 2017-03-07 Red Hat, Inc. Automatic determination of required resource allocation of virtual machines
US10320895B2 (en) * 2016-11-15 2019-06-11 Microsoft Technology Licensing, Llc Live migration of load balanced virtual machines via traffic bypass

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103229478A (en) * 2012-12-13 2013-07-31 华为技术有限公司 Method and device for virtual-machine drift determination
CN108391269A (en) * 2018-02-28 2018-08-10 南京铁道职业技术学院 A kind of method that attack AP equipment is prevented in WLAN
CN110198329A (en) * 2018-03-26 2019-09-03 腾讯科技(深圳)有限公司 Database deployment method, device and system, electronic equipment and readable medium
CN109660419A (en) * 2018-10-08 2019-04-19 平安科技(深圳)有限公司 Predict method, apparatus, equipment and the storage medium of network equipment exception

Also Published As

Publication number Publication date
CN111679885A (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN108768730B (en) Method and device for operating intelligent network card
CN108933695B (en) Method and apparatus for processing information
CN114066475A (en) Information security protection method based on cloud payment and server
CN115357761A (en) Link tracking method and device, electronic equipment and storage medium
CN109614327B (en) Method and apparatus for outputting information
CN111679885B (en) Method, device, medium and electronic equipment for determining virtual machine drift
CN112954056B (en) Method and device for processing monitoring data, electronic equipment and storage medium
CN110928594A (en) Service development method and platform
CN111930629A (en) Page testing method and device, electronic equipment and storage medium
CN116737662A (en) Method, device, electronic equipment and storage medium for processing business data
CN109656791B (en) gPC performance test method and device based on Jmeter
CN113132400B (en) Business processing method, device, computer system and storage medium
CN113781275A (en) Education resource management method and server
CN115203178A (en) Data quality inspection method and device, electronic equipment and storage medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN113781126A (en) Electricity business information processing method and system
CN109656803B (en) Information pushing method and device and electronic equipment
CN112506781A (en) Test monitoring method, test monitoring device, electronic device, storage medium, and program product
CN110688295A (en) Data testing method and device
CN117827624A (en) Function test method, device and storage medium
CN113778350A (en) Log printing method and device
CN114265881A (en) Data processing method and server applied to intelligent community
CN116795671A (en) Code checking method and device
CN113742374A (en) Information processing method and server applied to smart city
CN111026666A (en) Test data processing method, device, computer system and medium

Legal Events

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