CN108540341B - Resource monitoring method and device - Google Patents

Resource monitoring method and device Download PDF

Info

Publication number
CN108540341B
CN108540341B CN201810224899.3A CN201810224899A CN108540341B CN 108540341 B CN108540341 B CN 108540341B CN 201810224899 A CN201810224899 A CN 201810224899A CN 108540341 B CN108540341 B CN 108540341B
Authority
CN
China
Prior art keywords
monitoring
message
cloud computing
virtual machine
management platform
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
CN201810224899.3A
Other languages
Chinese (zh)
Other versions
CN108540341A (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.)
Aerospace Winhong Technology Co ltd
Winhong Information Technology Co ltd
Original Assignee
Aerospace Winhong Technology Co ltd
Winhong Information 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 Aerospace Winhong Technology Co ltd, Winhong Information Technology Co ltd filed Critical Aerospace Winhong Technology Co ltd
Priority to CN201810224899.3A priority Critical patent/CN108540341B/en
Publication of CN108540341A publication Critical patent/CN108540341A/en
Application granted granted Critical
Publication of CN108540341B publication Critical patent/CN108540341B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • H04L67/1065Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT] 
    • 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
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of resource monitoring, and provides a resource monitoring method and device. The method is applied to a monitoring system for monitoring the virtual machine of the cloud computing management platform. During monitoring, the monitoring system firstly monitors and obtains operation information generated when the cloud computing management platform operates the virtual machine, then updates a monitoring object corresponding to the virtual machine based on the obtained operation information, and finally obtains updated monitoring data of the monitoring object from the cloud computing management platform. Therefore, the method can be used for synchronously monitoring the states of the monitored object and the actual virtual machine in real time by monitoring the operation message, collecting the updated monitoring data of the monitored object on the basis, and obtaining accurate monitoring data. Meanwhile, the monitoring process is automatically finished without manual configuration, and the operation and maintenance efficiency of the monitoring system is improved. In addition, the monitoring system operates independently of the cloud computing management platform, and the problem of insufficient monitoring capability of the cloud computing management platform can be solved.

Description

