CN102801579B - A kind of method and apparatus of continuous monitoring VMWare event - Google Patents

A kind of method and apparatus of continuous monitoring VMWare event Download PDF

Info

Publication number
CN102801579B
CN102801579B CN201210228006.5A CN201210228006A CN102801579B CN 102801579 B CN102801579 B CN 102801579B CN 201210228006 A CN201210228006 A CN 201210228006A CN 102801579 B CN102801579 B CN 102801579B
Authority
CN
China
Prior art keywords
time
vmware
event
tcp
application program
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
CN201210228006.5A
Other languages
Chinese (zh)
Other versions
CN102801579A (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.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201210228006.5A priority Critical patent/CN102801579B/en
Publication of CN102801579A publication Critical patent/CN102801579A/en
Application granted granted Critical
Publication of CN102801579B publication Critical patent/CN102801579B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of VMWare action listener method and device continuously, wherein the method comprises: set up TCP/IP by application program and vCenter/ESX and be connected and monitor VMWare event; The time receiving VMWare event is for the last time connected by application records TCP/IP; By application program according to the cycle very first time, log in vCenter/ESX, activated user log-in events; By application program according to the second time cycle, periodically calculate TCP/IP connection and receive the time of VMWare event and the time difference of current time for the last time, wherein the second time cycle was less than the cycle very first time; Determine that the time difference is less than the cycle very first time by application program, then TCP/IP connects normal.The user's log-in events sent to application program due to vCenter/ESX is relatively more frequent, and the TCP/IP therefore monitoring VMWare event connects and there will not be https overtime interrupt.

Description

A kind of method and apparatus of continuous monitoring VMWare event
Technical field
The present invention relates to network technology, specifically a kind of method and apparatus of continuous monitoring VMWare event.
Background technology
An important technology of cloud computing realizes being virtual, namely virtual to computational resource, storage resources and Internet resources.Computational resource is virtual, refers to that service that cloud computing provides is not fixing based on certain concrete physical server, but the service provided based on one or more server dynamically; Storage resources is virtual, refers to that memory space that cloud computing uses is based on arbitrary memory device; Internet resources are virtual, refer to that network configuration is dynamic, the service dynamic-configuration provided with cloud computing.
In Internet resources are virtual, the service that cloud computing provides all is completed by virtual machine (virtualmachine).The network insertion switch (network insertion position) of the necessary real-time tracking virtual machine of dynamic-configuration of Internet resources, and send out network configuration up and down at network insertion switch, such as Bandwidth guaranteed, safety restriction etc., guarantee that the service that cloud computing provides to outside can run continuously, be not interrupted.
As shown in Figure 1, when fictitious host computer 2 moves to physical server 2 by physical server 1, the network configuration of its correspondence also must move to physical switches 2 from physical switches 1.For the network environment not supporting IEEE802.1qbg standard, realize migration situation and increase, the deletion situation etc. of the necessary real-time tracking virtual machine of above-mentioned network configuration migration, this just requires that application program must the dependent event of continuous continual reception virtual network, thus determines whether virtual machine creates, deletes or migration etc.For VMWare virtual network, the VMWare event that vCenter/ESX sends will be monitored exactly, wherein, VMWare event specifically refers to the software that the vCenter(VMWare company of VMWare company manages concentratedly virtual machine product), ESX(VMWare company is responsible for virtualized for physical server software systems, be responsible for the Realization of Simulation virtual switch and virtual machine) event that product produces, comprise user's logins/logoffs event, virtual machine creating/amendment/deletion event, virtual switch establishment/amendment/deletion event etc.; The principle of VMWare action listener as shown in Figure 2.
In fig. 2, NMS(NetworkManagementSystem, network management system software) interface that calls VMWare corporate external and provide sets up TCP/IP with vCenter/ESX and is connected, when there being new VMWare event to produce, vCenter/ESX is connected by TCP/IP, VMWare event is sent to NMS, in each VMWare event, has field to represent the variable that event type and event comprise.The above-mentioned TCP/IP connection provided due to VMWare is actually a https(HypertextTransferProtocoloverSecureSocketLayer) connect.The mechanism that https processes at present is, if connect the long period do not have packet sending and receiving, will automatically disconnect long-range connection.Disconnect once https connects, VMWare event will be caused to monitor, certainly, if virtual machine creates during this period, delete or move, NMS be perception less than, thus network configuration also cannot synchronously be performed.
For any application, need to avoid the TCP/IP between self and VMWarevCenter/ESX to connect because the situation of a variety of causes interruption as far as possible; Meanwhile, once there is abnormal interruption, application program must be able to perceive in time, and takes measures to make up.Application program is except monitoring except VMWare event by setting up the normal mode connected of TCP/IP connection, also can obtain VMWare event by active poll vCenter/ESX, and polling interval enough little (such as 1 minute), when TCP/IP connection is interrupted because of a variety of causes, application program (receives only and processes the program of VMWare event, such as network management system software) TCP/IP disconnecting can be perceived by above-mentioned polling procedure, and re-establish a TCP/IP connection monitoring VMWare event.
Said process under normal circumstances can real-time listening VMWare event; When network occurs abnormal, can sensing network anomalous event, and re-establish VMWare action listener passage, guarantee that all VMWare events all can not be lost.
But the defect of the program is, application program polling interval is too low, the processing load of application program and vCenter/ESX being strengthened, when the virtual network of vCenter/ESX composition is very large, being in very busy state by causing application program and vCenter/ESX.
Even if application program polling interval is enough little, when network occurs abnormal, application program cannot perception VMWare event.Application program for once poll ability perception later, likely causes the time delay of a polling cycle.
Summary of the invention
The object of the present invention is to provide a kind of method and apparatus of continuous monitoring VMWare event, by the present invention, the continuous real-time listening to VMWare event can be realized, reduce the poll burden of application program and vCenter.
Accompanying drawing explanation
Figure 1 shows that virtual machine (vm) migration schematic diagram;
Figure 2 shows that prior art monitors VMWare event schematic diagram.
Figure 3 shows that the present invention monitors the method flow schematic diagram of VMWare event continuously;
The apparatus structure schematic diagram of continuous monitoring VMWare event provided by the invention shown in shown in Fig. 4.
Embodiment
The present invention utilizes VMWare log-in events to realize the continuous monitoring of VMWare event.When logging in vCenter/ESX, vCenter/ESX can produce user's log-in events.If this event can frequently occur, by monitoring users log-in events, there is overtime interrupt to avoid the TCP/IP monitoring VMWare event to connect.
In the present invention, application program and vCenter/ESX set up TCP/IP and are connected monitoring VMWare event, and record the time that TCP/IP connection receives VMWare event for the last time.Application program connects the cycle very first time (such as, 20 seconds) of digestion period according to being less than HTTPs, log in vCenter/ESX, with activated user log-in events.Application program, according to the second time cycle, calculates TCP/IP and connects the time difference receiving VMWare event time and current time for the last time, if the time difference is less than or equal to the cycle very first time, then TCP/IP connects normal; If the time difference is greater than the cycle very first time, then think that TCP/IP connects abnormal.Application program interrupting TCP/IP connects, and sets up new TCP/IP with vCenter/ESX and be connected to monitor VMWare event.Set up TCP/IP connection procedure to be realized by the third Protocol stack (as gSOAP protocol stack), by the return value of protocol stack, application program determines that whether TCP/IP connection establishment is successful.If the failure of TCP/IP connection establishment, in next cycle, continue trial set up TCP/IP connection; If the success of TCP/IP connection establishment, connect all VMWare events in the time and current time receiving VMWare event for the last time from the TCP/IP of vCenter/ESX reading record, avoid VMWare event to lose.
The beneficial effect of the present embodiment is, produces user's log-in events, and user's log-in events is sent to application program by TCP/IP connection by periodically logging in vCenter/ESX.The user's log-in events sent to application program due to vCenter/ESX is relatively more frequent, and the TCP/IP therefore monitoring VMWare event connects and there will not be https overtime interrupt.
Beneficial effect of the present invention is also, application program place server belonging network breaks down and TCP/IP disconnecting, this situation of the application can at once perception, and carry out repair process namely: reset TCP/IP and connect to monitor VMWare event, if arrange successfully, read TCP/IP connection from vCenter/ESX and receive the time of VMWare event for the last time to all VMWare events in current time frame, avoid VMWare event to lose.As shown in Figure 4, present invention also offers a kind of VMWare action listener device, this device comprises:
Monitoring unit 401, sets up TCP/IP by application program with vCenter/ESX and is connected, and monitors VMWare event, records described TCP/IP and connects the time receiving VMWare event for the last time.
Computing unit 402, by application program, according to the cycle very first time being less than HTTPs connection digestion period, periodically logs in vCenter/ESX, activated user log-in events; According to the second time cycle being less than the cycle very first time, periodically calculate described TCP/IP connection and receive the time of VMWare event and the time difference of current time for the last time.
By application program, control unit 402, determines that the described time difference is less than the described cycle very first time, then described TCP/IP connects normal, connects without the need to disconnecting described TCP/IP; Determine that the described time difference is greater than the described cycle very first time by application program, then interrupt described TCP/IP and connect.
Control unit 403, sets up new TCP/IP by application program and described vCenter/ESX and is connected and monitors VMWare event; Determine described new TCP/IP successful connection by application program, read described TCP/IP from described vCenter/ESX and connect the time all VMWare events in current time receiving VMWare event for the last time.
With the example under certain embody rule scene, implementation process of the present invention is described, suppose that the polling cycle of the task A of application program launching is 20 seconds, it is 2012/2/2710:49:00 that TCP/IP connects the time receiving VMWare event for the last time, current time is 2012/2/2710:49:15, time difference equals 15 seconds and is less than 20 seconds, and therefore application program determines that TCP/IP connects normally; After task B runs a period of time, current time is 2012/2/2710:49:22 second, be 22 seconds because current time to be connected the time difference of the up-to-date time receiving VMWare event with TCP/IP and to be greater than 20 seconds, application program interrupting TCP/IP connects and sets up new TCP/IP and connects, then [2012/2/2710:49:00 is read from vCenter/ESX, 2012/2/2710:49:22] period all VMWare events, prevent VMWare event from losing.
The above, be only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention, and all any amendments done within the spirit and principles in the present invention, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. monitor a method for VMWare event continuously, it is characterized in that, described method comprises:
Set up TCP/IP by application program and vCenter/ESX to be connected and to monitor VMWare event; Wherein, VMWare event refers to the event that vCenter and/or ESX produces;
The time receiving VMWare event is for the last time connected by TCP/IP described in application records;
By application program according to the cycle very first time, log in vCenter/ESX, activated user log-in events; Wherein, the described cycle very first time is less than HTTPs and connects digestion period;
By application program according to the second time cycle, the described TCP/IP connection periodically calculating record receives the time of VMWare event and the time difference of current time for the last time, and wherein said second time cycle is less than the described cycle very first time;
Determine that the described time difference is less than the described cycle very first time by application program, then described TCP/IP connects normal.
2. method according to claim 1, is characterized in that, described method also comprises further:
Determine that the described time difference is greater than the described cycle very first time by application program, then interrupt described TCP/IP and connect;
Set up new TCP/IP by application program and described vCenter/ESX to be connected and to monitor VMWARE event.
3. method according to claim 2, is characterized in that,
Determine described new TCP/IP successful connection by application program, read described TCP/IP from described vCenter/ESX and connect the time all VMWare events in current time receiving VMWare event for the last time.
4. monitor a device for VMWare event continuously, it is characterized in that, described device comprises:
Monitoring unit, sets up TCP/IP by application program with vCenter/ESX and is connected, and monitors VMWare event, records described TCP/IP and connects the time receiving VMWare event for the last time; Wherein, VMWare event refers to the event that vCenter and/or ESX produces;
Computing unit, by application program, according to the cycle very first time, periodically logs in vCenter/ESX, activated user log-in events; According to the second time cycle, periodically calculate described TCP/IP connection and receive the time of VMWare event and the time difference of current time for the last time; Wherein, the described cycle very first time is less than HTTPs and connects digestion period, and described second time cycle is less than the described cycle very first time;
By application program, control unit, determines that the described time difference is less than the described cycle very first time, then described TCP/IP connects normal.
5. device according to claim 4, is characterized in that,
By application program, control unit, determines that the described time difference is greater than the described cycle very first time, then interrupt described TCP/IP and connect;
Described monitoring unit, sets up new TCP/IP by application program and described vCenter/ESX and is connected and monitors VMWare event.
6. device according to claim 5, is characterized in that,
Described monitoring unit, determines described new TCP/IP successful connection by application program, reads described TCP/IP connect the time all VMWare events in current time receiving VMWare event for the last time from described vCenter/ESX.
CN201210228006.5A 2012-06-29 2012-06-29 A kind of method and apparatus of continuous monitoring VMWare event Active CN102801579B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210228006.5A CN102801579B (en) 2012-06-29 2012-06-29 A kind of method and apparatus of continuous monitoring VMWare event

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210228006.5A CN102801579B (en) 2012-06-29 2012-06-29 A kind of method and apparatus of continuous monitoring VMWare event

Publications (2)

Publication Number Publication Date
CN102801579A CN102801579A (en) 2012-11-28
CN102801579B true CN102801579B (en) 2015-12-02

Family

ID=47200551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210228006.5A Active CN102801579B (en) 2012-06-29 2012-06-29 A kind of method and apparatus of continuous monitoring VMWare event

Country Status (1)

Country Link
CN (1) CN102801579B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727392A (en) * 2009-12-29 2010-06-09 浪潮电子信息产业股份有限公司 Method for clearing faults in operating system and software
CN101883098A (en) * 2010-06-18 2010-11-10 大连海事大学 System and method for distributed complex event detection under RFID (Radio Frequency Identification Devices) equipment network environment
CN101944043A (en) * 2010-09-27 2011-01-12 公安部第三研究所 File access method of Linux virtual machine disk under Windows platform
CN102034050A (en) * 2011-01-25 2011-04-27 四川大学 Dynamic malicious software detection method based on virtual machine and sensitive Native application programming interface (API) calling perception

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727392A (en) * 2009-12-29 2010-06-09 浪潮电子信息产业股份有限公司 Method for clearing faults in operating system and software
CN101883098A (en) * 2010-06-18 2010-11-10 大连海事大学 System and method for distributed complex event detection under RFID (Radio Frequency Identification Devices) equipment network environment
CN101944043A (en) * 2010-09-27 2011-01-12 公安部第三研究所 File access method of Linux virtual machine disk under Windows platform
CN102034050A (en) * 2011-01-25 2011-04-27 四川大学 Dynamic malicious software detection method based on virtual machine and sensitive Native application programming interface (API) calling perception

Also Published As

Publication number Publication date
CN102801579A (en) 2012-11-28

Similar Documents

Publication Publication Date Title
CN106570074B (en) Distributed database system and implementation method thereof
CN107645529B (en) Heartbeat packet sending method and device
US11734138B2 (en) Hot standby method, apparatus, and system
CN110691398B (en) Network interaction method, system, equipment and storage medium of intelligent equipment
CN103812823A (en) Method, device and system for configuration information migration in thermal migration of virtual machine
KR20130087552A (en) Asynchronous virtual machine replication
PH12017502186B1 (en) Method for interaction between terminal and network device, and terminal
WO2014075547A1 (en) Virtual machines
WO2018121334A1 (en) Web application service providing method, apparatus, electronic device and system
CN110928637A (en) Load balancing method and system
EP3531676A1 (en) Task processing apparatus, intelligent device, task processing method, and baseband processor
CN104991811A (en) Process running state adjusting method in isolation system switching period and intelligent terminal
CN103916226A (en) Redundant backup method based on embedded equipment
CN110650122B (en) Automatic log-out method, device and system for Web system
CN107104822B (en) Server disaster recovery processing method and device, storage medium and electronic equipment
US10785309B2 (en) Session monitoring method, apparatus, and system
CN102882708A (en) Operation and maintenance auditing method, device and system
CN108234266B (en) Data transmission method and device for bus type communication network and storage medium
CN102801579B (en) A kind of method and apparatus of continuous monitoring VMWare event
CN105100125A (en) Sleep control method, sleep control device and sleep control system for virtual desktop
US9967163B2 (en) Message system for avoiding processing-performance decline
JP2018010441A (en) Log collection system, log collection server, and log collection method
KR102145137B1 (en) Methods and devices for processing data
US20190036793A1 (en) Network service implementation method, service controller, and communications system
CN106326042B (en) Method and device for determining running state

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Patentee after: NEW H3C TECHNOLOGIES Co.,Ltd.

Address before: 310053 Hangzhou science and Technology Development Zone, Zhejiang high tech park, No. six and road, No. 310

Patentee before: HANGZHOU H3C TECHNOLOGIES Co.,Ltd.

CP03 Change of name, title or address
TR01 Transfer of patent right

Effective date of registration: 20230609

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right