Resource monitoring method and device
Technical Field
The invention belongs to the technical field of resource monitoring, and particularly relates to a resource monitoring method and device.
Background
The cloud computing service enables a user to run an application program or service to complete computing work through shared computing resources, network bandwidth and a storage pool, and the shared resources are virtualized into a plurality of virtual machines to provide services through a virtualization technology. In order to ensure the normal operation of these virtual machine resources, timely control the availability of the basic environment and the service application system, and obtain the operating states of each component, such as the utilization rate of the CPU, the load of the system, the operation of the service, etc., the virtual machine resources need to be monitored. Two functions are mainly needed to be realized for realizing monitoring: the data acquisition part and the analysis, display and alarm part of the acquired data.
OpenStack is an open source cloud platform management project, which has an open design concept, an open development mode, and an open community, and this makes OpenStack one of the most popular open source cloud computing solutions available today. The Ceilometer is a project used for monitoring and metering in the OpenStack, can be used as one of data sources for acquiring data of virtual machine resources, but has weak analysis, display and alarm capabilities for acquired data, and cannot completely meet the monitoring requirements of users for the virtual machine resources.
Zabbix is an enterprise-level, open-source and distributed monitoring system, can monitor the availability and performance of resources such as equipment and services, supports various acquisition modes and acquisition clients, has a special Agent (Zabbix Agent), can also support various protocols such as SNMP, IPMI, JMX, Telnet, SSH and the like during acquisition, has a flexible alarm mechanism, can provide a presentation interface of rich-content reports and graphical modes by utilizing stored data, and helps a user to know the resource state and the resource use plan. Meanwhile, the characteristics of simple installation and configuration, rich expansion capability, open source and the like of the Zabbix are reasons for selecting the Zabbix to construct the monitoring system.
However, at present, when monitoring virtual machine resources by using a monitoring system constructed based on Zabbix, information of a monitored object needs to be manually filled for monitoring and acquisition, on one hand, the operation and maintenance efficiency of the monitoring system is greatly reduced by a manual mode, and on the other hand, if newly added virtual machine resources or old virtual machine resources are changed, if data of the monitored object is not manually modified in time, the condition that the monitored object on the monitoring system and actual virtual machine resources are not synchronous occurs, so that the current state of the virtual machine resources cannot be accurately reflected in time.
Disclosure of Invention
In view of this, embodiments of the present invention provide a resource monitoring method and apparatus, which are applied to a monitoring system independent of a cloud computing management platform to solve the above technical problems.
In order to achieve the purpose, the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a resource monitoring method, which is applied to a monitoring system of a cloud computing management platform, and includes:
monitoring and obtaining an operation message generated when the cloud computing management platform operates the virtual machine;
updating a monitoring object corresponding to the virtual machine based on the operation message;
and obtaining the updated monitoring data of the monitored object from the cloud computing management platform.
In a second aspect, an embodiment of the present invention provides a resource monitoring apparatus, which is applied to a monitoring system independent of a cloud computing management platform, and includes:
the message monitoring module is used for monitoring and acquiring an operation message generated when the cloud computing management platform operates the virtual machine;
the data updating module is used for updating the monitoring object corresponding to the virtual machine based on the operation message;
and the data acquisition module is used for acquiring the updated monitoring data of the monitored object from the cloud computing management platform.
The invention has the following beneficial effects: the resource monitoring method and device provided by the embodiment of the invention are applied to a monitoring system for monitoring the virtual machine resources managed by a cloud computing management platform. After the monitoring system is connected with the cloud computing management platform, firstly, operation information generated when the cloud computing management platform operates the virtual machine is obtained in a monitoring mode, then, a monitoring object corresponding to the virtual machine is updated based on the obtained operation information, and finally, monitoring data of the updated monitoring object is obtained from the cloud computing management platform.
Because the cloud computing management platform in the embodiment of the invention completes the operation of the virtual machine through the operation message, the resource monitoring method can synchronously monitor the states of the object and the actual virtual machine in real time through the obtained operation message, and ensure the consistency of the object and the actual virtual machine. And then on this basis go to gather the control data of control object, can obtain accurate control data, in the follow-up step, further show, analysis and report an emergency and ask for help or increased vigilance the control data and operate and be more significant. Meanwhile, the monitoring process of the message is automatically completed without manual configuration, and the operation and maintenance efficiency of the monitoring system is improved. In addition, the monitoring system adopted by the embodiment of the invention operates independently of the cloud computing management platform, and the problem of insufficient monitoring capability of the cloud computing management platform can be solved.
In order to make the above objects, technical solutions and advantages of the present invention more comprehensible, embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 shows a schematic structural diagram of a monitoring server provided in an embodiment of the present invention;
FIG. 2 is a flow chart of a resource monitoring method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps S01 and S02 of a resource monitoring method according to an embodiment of the present invention;
fig. 4 is a functional block diagram of a resource monitoring apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
The monitoring system provided by the embodiment of the invention is used for monitoring the virtual machine resources managed by the cloud computing management platform, and can be deployed on a monitoring server. Fig. 1 shows a schematic structural diagram of a monitoring server 100 according to an embodiment of the present invention. Referring to fig. 1, the monitoring server 100 may include a memory 110, a processor 120, and a network module 130. The memory 110 may be used to store software programs and modules, such as program instructions/modules corresponding to the resource monitoring method and apparatus provided in the embodiment of the present invention, and the processor 120 executes various functional applications and data processing by running the software programs and modules stored in the memory 110, so as to implement the resource monitoring method and apparatus provided in the embodiment of the present invention. The memory 110 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. Further, the software programs and modules in the memory 110 may further include: an operating system 111 and a service module 112. The operating system 111, which may be, for example, LINUX, UNIX, WINDOWS, may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components. The service module 112 runs on the basis of the operating system 111, monitors a request from the network through the network service of the operating system 111, completes corresponding data processing according to the request, and returns a processing result to the client. That is, the service module 112 is used to provide network services to clients. The network module 130 is used for receiving and transmitting network signals, which may include wireless signals or wired signals.
It is to be understood that the configuration shown in fig. 1 is merely exemplary, and that the monitoring server 100 may include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof. In addition, the monitoring server 100 in the embodiment of the present invention is not limited to one server, and may be a combination of a plurality of servers having different functions, or may not correspond to a physical server, and may be a virtual server, for example.
The monitoring system provided by the embodiment of the invention can be constructed based on a Zabbix monitoring system, the cloud computing management platform can be an OpenStack platform, and the following description sometimes uses Zabbix and OpenStack as examples, but does not represent that the monitoring system provided by the embodiment of the invention can only be constructed based on the Zabbix monitoring system, or the cloud computing management platform in the embodiment of the invention can only be the OpenStack platform.
First embodiment
Fig. 2 shows a flowchart of a resource monitoring method according to an embodiment of the present invention. Referring to fig. 2, the resource monitoring method includes:
s10: and monitoring and obtaining an operation message generated when the cloud computing management platform operates the virtual machine.
Before describing step S10, some steps that may be performed before step S10 are first described. The monitoring system needs to monitor virtual machines managed by a cloud computing management platform, and in the monitoring system, a monitoring object corresponding to the virtual machine to be monitored needs to be created first. The cloud computing management platform provides a basic data acquisition interface for the outside, the monitoring system calls the interface to obtain all basic information of each virtual machine, including information such as the name, the number, the configuration condition (such as CPU, memory and disk) and the state (such as shutdown, startup and suspension) of the virtual machine, and the monitoring system can create a monitoring object corresponding to the virtual machine based on the basic information. The cloud computing management platform also provides a monitoring data acquisition interface externally, so that the monitoring system calls the interface to obtain monitoring data of a monitored object, such as performance data in the use process of the virtual machine, including CPU utilization rate, memory utilization rate and the like. And further, the monitoring data can be stored, analyzed, displayed, alarmed and the like in the monitoring system.
In specific implementation, the monitoring data acquisition interface is an external interface of the Ceilometer, the Ceilometer has a monitoring function, monitoring data of the virtual machine can be acquired, and the monitoring data is only weak in data analysis, display and alarm capabilities and difficult to meet various requirements of users. The monitoring system can call a monitoring data acquisition interface through the Zabbix Proxy to obtain monitoring data, and sends the monitoring data to the Zabbix Server, and the Zabbix Server performs processing such as storage, analysis, display, alarm and the like on the data. Of course, in some embodiments of the present invention, the direct connection part of Zabbix Agent may belong to a virtual machine to be monitored, monitor data may be collected by Zabbix Agent, and the monitor data may be forwarded to Zabbix Server by Zabbix Proxy. As the Zabbix has stronger function than the Ceilometer in the aspect of processing the monitoring data, the monitoring effect is better, and the requirements of users can be met. Furthermore, the monitoring system is implemented as a system independent from the OpenStack, which facilitates secondary development on the basis of Zabbix, enriches functions of the monitoring system, enables the monitoring system not to be limited to monitoring a virtual machine in the OpenStack, and also to monitor other resources, such as a database, a server, and network equipment, and Zabbix itself supports monitoring of a plurality of resources.
Although the monitoring scheme can realize virtual machine monitoring, the problem of data synchronization exists. Specifically, basic information of a virtual machine may change in a use process, for example, when a certain virtual machine is normally shut down, the monitoring system cannot naturally acquire monitoring data of a monitoring object corresponding to the virtual machine at this time, and if data updating is not performed on the monitoring object, the monitoring system may consider that an abnormal condition occurs in the virtual machine under the condition that the monitoring data of the monitoring object cannot be received for a long time, and further take measures such as warning, which is obviously an improper behavior. Therefore, in the monitoring system, synchronization of the monitoring object with the virtual machine is particularly important. According to the above explanation, the monitoring system may obtain the latest basic information of the virtual machines by calling the basic data collection interface and update the monitored objects based on the obtained basic information, and since all the basic information of each virtual machine is obtained each time, this synchronization mode is also called full synchronization. The frequent execution of the full synchronization can ensure the synchronicity of the monitored object and the virtual machine, but usually, the basic information of the virtual machine is not updated frequently, the meaning of the frequent execution of the full synchronization is not great, and the large overhead is caused, so that the actual full synchronization mode is only suitable for the regular execution, but the problem of untimely synchronization caused by the regular execution is solved. In the resource monitoring method provided in the embodiment of the present invention, synchronization between the monitored object and the virtual machine to be monitored is implemented by using a message monitoring method, and certainly, the method can be combined with a method of periodically performing full synchronization in a specific implementation, so as to further ensure accuracy of data of the monitored object.
In the cloud computing management platform provided by the embodiment of the invention, the components are interacted through messages. For example, in OpenStack, AMQP (advanced message queue protocol) is used as a basis for implementing message transmission, so software supporting AMQP, such as RabbitMQ, Qpid, ZeroMQ, etc., can be implemented as a message queue in OpenStack. The operation of the cloud computing management platform on the virtual machine is realized through messages, the messages generated when the virtual machine is operated are called operation messages, and the change of the basic information of the virtual machine corresponds to the corresponding operation messages according to the definition of the operation messages, so that the change condition of the basic information of the virtual machine can be obtained by monitoring the operation messages, and the real-time synchronization of a monitoring object and the virtual machine is realized. In the embodiment of the present invention, the monitoring of the operation message may be implemented by a monitoring program in the monitoring system. Taking the case that OpenStack adopts a RabbitMQ to implement message transmission as an example, the RabbitMQ includes a message queue server, when a virtual machine needs to be operated, the Nova component of OpenStack sends a request to the message queue server, so as to invoke a message generation interface provided by the message queue server to generate a corresponding operation message, and after receiving the operation message, a message switch (exchange) of the RabbitMQ delivers the operation message to a corresponding message queue according to a key of the message and a binding relationship between the message switch and the message queue.
Fig. 3 shows a flowchart of step S01 and step S02 of the resource monitoring method provided by the embodiment of the invention. Referring to fig. 3, the snooping procedure of the embodiment of the invention first performs step S01 and step S02 before starting snooping (i.e., before step S10).
S01: and establishing connection with a message queue server of the cloud computing management platform.
The listener acts as a message queue server for the RabbitMQ to which the client first connects.
S02: and calling a monitoring setting interface of the message queue server, and specifying a message switch to be monitored and a message monitoring queue bound with the message switch in a calling parameter so that the message queue server creates the message monitoring queue.
The listener calls a listening setting interface provided by the message queue server to perform setting before listening, specifies a message switch to be listened (in the embodiment of the present invention, a message switch corresponding to the Nova component) in a calling parameter, a message listening queue for receiving the operation message, and a routing key for binding the message switch and the message listening queue. The message queue server responds to the call by generating a message snoop queue specified by the listener and binding it to the message switch specified by the listener.
After the setting operation is completed, in step S10, the message exchange receives the operation message and forwards the message to the message listening queue that has been created in advance, so that the listener can obtain the operation message from the message listening queue. It is understood that the above description of message snooping is mainly described by using RabbitMQ as an example, and if other message queue software is used, the implementation may be different, but in step S10, the message snooping mechanism may be implemented by receiving the operation message forwarded by the message queue software in the manner of creating a message snoop queue.
S11: and updating the monitoring object corresponding to the virtual machine based on the operation message.
In an implementation manner of the embodiment of the present invention, the monitoring system analyzes the operation message to obtain an operation type, for example, a type of adding, modifying, terminating, suspending, shutting down, starting up, adjusting, and the like to the virtual machine, and performs different update operations based on different operation types, thereby completing data update of the monitored object. Obviously, unlike full synchronization, the data updating method for the monitored object disclosed in steps S10 and S11 updates data only when an operation message is monitored, and if there is no change in the basic information of the virtual machine, the cloud computing management platform will not generate a corresponding operation message, and will not update the monitored object in the monitoring system. The synchronization mode is triggered by the operation message, has high real-time performance, and is not called as real-time synchronization of the monitoring object and the virtual machine. The timeliness of the real-time synchronization is obviously superior to that of the full-quantity synchronization, the content of the synchronization is only limited to the content in the acquired operation message, and the synchronization overhead is far smaller than that of the full-quantity synchronization.
Returning to the previous proposed example, when a certain virtual machine is normally shut down, the monitoring system cannot naturally acquire the monitoring data of the monitoring object corresponding to the virtual machine at this time, and if the data of the monitoring object is not updated, the monitoring system may consider that the virtual machine has an abnormal condition under the condition that the monitoring system cannot receive the monitoring data of the monitoring object for a long time, and further take measures such as warning; however, if the monitored object updates data in time, the monitoring system knows that the virtual machine corresponding to the monitored object is shut down, and the monitoring system cannot acquire the monitored data under normal conditions without taking any alarm measures.
S12: and obtaining the updated monitoring data of the monitored object from the cloud computing management platform.
Since the real-time update of the data of the monitored object is completed in step S11, the accuracy of the monitored data can be ensured by acquiring the monitored data based on the latest monitored object in step S12. In specific implementation, data update of the monitored object can be realized on the Zabbix Server, and the Zabbix Proxy acquires the data of the nearest monitored object from the Zabbix Server and further acquires the monitored data of the monitored object. As for the obtaining mode of the monitoring data, it has been explained before, the monitoring data can be obtained by calling a data acquisition interface of a cloud computing management platform or by deploying Zabbix Agent and the like, and the obtained monitoring data is sent back to the Zabbix Server by the Zabbix Proxy for storage, and is further processed according to the requirements of the user.
In an implementation manner of the embodiment of the present invention, the monitoring system further analyzes the monitoring data to obtain a monitoring result, and displays the monitoring result on the display interface in a form of a graph, a report form, and the like so as to enable a user to know the monitoring result. The display interface can be a webpage, and a user can access the webpage through terminal equipment such as a computer and a mobile phone to obtain a monitoring result. Further, according to the actual requirements of the user, the monitoring system can also judge whether the virtual machine corresponding to the monitored object has an abnormal condition based on the monitoring data, and when the judgment result is yes, alarm information is generated, the alarm information is displayed on the display interface, and meanwhile, the alarm information can be sent to the short message gateway in the form of a short message and/or sent to the mail server in the form of a mail so that the user can know the abnormal condition. Obviously, the way of notifying the user is not limited to the short message and the email, and the short message and the email are only two more common implementations.
In summary, the resource monitoring method provided in the embodiment of the present invention synchronizes the monitoring object and the virtual machine to be monitored in real time by monitoring the operation message generated when the cloud computing management platform operates the virtual machine, so as to ensure data consistency between the monitoring object and the virtual machine to be monitored, and further obtain the monitoring data on the basis to monitor the monitoring object, and the monitoring result is accurate and the execution efficiency is high. And the data synchronization process of the monitored object can be automatically completed through the monitoring system, so that the problems of low operation and maintenance efficiency and poor real-time performance caused by manual setting and synchronization of the monitored object are solved. In addition, the monitoring system provided by the embodiment of the invention operates independently of the cloud computing management platform, which is equivalent to the function expansion of the cloud computing management platform, so that the monitoring capability of the cloud computing management platform can be greatly enhanced, good analysis and display can be provided for monitoring data, and advanced functions such as monitoring alarm and the like can be realized on the basis.
Second embodiment
Fig. 4 is a functional block diagram of a resource monitoring apparatus 200 according to an embodiment of the present invention. Referring to fig. 4, a resource monitoring apparatus 200 according to an embodiment of the present invention includes a message monitoring module 210, a data updating module 220, and a data collecting module 230. The message monitoring module 210 is configured to monitor and obtain an operation message generated when the cloud computing management platform operates the virtual machine; the data updating module 220 is configured to update the monitoring object corresponding to the virtual machine based on the operation message; the data collection module 230 is configured to obtain updated monitoring data of the monitored object from the cloud computing management platform.
In the embodiment of the present invention, the resource monitoring apparatus 200 further includes a connection establishing module and a monitoring setting module. The connection establishing module is used for establishing connection with a message queue server of the cloud computing management platform; the monitoring setting module is used for calling a monitoring setting interface of the message queue server, and appointing a message switch to be monitored and a message monitoring queue bound with the message switch in calling parameters so as to enable the message queue server to establish the message monitoring queue; the message monitoring module 210 is specifically configured to obtain the operation message from the message monitoring queue after the message switch forwards the received operation message to the message monitoring queue.
In the embodiment of the present invention, the data update module 220 includes a message parsing unit and a data update unit. The message analysis unit is used for analyzing and obtaining an operation type corresponding to the operation message; the data updating unit is used for updating the monitoring object corresponding to the virtual machine based on the operation type.
The resource monitoring apparatus 200 according to the embodiment of the present invention has the same implementation principle and technical effect as those of the foregoing method embodiments, and for the sake of brief description, reference may be made to corresponding contents in the foregoing method embodiments for parts that are not mentioned in the apparatus embodiments.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, 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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A resource monitoring method is applied to a monitoring system independent of a cloud computing management platform, and comprises the following steps:
monitoring and obtaining an operation message generated when the cloud computing management platform operates the virtual machine;
updating a monitoring object corresponding to the virtual machine based on the operation message;
obtaining updated monitoring data of the monitored object from the cloud computing management platform;
before the monitoring obtains the operation message generated when the cloud computing management platform operates the virtual machine, the method further includes:
establishing connection with a message queue server of the cloud computing management platform;
calling a monitoring setting interface of the message queue server, and specifying a message switch to be monitored and a message monitoring queue bound with the message switch in a calling parameter so that the message queue server creates the message monitoring queue;
the monitoring and obtaining of the operation message generated when the cloud computing management platform operates the virtual machine includes:
and after the message switch forwards the received operation message to the message monitoring queue, obtaining the operation message from the message monitoring queue.
2. The resource monitoring method according to claim 1, wherein the updating the monitoring object corresponding to the virtual machine based on the operation message comprises:
analyzing to obtain an operation type corresponding to the operation message;
and updating the monitoring object corresponding to the virtual machine based on the operation type.
3. The resource monitoring method according to claim 2, wherein the obtaining of the updated monitoring data of the monitored object from the cloud computing management platform comprises:
and calling a monitoring data acquisition interface provided by the cloud computing management platform to obtain updated monitoring data of the monitored object.
4. The resource monitoring method according to any one of claims 1 to 3, wherein before the monitoring obtains the operation message generated when the cloud computing management platform operates the virtual machine, the method further comprises:
calling a basic data acquisition interface provided by the cloud computing management platform to obtain basic information of the virtual machine;
and creating the monitoring object corresponding to the virtual machine based on the basic information.
5. The resource monitoring method according to claim 4, wherein after collecting the updated monitoring data of the monitored object from the cloud computing management platform, the method further comprises:
generating a monitoring result of the updated monitored object based on the monitoring data;
and displaying the monitoring result on a display interface of the monitoring system.
6. The method of claim 4, wherein after displaying the monitoring results on a presentation interface of the monitoring system, the method further comprises:
judging whether the updated monitored object has an abnormal condition or not based on the monitoring data;
and if so, generating alarm information and sending the alarm information to a short message gateway in a short message form and/or sending the alarm information to a mail server in a mail form.
7. A resource monitoring device is applied to a monitoring system independent of a cloud computing management platform, and comprises:
the message monitoring module is used for monitoring and obtaining an operation message generated when the cloud computing management platform operates the virtual machine;
the data updating module is used for updating the monitoring object corresponding to the virtual machine based on the operation message;
the data acquisition module is used for acquiring updated monitoring data of the monitored object from the cloud computing management platform;
the connection establishing module is used for establishing connection with a message queue server of the cloud computing management platform;
the monitoring setting module is used for calling a monitoring setting interface of the message queue server, and appointing a message switch to be monitored and a message monitoring queue bound with the message switch in calling parameters so as to enable the message queue server to create the message monitoring queue;
the message monitoring module is specifically configured to obtain the operation message from the message monitoring queue after the message switch forwards the received operation message to the message monitoring queue.
8. The resource monitoring apparatus of claim 7, wherein the data update module comprises:
the message analysis unit is used for analyzing and obtaining the operation type corresponding to the operation message;
and the data updating unit is used for updating the monitoring object corresponding to the virtual machine based on the operation type.
CN201810224899.3A 2018-03-19 2018-03-19 Resource monitoring method and device Active CN108540341B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810224899.3A CN108540341B (en) 2018-03-19 2018-03-19 Resource monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810224899.3A CN108540341B (en) 2018-03-19 2018-03-19 Resource monitoring method and device

Publications (2)

Publication Number Publication Date
CN108540341A CN108540341A (en) 2018-09-14
CN108540341B true CN108540341B (en) 2021-01-29

Family

ID=63484010

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810224899.3A Active CN108540341B (en) 2018-03-19 2018-03-19 Resource monitoring method and device

Country Status (1)

Country Link
CN (1) CN108540341B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110750586B (en) * 2019-10-12 2022-04-22 北京浪潮数据技术有限公司 Operation information processing method and system of virtualization management platform
CN111124834B (en) * 2019-12-25 2023-08-15 曙光信息产业(北京)有限公司 Access method and device for monitoring data in cloud computing environment and computer equipment
CN111885395B (en) * 2020-06-11 2024-05-17 西安万像电子科技有限公司 Video monitoring method, device and system
CN113254162A (en) * 2021-07-06 2021-08-13 云宏信息科技股份有限公司 Management method for PowerVM virtualization, readable storage medium and cloud management platform
CN113672456B (en) * 2021-08-06 2024-06-11 济南浪潮数据技术有限公司 Modularized self-monitoring method, system, terminal and storage medium of application platform
CN114979158B (en) * 2022-05-23 2024-04-09 深信服科技股份有限公司 Resource monitoring method, system, equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458020A (en) * 2013-08-28 2013-12-18 华南理工大学 Method and system for monitoring cloud platform based on XCP
CN105592122A (en) * 2014-11-03 2016-05-18 ***股份有限公司 Cloud platform monitoring method and cloud platform monitoring system
CN107659458A (en) * 2017-11-02 2018-02-02 广东亿迅科技有限公司 Agent deployment upgrade methods and system based on git Version Controls

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156665B (en) * 2011-04-13 2012-12-05 杭州电子科技大学 Differential serving method for virtual system competition resources
WO2012163017A1 (en) * 2011-10-21 2012-12-06 华为技术有限公司 Method for processing access exception of distributed virtual machine and virtual machine monitor
CN104579761B (en) * 2014-12-24 2018-03-23 西安工程大学 A kind of nosql clusters automatic configuration system and method for automatic configuration based on cloud computing
CN105988858A (en) * 2015-05-15 2016-10-05 ***股份有限公司 Virtual machine resource scheduling method, device and system
US10536357B2 (en) * 2015-06-05 2020-01-14 Cisco Technology, Inc. Late data detection in data center
CN105389243B (en) * 2015-10-26 2018-06-05 华为技术有限公司 A kind of container monitors method and apparatus
CN107959588A (en) * 2017-12-07 2018-04-24 郑州云海信息技术有限公司 Cloud resource management method, cloud resource management platform and the management system of data center

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103458020A (en) * 2013-08-28 2013-12-18 华南理工大学 Method and system for monitoring cloud platform based on XCP
CN105592122A (en) * 2014-11-03 2016-05-18 ***股份有限公司 Cloud platform monitoring method and cloud platform monitoring system
CN107659458A (en) * 2017-11-02 2018-02-02 广东亿迅科技有限公司 Agent deployment upgrade methods and system based on git Version Controls

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于OpenStack云资源监控***设计与实现;朱亚楠;《中国优秀硕士学位论文全文数据库》;20170215;正文第30-31页 *

Also Published As

Publication number Publication date
CN108540341A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN108540341B (en) Resource monitoring method and device
CN109815028B (en) System, method, apparatus and computer storage medium for data synchronization
EP3819757A1 (en) Edge application management method and system
CN109271233B (en) Implementation method for establishing Hadoop cluster based on Kubernetes
EP3281360B1 (en) Virtualized network function monitoring
CN109327351B (en) Method and device for collecting log data in real time, electronic equipment and storage medium
CN107800565B (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
CN113742031B (en) Node state information acquisition method and device, electronic equipment and readable storage medium
CN109245908B (en) Method and device for switching master cluster and slave cluster
CN108628716B (en) Information receiving and managing system, method and device
CN111611091A (en) Service calling method, device and medium for business object
WO2023246347A1 (en) Digital twin processing method and digital twin system
TW201629792A (en) Method and apparatus for changing configurations
US10942831B2 (en) Automating and monitoring rolling cluster reboots
CN113377626B (en) Visual unified alarm method, device, equipment and medium based on service tree
WO2016115896A1 (en) Method and device for management of virtual network function (vnf)
CN111064626A (en) Configuration updating method, device, server and readable storage medium
CN107086937B (en) Monitoring method and device
WO2019062634A1 (en) Communication method and apparatus
CN115357662A (en) Data synchronization method, device and medium
CN111787088A (en) Method and device for processing applet data
EP3329407A1 (en) Application centric network experience monitoring
WO2013037234A1 (en) Parameter receiving method and system
CN112751689A (en) Network connectivity detection method, monitoring server and monitoring agent device
CN111930565B (en) Process fault self-healing method, device and equipment for components in distributed management system

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