WO2017031988A1 - Resource monitoring method, apparatus and system - Google Patents

Resource monitoring method, apparatus and system Download PDF

Info

Publication number
WO2017031988A1
WO2017031988A1 PCT/CN2016/078121 CN2016078121W WO2017031988A1 WO 2017031988 A1 WO2017031988 A1 WO 2017031988A1 CN 2016078121 W CN2016078121 W CN 2016078121W WO 2017031988 A1 WO2017031988 A1 WO 2017031988A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource
value
server
cloud node
resource state
Prior art date
Application number
PCT/CN2016/078121
Other languages
French (fr)
Chinese (zh)
Inventor
童遥
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017031988A1 publication Critical patent/WO2017031988A1/en

Links

Images

Classifications

    • 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

Definitions

  • This paper relates to the field of resource monitoring technology, and in particular, to a resource monitoring method, device and system.
  • Cloud computing is an emerging business computing model that distributes computing tasks across resource pools of large numbers of computer resources, enabling users to acquire computing power, storage space, and various software services on demand.
  • the cloud computing data center combines huge infrastructure resources, data storage resources, platform resources, and various software service resources to share a pool of collaborative resources, and abstracts some hierarchical services, such as the infrastructure layer, from the resource pool ( Different levels of services such as IaaS), platform layer (PaaS), and software layer (SaaS).
  • the resource monitoring of the cloud computing data center is to improve the operation and service quality of the cloud computing data center, and to monitor the usage and operation of various resources in the cloud computing data center.
  • the cloud node periodically pushes its own resource state value to the server, and the server also periodically pulls the resource state value of the cloud node, and the pushing and pulling of the resource state value causes a large amount of Communication consumption.
  • the communication consumption of the cloud computing data center resource monitoring is large.
  • the main objective of the present invention is to provide a resource monitoring method, device and system, which aim to reduce communication consumption of cloud computing data center resource monitoring.
  • a resource monitoring method includes:
  • the cloud node determines whether the server pulls the resource state value of the cloud node in the current push period
  • the cloud node When the server does not pull the resource status value of the cloud node in the current push period, the cloud node acquires its current resource status value, and pushes the obtained resource status value to the server.
  • the cloud node acquires its current resource state value, and obtains the obtained resource state value.
  • the steps of pushing to the server include:
  • the cloud node obtains its current resource state value
  • the cloud node pushes the resource state value to the server.
  • the step of determining, by the cloud node, whether the acquired resource status value meets a preset push condition comprises:
  • the cloud node pushes the resource status value into a resource monitoring window of the cloud node, and calculates a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and based on the difference And calculating, by the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
  • the cloud node calculates a resource state change value based on the resource state value and the recorded resource state value acquired by the server at a time;
  • the cloud node determines that the resource state value satisfies the preset push condition.
  • a resource monitoring method includes:
  • the server determines whether the resource status value pushed by the cloud node is received in the current pull period
  • the server pulls the current resource state value of the cloud node.
  • the method further includes include:
  • the server pushes the resource status value into a resource monitoring window of the server, and calculates a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the difference and the Calculating, by the preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
  • the server calculates a resource state change value based on the resource state value and the recorded resource state value obtained by the server, and determines whether the resource state change value is smaller than the resource monitoring threshold;
  • the server When the resource state change value is greater than or equal to the resource monitoring threshold, the server shortens the pull cycle according to the resource state change value;
  • the server When the resource state change value is smaller than the resource monitoring threshold, the server extends the pull cycle according to the resource state change value.
  • a resource monitoring device includes a first determining module and a pushing module, wherein
  • the first determining module is configured to: determine whether the server has pulled the resource status value of the cloud node in the current push period;
  • the pushing module is configured to: when the server does not pull the resource state value of the cloud node in the current pushing period, acquire the current resource state value of the cloud node, and obtain the obtained resource state value. Push to the server.
  • the pushing module includes an obtaining submodule, a determining submodule, and a pushing submodule, wherein
  • the acquiring sub-module is configured to: when the server does not pull the resource state value of the cloud node in the current push period, obtain the current resource state value of the cloud node;
  • the determining sub-module is configured to: determine whether the acquired resource state value meets a preset pushing condition
  • the push sub-module is configured to: push the resource status value to the server when the resource status value satisfies the preset push condition.
  • the determining submodule includes a calculating unit and a determining unit, where
  • the calculating unit is configured to: push the resource state value into a resource monitoring window of the cloud node, and calculate a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and Calculating, by the difference value and the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
  • the calculating unit is further configured to: calculate a resource state change value based on the resource state value and the recorded resource state value acquired by the server last time;
  • the determining unit is configured to: when the resource state change value is greater than the resource monitoring threshold, determine that the resource state value satisfies the preset push condition.
  • a resource monitoring device includes a second determining module and a pulling module, wherein
  • the second determining module is configured to: determine whether the server where the server is located receives the resource status value pushed by the cloud node during the current pull period;
  • the pull module is configured to: when the server does not receive the resource state value pushed by the cloud node in the current pull period, pull the current resource state value of the cloud node.
  • the resource monitoring device further includes a computing module and an adjustment module, where
  • the calculating module is configured to: push the resource status value into a resource monitoring window of the server, and calculate a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the Calculating, by the difference and the second preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
  • the calculating module is further configured to: calculate a resource state change value based on the resource state value, and the recorded resource state value acquired by the server, and determine whether the resource state change value is smaller than the resource monitoring threshold ;
  • the adjusting module is configured to: when the resource state change value is greater than or equal to the resource monitoring threshold, shorten the pull period according to the resource state change value; and when the resource state change value is smaller than the resource When the threshold is monitored, the pull cycle is extended according to the resource state change value.
  • a cloud node includes any of the above resource monitoring devices.
  • a server includes any of the above resource monitoring devices.
  • a resource monitoring system includes: any of the above cloud nodes and any of the foregoing servers.
  • the resource monitoring system further includes a query server,
  • the query server is configured to forward the query instruction to the server when receiving a query instruction sent by the user terminal;
  • the server further includes: an obtaining module, configured to: when receiving the query instruction, acquire a resource state value of the cloud node, and send the obtained resource state value to the query server;
  • the query server is further configured to: when the resource status value is received, send the resource status value to the user terminal for display.
  • the cloud node performs the resource status value when the resource status value of the cloud node is not pulled by the server during the current push period by combining the push and pull status of the resource status values.
  • the push operation reduces unnecessary network transmission and reduces the communication consumption of resource monitoring.
  • FIG. 1 is a schematic flowchart of a first embodiment of a resource monitoring method according to the present invention
  • FIG. 2 is a diagram showing, when the server does not pull the resource status value of the cloud node in the current push period, the cloud node acquires a current resource status value, and pushes the obtained resource status value. Schematic diagram of the refinement process to the server;
  • FIG. 3 is a schematic diagram of a refinement process of determining whether the resource status value obtained by the cloud node in FIG. 2 meets a preset push condition
  • FIG. 4 is a diagram showing an example of a hierarchical structure of a cloud computing data center monitoring system using the resource monitoring method of the present invention
  • FIG. 5 is a schematic flowchart of a fourth embodiment of a resource monitoring method according to the present invention.
  • FIG. 6 is a schematic flowchart of a fifth embodiment of a resource monitoring method according to the present invention.
  • FIG. 7 is a schematic diagram of functional modules of a first embodiment of a resource monitoring apparatus according to the present invention.
  • Figure 8 is a schematic view showing the refinement structure of the push module of Figure 7;
  • FIG. 9 is a schematic diagram showing the refinement structure of the judging sub-module in FIG. 8;
  • FIG. 10 is a schematic diagram of functional modules of a fourth embodiment of a resource monitoring apparatus according to the present invention.
  • FIG. 11 is a schematic diagram of functional modules of a fifth embodiment of a resource monitoring apparatus according to the present invention.
  • FIG. 12 is a schematic diagram of a topology structure of a first embodiment of a resource monitoring system according to the present invention.
  • FIG. 13 is a schematic diagram showing the logic level of the first embodiment of the resource monitoring system of the present invention.
  • the embodiment of the present invention provides a resource monitoring method.
  • the resource monitoring method includes:
  • the cloud node determines whether the server pulls the resource state value of the cloud node in the current push period.
  • the resource monitoring method provided in this embodiment may be applied to resource monitoring in a cloud computing data center.
  • the cloud node pushes a resource state value according to a preset pushing period, if the current pushing period is in the current pushing period.
  • the server has already pulled the resource status value of the cloud node.
  • the cloud node does not perform the current resource state value push operation, that is, does not perform the current resource state value acquisition and push; if the server does not pull the resource state value of the cloud node in the current cycle, the cloud node executes the current time.
  • Resource status value push operations to reduce communication consumption for cloud computing data center resource monitoring.
  • the cloud node determines whether the resource state value of the cloud node is pulled by the server during the current push period to determine whether the current resource state value push operation needs to be performed.
  • the cloud node includes at least one of a virtual machine and a physical machine.
  • the cloud node acquires a current resource state value, and pushes the resource state value to the server.
  • the secondary resource state value push operation updates the resource state value corresponding to the cloud node on the server.
  • the cloud node acquires a current resource state value, and pushes the resource state value to the a server for the server to perform an update operation based on the resource status value.
  • cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
  • the infrastructure layer allows hardware resources to provide services in an immediate manner
  • the platform layer allows the application platform to provide services in an instant manner
  • the application layer allows the application to provide services in an instant manner
  • login application portal can use the application directly, even without installing the application locally, just like opening the tap can use water, and then pay, it is essentially a Push service.
  • the cloud node when the cloud node acquires the current resource state value, it is preferred to collect each The runtime resource state values of the hierarchy (including the infrastructure layer, platform layer, and application layer), that is, the latest resource state values for each level.
  • the method further includes:
  • the cloud node When the server does not pull the resource status value of the cloud node in the current push period, the cloud node does not perform the current resource status value push operation;
  • the cloud node does not pull the resource state value of the cloud node in the current push period by using the method of acquiring the two resource state values in combination with the push and pull.
  • Pushing resource status values reduces unnecessary network transmission and reduces communication consumption of cloud computing data center resource monitoring.
  • the step S20 includes:
  • the difference between this embodiment and the first embodiment is that, in this embodiment, when the cloud node performs the pushing of the resource status value, the preset push condition is added to limit, so as to filter out the uselessness in the monitoring process. Resource status value.
  • the cloud node determines that the server does not pull the resource state value of the cloud node in the current push period, the cloud node acquires a current resource state value, where the cloud node acquires
  • the resource status values include the latest resource status values of the infrastructure layer, the platform layer, and the application layer.
  • the resource status values obtained to the infrastructure layer include CPU occupancy, memory occupancy, and storage space occupancy.
  • the cloud node determines whether the acquired resource state value meets a preset pushing condition.
  • the cloud node After obtaining the current resource state value, the cloud node first determines the acquired resource shape. Whether the state value satisfies the preset push condition to determine whether the obtained resource state value is required by the user.
  • the preset push condition may include:
  • the acquired resource status value is located in a first interval of preset trigger information push.
  • the cloud node obtains the current CPU occupancy rate of 80%, and is located in a first interval [75%, 100%] of the preset trigger information push, and the cloud node determines that the acquired CPU occupancy rate satisfies the preset push. condition.
  • the preset push condition may further include:
  • the difference between the obtained resource state value and the last acquired resource state value of the server is located in a second interval of the preset trigger information push, where the last acquired resource state value of the server is the cloud node.
  • the cloud node obtains the current CPU occupancy rate of 80%, and the latest resource status value corresponding to the cloud node on the server is the CPU occupancy rate of the last push of the cloud node, which is 50%.
  • the difference 30% is located in the second interval [20%, + ⁇ ) of the preset trigger information push, and the cloud node determines that the acquired CPU occupancy rate satisfies the preset push condition.
  • the cloud node pushes the resource state value to the server.
  • the cloud state value is pushed to the server for the The server update corresponds to the resource status value of the cloud node as the latest resource status value.
  • step S22 includes:
  • the cloud node pushes the resource status value into a resource monitoring window of the cloud node, and calculates a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and based on the Calculating a resource monitoring threshold corresponding to the resource state value by using a difference value and a first preset calculation parameter value;
  • the cloud node determines whether a resource state value push operation needs to be performed by the degree of change of the resource state.
  • the image said that the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring.
  • the size of the window which is the difference between the maximum resource state value and the minimum resource state value in the resource monitoring window.
  • CRMT CRMW.V*CRMI...Formula (1)
  • CRMT represents a resource monitoring threshold
  • CRMW.V represents an updated V value
  • CRMI represents a monitoring relative error rate, that is, the first preset calculation parameter.
  • the value range of the CRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value.
  • the CRMI can be set by default by the cloud node, and can also be manually set by the user. For example, the CRMI is set to 15% by default by the cloud node.
  • the cloud node pushes the acquired resource state value into the resource monitoring window, first determining whether the capacity of the resource monitoring window is full, and if so, moving the earliest resource state value out of the window, and then The obtained resource status value is pushed into the resource monitoring window; otherwise, the newly acquired resource status value is directly pushed into the resource monitoring window.
  • the cloud node calculates a resource state change value based on the resource state value and the recorded resource state value acquired by the server at a time;
  • the resource state value of the push is recorded, and when the server detects that the resource state value of the cloud node is pulled, the server pulls the server. Resource status value.
  • the cloud node calculates a resource state change value based on the currently obtained resource state value and the recorded resource state value acquired by the server. Specifically, the cloud node is based on the recorded resource state value that is last pushed by the cloud node, and the recorded service The server last pulls the recording time point corresponding to the resource state value of the cloud node, and determines the latest resource state value corresponding to the cloud node on the server, that is, the resource state value obtained by the server last time, and Substituting the obtained resource state value and the latest resource state value into the formula (2) to calculate the resource state change value:
  • the RCV represents a resource state change value
  • the CRN represents a newly acquired resource state value
  • the RO represents a latest resource state value corresponding to the cloud node on the server.
  • the cloud node determines that the resource state value meets the preset push condition.
  • the cloud node determines that the acquired resource state value satisfies the preset push condition.
  • the value of the resource state change of the cloud node and the server is not greater than the current resource monitoring threshold of the resource, that is, the degree of change of the resource state does not exceed the range that the user can tolerate, and further, based on maintaining data consistency between the server and the cloud node, further Reduce the communication consumption of resource monitoring.
  • the data center monitoring system includes three levels: a data presentation layer (Presentation Layer), a logical processing core layer (Logic Layer), and a data persistence access layer (Data Access Layer).
  • Presentation Layer a data presentation layer
  • Logic Layer a logical processing core layer
  • Data Access Layer a data persistence access layer
  • the data display layer uses FLEX to write the display interface, providing rich data graphic display effects, such as histograms, graphs, reports, etc., which can dynamically display the real-time resource status values of each node in the cloud computing data center.
  • the logical processing core layer is responsible for processing the monitoring data and providing an access interface, including five modules, which are Agent Manager (Agent Management) deployed on each node of the cloud computing data center (including physical machines and virtual machines). Modules, and Event Manager modules deployed on the server, CEP Engine (Complex Event Processing Engine) modules, Strategy Manager (Policy Management) modules, and API Interface (Application Programming Interface) modules.
  • Agent Manager Agent Management
  • Event Manager deployed on the server
  • CEP Engine Complex Event Processing Engine
  • Strategy Manager Policy Management
  • API Interface Application Programming Interface
  • the Agent Manager module is responsible for collecting all levels on the host node (infrastructure layer, platform layer and application layer) Runtime information, which filters out useless status information in the monitoring process, and then assembles into a data packet to be sent to the server according to the policy provided by the resource monitoring method in the embodiment of the present invention;
  • the Event manager module is responsible for pre-eventing events in the Agent Manager.
  • CEP Engine complex event processing engine
  • CEP Engine module is responsible for event rule matching, pattern matching events sent by the Event manager module, and then put the event into the event processing queue waiting for the Strategy Manager module to process
  • the Strategy Manager module takes the event from the event processing queue and processes it according to the pre-defined strategy
  • the API Interface module is responsible for interacting with the Web front end and providing an access interface.
  • the data persistence access layer is responsible for providing a variety of data persistence access methods, including the Database Provider module and the XML Provider (Extensible Markup Language Support) module, wherein the Database Provider module provides support for database access, and the XML Provider module. Provides support for reading and writing XML files and provides an interface for front-end calls to query.
  • the Database Provider module provides support for database access
  • the XML Provider module provides support for front-end calls to query.
  • the cloud computing data center monitoring system can reduce communication consumption of resource monitoring on the basis of ensuring consistency of server and node resource status values.
  • the embodiment of the present invention further provides a resource monitoring method.
  • a fourth embodiment of the resource monitoring method of the present invention is provided.
  • the resource monitoring method includes:
  • the server determines whether a resource status value pushed by the cloud node is received in the current pull period.
  • the resource monitoring method in this embodiment may be applied to the resource monitoring of the cloud computing data center.
  • the server pulls the resource state value from the cloud node by using a preset pull period, if the current state is pulled. During the period, the server receives the resource status value pushed by the cloud node, and the server cancels the current resource status value pull operation; if the current pull period does not, the server does not receive the resource pushed by the cloud node.
  • the state value the server performs the current resource state value pull operation to achieve the purpose of reducing the cloud computing data center resource monitoring communication consumption.
  • monitoring the cloud computing data center often does not require the specific use of the specific resources of the entire system, but only needs to know whether the current usage status of each resource is in a predetermined state. Within the acceptable range, only state monitoring is required.
  • the server determines whether the resource status value pushed by the cloud node is received in the current pull period to determine whether the current resource status value pull operation needs to be performed.
  • the server pulls a current resource state value of the cloud node when the resource state value pushed by the cloud node is not received in the current pull period.
  • the secondary resource state value pull operation updates the resource state value corresponding to the cloud node on the server.
  • the server pulls the current resource state value of the cloud node, and updates the resource state corresponding to the cloud node. value.
  • cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
  • the infrastructure layer allows hardware resources to provide services in an immediate manner
  • the platform layer allows the application platform to provide services in an instant manner
  • the application layer allows the application to provide services in an instant manner
  • login application portal can use the application directly, even without installing the application locally, just like opening the tap can use water, and then pay, it is essentially a Push service.
  • the server when the server pulls the current resource state value of the cloud node, the server preferably pulls the runtime resource state values of each level of the cloud node (including the infrastructure layer, the platform layer, and the application layer). , that is, the latest resource status values at each level.
  • the method further includes:
  • the server When receiving the resource status value pushed by the cloud node in the current pull period, the server does not perform the current resource status value pull operation;
  • the server performs the resource when the resource state value pushed by the cloud node is not received in the current pull period by combining the push and pull state of the resource state values.
  • the pull operation of the status value reduces unnecessary network transmission and can reduce the communication consumption of resource monitoring.
  • a fifth embodiment of the resource monitoring method of the present invention is provided. Referring to FIG. 6, in the embodiment, after the step S120, the method further includes:
  • the server pushes the resource status value into a resource monitoring window of the server, and calculates a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the difference. And calculating, by the second preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
  • the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring.
  • the size of the window is the difference between the maximum and minimum values of the resource status values in the current resource monitoring window.
  • the SRMT represents a resource monitoring threshold
  • the SRMW.V represents an updated V value
  • the SRMI represents a monitoring relative error rate, which is a preset value, that is, the second preset calculation parameter.
  • the value range of the SRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value.
  • SRMI can be set by default by the server and can also be set manually by the user. For example, SRMI is set to 15% by default.
  • the server before pushing the pulled resource status value into the resource monitoring window, the server first determines whether the capacity of the resource monitoring window is full, and if so, moves the earliest resource state value out of the window, and then new The resource status value pulled is pushed into the resource monitoring window; otherwise, the newly pulled resource status value is directly pushed into the resource monitoring window.
  • the server calculates a resource state change value based on the resource state value and the recorded resource state value obtained by the server, and determines whether the resource state change value is smaller than the resource monitoring threshold; Go to step S150, and then go to step S160;
  • the server when the server receives the resource status value pushed by the cloud node, the resource status value pushed by the cloud node is recorded; when the server pulls the resource status value of the cloud node, the server records The resource status value pulled.
  • the server calculates the resource state change value based on the currently pulled resource state value and the resource state value acquired by the server last time. Specifically, the server determines, according to the recorded resource state value that the cloud node last pushed, and the recorded recording time point corresponding to the resource state value that is last pulled by the server, determining that the cloud node corresponds to the The latest resource status value of the cloud node, that is, the resource status value acquired by the server last time, and the pulled resource status value and the latest resource status value are substituted into the formula (4) to calculate the resource status change value:
  • the RCV represents a resource state change value
  • the SRN represents a newly pulled resource state value
  • the RO represents a latest resource state value corresponding to the cloud node on the server.
  • the server shortens the pull period according to the resource state change value.
  • the server extends the pull period according to the resource state change value.
  • the pull cycle when the server shortens the pull cycle, the pull cycle may be shortened according to a preset reduction amount, for example, the pull cycle is shortened by 5 seconds each time.
  • the server may further determine a reduction amount corresponding to the resource state change value according to a preset relationship between the resource state change value and the reduction amount, and shorten the pull cycle according to the determined reduction amount.
  • the pull cycle may be extended according to a preset increase amount, for example, the pull cycle is extended by 5 seconds each time.
  • the server may further determine an increase amount corresponding to the resource state change value according to a preset relationship between the resource state change value and the increase amount, and extend the pull cycle according to the determined increase amount.
  • the communication consumption of resource monitoring can be further reduced while maintaining the consistency of the cloud node and server resource state values.
  • the embodiment of the present invention further provides a resource monitoring apparatus.
  • the resource monitoring apparatus includes:
  • the first determining module 10 is configured to: determine whether the server pulls the resource status value of the cloud node in the current push period;
  • the resource monitoring device of the present embodiment can be applied to the resource monitoring of the cloud computing data center.
  • the resource monitoring device is built in the cloud node, and the cloud node pushes the resource state value at intervals according to a preset pushing period.
  • the server has pulled the resource state value of the cloud node, and the cloud node does not perform the current resource state value push operation, that is, does not perform the current resource state value acquisition and push; if in the current cycle
  • the server does not pull the resource state value of the cloud node, and the cloud node performs the current resource state value push operation to reduce the communication consumption of the cloud computing data center resource monitoring.
  • the resource monitoring device provided in this embodiment is built in the cloud node. Specifically, the first determining module 10 determines whether the server pulls the resource state value of the cloud node in the current push period to determine whether the current need is performed. Resource status value push operation.
  • the cloud node includes at least one of a virtual machine and a physical machine.
  • the pushing module 20 is configured to: when the server does not pull the resource state value of the cloud node in the current pushing period, acquire the current resource state value of the cloud node, and obtain the obtained resource state value. Push to the server.
  • the push module 20 needs to perform The secondary resource state value push operation updates the resource state value corresponding to the cloud node on the server.
  • the pushing module 20 acquires the current resource state value of the cloud node, and obtains the resource state. A value is pushed to the server for the server to perform an update operation based on the resource status value.
  • cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
  • the infrastructure layer allows hardware resources to provide services in an immediate manner
  • the platform layer allows the application platform to provide services in an instant manner
  • the application layer allows the application to provide services in an instant manner
  • login application portal can use the application directly, even without installing the application locally, just like opening the tap can use water, and then pay, it is essentially a Push service.
  • the push module 20 when the current resource state value of the cloud node is acquired, the push module 20 preferably collects runtime resource state values of each level of the cloud node (including an infrastructure layer, a platform layer, and an application layer). , that is, the latest resource status values at each level.
  • the push module 20 when the server pulls the resource status value of the cloud node in the current push period, the push module 20 does not perform the resource status value push operation;
  • the push module 20 does not It is then necessary to perform a resource state value push operation.
  • the resource monitoring device provided in this embodiment is built in the cloud node, and combined with the method of obtaining the two resource state values by pushing and pulling, so that the cloud node does not pull the server in the current push period.
  • the resource state value of the cloud node is used, the resource state value is pushed, the unnecessary network transmission is reduced, and the communication consumption of the cloud computing data center resource monitoring can be reduced.
  • the pushing module 20 includes:
  • the obtaining sub-module 21 is configured to: when the server does not pull the resource state value of the cloud node in the current push period, obtain the current resource state value of the cloud node;
  • the push module 20 adds a preset push condition to limit the push of the resource status value to filter out the monitoring process. Unwanted resource status value.
  • the acquiring sub-module 21 acquires the current cloud node.
  • the resource status value wherein the resource status value acquired by the obtaining submodule 21 includes an latest resource status value of an infrastructure layer, a platform layer, and an application layer.
  • the resource status values obtained by the acquisition sub-module 21 to the infrastructure layer include the CPU occupancy rate, the memory occupancy rate, and the storage space occupancy rate.
  • the determining sub-module 22 is configured to: determine whether the acquired resource state value satisfies a preset pushing condition
  • the determining sub-module 22 After the obtaining sub-module 21 acquires the current resource state value of the cloud node, the determining sub-module 22 first determines whether the acquired resource state value satisfies a preset pushing condition, and determines the acquired resource state value. Whether it is needed by the user.
  • the preset push condition may include:
  • the acquired resource status value is located in a first interval of preset trigger information push.
  • the obtaining sub-module 21 acquires that the current CPU occupancy rate of the cloud node is 80%, and is located in a first interval [75%, 100%] of the preset trigger information push, and the determining sub-module 22 determines The CPU occupancy rate obtained by the acquisition sub-module 21 satisfies a preset push condition.
  • the preset push condition may further include:
  • the difference between the obtained resource state value and the last acquired resource state value of the server is located in a second interval of the preset trigger information push, where the last acquired resource state value of the server is the cloud node.
  • the acquisition sub-module 21 obtains that the current CPU occupancy rate of the cloud node is 80%, and the latest resource status value corresponding to the cloud node on the server is the CPU occupancy rate of the last pull of the server. 50%, the difference between the two is 30% in the second interval [20%, + ⁇ ) of the preset trigger information push, and the determining sub-module 22 determines the CPU possession acquired by the obtaining sub-module 21 The rate meets the preset push conditions.
  • the pushing sub-module 23 is configured to: when the resource state value satisfies the preset pushing condition, push the resource state value to the server.
  • the obtaining sub-module 21 acquires the current resource state value of the cloud node
  • the determining sub-module 22 determines that the acquired resource state value satisfies the preset pushing condition, Pushing the resource status value to the server for the server to update the pair
  • the resource status value of the cloud node should be the latest resource status value.
  • the determining sub-module 22 includes:
  • the calculating unit 221 is configured to: push the resource state value into a resource monitoring window of the cloud node, and calculate a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and Calculating, by the difference value and the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
  • the determining sub-module 22 determines whether a resource state value pushing operation is required by the degree of change of the resource state.
  • the image said that the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring.
  • L, V two-group
  • the size of the window which is the difference between the maximum resource state value and the minimum resource state value in the resource monitoring window.
  • the computing unit 221 pushes the resource state value into the resource monitoring window, and then updates the V value of the resource monitoring window, and updates the V value. Substituting formula (1) to calculate a resource monitoring threshold corresponding to the resource status value:
  • CRMT CRMW.V*CRMI...Formula (1)
  • CRMT represents a resource monitoring threshold
  • CRMW.V represents an updated V value
  • CRMI represents a monitoring relative error rate, that is, the first preset calculation parameter.
  • the value range of the CRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value.
  • the CRMI can be set by default by the cloud node, and can also be manually set by the user. For example, the CRMI is set to 15% by default by the cloud node.
  • the calculating unit 221 first determines whether the capacity of the resource monitoring window is full before pushing the acquired resource state value into the resource monitoring window, and if so, the earliest one.
  • the resource status value is moved out of the window, and the newly acquired resource status value is pushed into the resource monitoring window; otherwise, the newly acquired resource status value is directly pushed into the resource monitoring window.
  • the calculating unit 221 is further configured to: calculate a resource state change value based on the resource state value and the recorded resource state value acquired by the server last time;
  • the resource monitoring apparatus further includes a recording module configured to: when the cloud node (the push module 20) pushes the resource state value, record the resource state value pushed by the cloud node; and pull the cloud node at the server When the resource status value is used, the resource status value pulled by the server is recorded.
  • a recording module configured to: when the cloud node (the push module 20) pushes the resource state value, record the resource state value pushed by the cloud node; and pull the cloud node at the server When the resource status value is used, the resource status value pulled by the server is recorded.
  • the calculating unit 221 calculates the resource state change value based on the currently obtained resource state value and the resource state value acquired by the server last time recorded by the recording module. Specifically, the calculating unit 221 determines, according to the recorded resource state value that is last pushed by the cloud node, and the recorded recording time point corresponding to the resource state value of the cloud node that is last pulled by the server. The latest resource status value corresponding to the cloud node on the server, that is, the resource status value acquired by the server last time, and the obtained resource status value and the latest resource status value are substituted into the formula (2) computing resource status Change value:
  • the RCV represents a resource state change value
  • the CRN represents a newly acquired resource state value
  • the RO represents a latest resource state value corresponding to the cloud node on the server.
  • the determining unit 222 is configured to: when the resource state change value is greater than the resource monitoring threshold, determine that the resource state value meets the preset push condition.
  • the determining unit 222 determines that the acquired resource state value satisfies the preset push condition.
  • the value of the resource state change of the cloud node and the server is not greater than the current resource monitoring threshold of the resource, that is, the degree of change of the resource state does not exceed the range that the user can tolerate, and further, based on maintaining data consistency between the server and the cloud node, further Reduce the communication consumption of resource monitoring.
  • the data center monitoring system includes three levels: a data presentation layer (Presentation Layer), a logical processing core layer (Logic Layer), and a data persistence access layer (Data Access). Layer).
  • Presentation Layer a data presentation layer
  • Logic Layer a logical processing core layer
  • Data Access Data persistence access layer
  • the data display layer uses FLEX to write the display interface, providing rich data graphic display effects, such as histograms, graphs, reports, etc., which can dynamically display the real-time resource status values of each node in the cloud computing data center.
  • the logical processing core layer is responsible for processing the monitoring data and providing an access interface, including five modules, which are Agent Manager (Agent Management) deployed on each node of the cloud computing data center (including physical machines and virtual machines). Modules, and Event Manager modules deployed on the server, CEP Engine (Complex Event Processing Engine) modules, Strategy Manager (Policy Management) modules, and API Interface (Application Programming Interface) modules.
  • Agent Manager module is responsible for collecting runtime information of each level (infrastructure layer, platform layer and application layer) on the host node, which filters out useless status information in the monitoring process, and then assembles into a data packet according to the present invention.
  • the policy provided by the resource monitoring method is sent to the server; the Event manager module is responsible for preprocessing the events in the Agent Manager and then sending them to the CEP Engine (complex event processing engine) module for processing; the CEP Engine module is responsible for matching the event rules, and the Event is The event sent by the manager module performs pattern matching, and then puts the event into the event processing queue for processing by the Strategy Manager module; the Strategy Manager module takes the event from the event processing queue and performs corresponding processing according to the pre-defined strategy; the API Interface module is responsible for Interact with the web front end and provide an access interface.
  • the data persistence access layer is responsible for providing a variety of data persistence access methods, including the Database Provider module and the XML Provider (Extensible Markup Language Support) module, wherein the Database Provider module provides support for database access, and the XML Provider module. Provides support for reading and writing XML files and provides an interface for front-end calls to query.
  • the Database Provider module provides support for database access
  • the XML Provider module provides support for front-end calls to query.
  • the cloud computing data center monitoring system can reduce communication consumption of resource monitoring on the basis of ensuring consistency of server and node resource status values.
  • the embodiment of the present invention further provides a resource monitoring apparatus.
  • a fourth embodiment of the resource monitoring apparatus of the present invention is provided.
  • the resource monitoring apparatus includes:
  • the second determining module 110 is configured to: determine whether the server where the server is located receives the resource status value pushed by the cloud node during the current pull period;
  • the resource monitoring device of the present embodiment can be applied to the resource monitoring of the cloud computing data center.
  • the resource monitoring device is built in the server, and the server pulls the resource state value from the cloud node by using a preset pull period. If the server receives the resource status value pushed by the cloud node during the current pull period, the server cancels the current resource status value pull operation; if the current pull period, the server does not receive the The resource status value pushed by the cloud node, and the server performs the current resource status value pull operation to reduce the consumption of the cloud computing data center resource monitoring communication.
  • the second determining module 110 is configured to: determine whether the server where the server is located receives the resource state value pushed by the cloud node during the current pull period, to determine whether the current resource state value pull operation needs to be performed.
  • the pull module 120 is configured to: when the server does not receive the resource state value pushed by the cloud node in the current pull period, pull the current resource state value of the cloud node.
  • the pull module 120 needs to be updated.
  • the current resource status value pull operation is performed to update the resource status value corresponding to the cloud node on the server.
  • the pull module 120 pulls the current resource state value of the cloud node when the server does not receive the resource state value pushed by the cloud node in the current pull period.
  • the server update corresponds to a resource status value of the cloud node.
  • cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
  • the infrastructure layer allows hardware resources to provide services in an immediate manner
  • the platform layer allows the application platform to provide services in an instant manner
  • the application layer allows the application to provide services in an instant manner
  • the way is like hydropower, from the beginning to the end of use to measure, the login should With the portal, you can use the app directly, even without installing the app locally, just like opening the tap to use water, and then paying, it is essentially a push service.
  • the pull module 120 preferably pulls the running time of each level (including the infrastructure layer, the platform layer, and the application layer) of the cloud node when the current resource state value of the cloud node is pulled.
  • the resource status value which is the latest resource status value for each level.
  • the pull module 120 when the server receives the resource status value pushed by the cloud node in the current pull period, the pull module 120 does not perform the current resource status value pull operation;
  • the pull module 120 is updated. It is no longer necessary to perform the current resource state value pull operation.
  • the resource monitoring device provided in this embodiment is built in the server and combined with the method of obtaining the two resource state values by pushing and pulling, so that the server does not receive the cloud node push in the current pull cycle.
  • the pull operation of the resource status value is performed, the unnecessary network transmission is reduced, and the communication consumption of the resource monitoring can be reduced.
  • the resource monitoring apparatus further includes:
  • the calculating module 130 is configured to: push the resource status value into a resource monitoring window of the server, and calculate a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the Calculating, by the difference and the second preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
  • the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring.
  • the size of the window is the difference between the maximum and minimum values of the resource status values in the current resource monitoring window.
  • the SRMT represents a resource monitoring threshold
  • the SRMW.V represents an updated V value
  • the SRMI represents a monitoring relative error rate, which is a preset value, that is, the second preset calculation parameter.
  • the value range of the SRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value.
  • SRMI can be set by default by the server and can also be set manually by the user. For example, SRMI is set to 15% by default.
  • the calculating module 130 first determines whether the capacity of the resource monitoring window is full before pushing the pulled resource state value into the resource monitoring window, and if yes, moves the earliest resource state value out of the window, and then Pushing the newly pulled resource status value into the resource monitoring window; otherwise, directly pushing the newly pulled resource status value into the resource monitoring window.
  • the calculating module 130 is further configured to: calculate a resource state change value based on the resource state value and the recorded resource state value obtained by the server last time;
  • the resource monitoring apparatus further includes a recording module, configured to: when the server receives the resource status value pushed by the cloud node, record a resource status value pushed by the cloud node; and pull the server status When the resource state value of the cloud node is taken, the resource state value pulled by the server is recorded.
  • a recording module configured to: when the server receives the resource status value pushed by the cloud node, record a resource status value pushed by the cloud node; and pull the server status When the resource state value of the cloud node is taken, the resource state value pulled by the server is recorded.
  • the calculation module 130 calculates a resource state change value based on the currently pulled resource state value and the resource state value acquired by the server last time. Specifically, the calculating module 130 determines that the cloud node corresponds to the recorded resource time value that is last pushed by the cloud node and the recorded time point corresponding to the resource state value that is last pulled by the server. The latest resource status value of the cloud node, that is, the resource status value acquired by the server last time, and the pulled resource status value and the latest resource status value are substituted into the formula (4) to calculate the resource status change value:
  • the RCV represents a resource state change value
  • the SRN represents a newly pulled resource state value
  • the RO represents a latest resource state value corresponding to the cloud node on the server.
  • the adjusting module 140 is configured to: when the resource state change value is greater than or equal to the resource monitoring When the threshold is controlled, the pull period is shortened according to the resource state change value; and when the resource state change value is smaller than the resource monitoring threshold, the pull period is extended according to the resource state change value.
  • the pull cycle when the adjustment module 140 shortens the pull cycle, the pull cycle may be shortened according to a preset reduction amount. For example, the adjustment module 140 shortens the pull cycle by 5 seconds each time.
  • the adjustment module 140 may further determine the reduction amount corresponding to the resource state change value according to the preset relationship between the resource state change value and the reduction amount, and shorten the pull cycle according to the determined reduction amount.
  • the adjustment module 140 may extend the pull period according to a preset increase amount when the pull period is extended. For example, the adjustment module 140 extends the pull period by 5 seconds each time.
  • the adjustment module 140 may further determine an increase amount corresponding to the resource state change value according to a preset relationship between the resource state change value and the increase amount, and extend the pull cycle according to the determined increase amount.
  • the communication consumption of resource monitoring can be further reduced while maintaining the consistency of the cloud node and server resource state values.
  • the embodiment of the present invention further provides a resource monitoring system.
  • the resource monitoring system includes a cloud node 100 and a server 200, where
  • the cloud node 100 includes:
  • the first determining module is configured to: determine whether the server 200 pulls the resource status value of the cloud node 100 during the current push period;
  • the pushing module is configured to: when the server 200 does not pull the resource state value of the cloud node 100 in the current pushing period, acquire the current resource state value of the cloud node 100, and obtain the obtained resource The status value is pushed to the server 200;
  • the server 200 includes:
  • the second determining module is configured to: determine whether the server 200 receives the resource status value pushed by the cloud node 100 during the current pull period;
  • Pulling the module configured to: when the server 200 does not receive the current pull period When the resource state value pushed by the cloud node 100 is pulled, the current resource state value of the cloud node 100 is pulled.
  • the resource monitoring system provided in this embodiment adopts a sub-area deployment server 200 manner, and the server 200 in each area only receives and processes each cloud node 100 in the area.
  • the process for the server 200 to obtain the monitoring data may be specifically implemented by referring to the foregoing embodiment, and details are not described herein again.
  • the resource monitoring system provided in this embodiment is further provided with a query server 300 for responding to the query of the user terminal 400.
  • the query server 300 is configured to: when receiving the query instruction sent by the user terminal 400, forward the query instruction to the server 200;
  • the server 200 further includes an obtaining module, configured to: when receiving the query instruction, acquire a corresponding resource status value, and send the obtained resource status value to the query server 300;
  • the query server 300 is further configured to: when receiving the resource status value, send the resource status value to the user terminal 400 for display.
  • FIG. 13 is a diagram showing an example of a logical hierarchical structure of a resource monitoring system according to an embodiment of the present invention.
  • the resource monitoring system provided by this embodiment adopts a three-level architecture, and is composed of three layers: a presentation layer, a data processing layer, and a resource layer.
  • the data display layer is responsible for the unified display of the monitoring data, and is displayed in a complete B/S manner through the portal, and realizes interaction with the user, responding to the user's operation and setting, and the like.
  • the data processing layer is responsible for monitoring the execution of the policy, and the collected raw data is summarized by the data and written into the database, so that the data display layer calls the monitoring data from the database.
  • the monitored layer includes all managed objects, that is, resources, which can be acquired by the Agent.
  • the embodiment of the invention also discloses a computer program, including program instructions, when the program instruction When executed by the cloud node, the cloud node can perform any of the above resource monitoring methods.
  • the embodiment of the invention also discloses a carrier carrying the computer program.
  • the embodiment of the invention also discloses a computer program, comprising program instructions, which, when executed by the server, enable the server to perform any of the above resource monitoring methods.
  • the embodiment of the invention also discloses a carrier carrying the computer program.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • each device/function module/functional unit in the above embodiment When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the cloud node performs the resource status value when the resource status value of the cloud node is not pulled by the server during the current push period by combining the push and pull status of the resource status values.
  • the push operation reduces unnecessary network transmission and reduces the communication consumption of resource monitoring. Therefore, the present invention has strong industrial applicability.

Abstract

Disclosed are a resource monitoring method, an apparatus and a system. The resource monitoring method comprises: a cloud node determines whether a server has pulled the resource status value of the cloud node during the current pulling period; if the server does not pull the resource status value of the cloud node during the current pulling period, the cloud node obtains the current resource status value and pushes the obtained resource status value to the server. The technical solution of the present invention can reduce the communication consumption for resource monitoring in a cloud computing data center.

Description

资源监控方法、装置及系统Resource monitoring method, device and system 技术领域Technical field
本文涉及资源监控技术领域,尤其涉及一种资源监控方法、装置及系统。This paper relates to the field of resource monitoring technology, and in particular, to a resource monitoring method, device and system.
背景技术Background technique
随着互联网技术的发展,计算机行业不断涌现新的技术,从分布式计算、并行计算逐渐发展到网格计算,随着资源虚拟化技术的发展成熟,又孕育出云计算。云计算是一种新兴的商业计算模型,它将计算任务分布在由大量计算机资源构成的资源池上,使得用户能够按需获取计算能力、存储空间以及各种软件服务。云计算数据中心将庞大的基础设施资源、数据存储资源、平台资源以及各种软件服务资源组成可以共享协作的资源池,并从该资源池中抽象出一些层次化的服务,例如基础设施层(IaaS)、平台层(PaaS)、软件层(SaaS)等不同层次的服务。With the development of Internet technology, the computer industry is constantly emerging with new technologies, from distributed computing and parallel computing to grid computing. With the development of resource virtualization technology, cloud computing has emerged. Cloud computing is an emerging business computing model that distributes computing tasks across resource pools of large numbers of computer resources, enabling users to acquire computing power, storage space, and various software services on demand. The cloud computing data center combines huge infrastructure resources, data storage resources, platform resources, and various software service resources to share a pool of collaborative resources, and abstracts some hierarchical services, such as the infrastructure layer, from the resource pool ( Different levels of services such as IaaS), platform layer (PaaS), and software layer (SaaS).
云计算数据中心的资源监控,是为了提高云计算数据中心的运维与服务质量,用来监视云计算数据中心中各类资源使用情况和运行情况的一个监控系统。在云计算数据中心中,云节点周期性的将自己的资源状态值推送至服务器,服务器也周期性的拉取云节点的资源状态值,而资源状态值的推送和拉取均会导致大量的通信消耗。相关技术中,云计算数据中心资源监控的通信消耗较大。The resource monitoring of the cloud computing data center is to improve the operation and service quality of the cloud computing data center, and to monitor the usage and operation of various resources in the cloud computing data center. In the cloud computing data center, the cloud node periodically pushes its own resource state value to the server, and the server also periodically pulls the resource state value of the cloud node, and the pushing and pulling of the resource state value causes a large amount of Communication consumption. In the related art, the communication consumption of the cloud computing data center resource monitoring is large.
发明内容Summary of the invention
本发明的主要目的在于提供一种资源监控方法、装置及系统,旨在降低云计算数据中心资源监控的通信消耗。The main objective of the present invention is to provide a resource monitoring method, device and system, which aim to reduce communication consumption of cloud computing data center resource monitoring.
为实现上述目的,采用如下技术方案:In order to achieve the above objectives, the following technical solutions are adopted:
一种资源监控方法,所述资源监控方法包括:A resource monitoring method, the resource monitoring method includes:
云节点确定服务器在当前推送周期内是否拉取过所述云节点的资源状态值; The cloud node determines whether the server pulls the resource state value of the cloud node in the current push period;
当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取自身当前的资源状态值,并将获取的所述资源状态值推送至所述服务器。When the server does not pull the resource status value of the cloud node in the current push period, the cloud node acquires its current resource status value, and pushes the obtained resource status value to the server.
可选地,所述当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取自身当前的资源状态值,并将获取的所述资源状态值推送至所述服务器的步骤包括:Optionally, when the server does not pull the resource state value of the cloud node in the current push period, the cloud node acquires its current resource state value, and obtains the obtained resource state value. The steps of pushing to the server include:
当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取自身当前的资源状态值;When the server does not pull the resource state value of the cloud node in the current push period, the cloud node obtains its current resource state value;
所述云节点判断获取的所述资源状态值是否满足预设推送条件;Determining, by the cloud node, whether the acquired resource state value meets a preset pushing condition;
在所述资源状态值满足所述预设推送条件时,所述云节点将所述资源状态值推送至所述服务器。When the resource state value satisfies the preset push condition, the cloud node pushes the resource state value to the server.
可选地,所述云节点判断获取的所述资源状态值是否满足预设推送条件的步骤包括:Optionally, the step of determining, by the cloud node, whether the acquired resource status value meets a preset push condition comprises:
所述云节点将所述资源状态值推入所述云节点的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第一预设计算参数计算所述资源状态值对应的资源监控阈值;The cloud node pushes the resource status value into a resource monitoring window of the cloud node, and calculates a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and based on the difference And calculating, by the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
所述云节点基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值;The cloud node calculates a resource state change value based on the resource state value and the recorded resource state value acquired by the server at a time;
当所述资源状态变化值大于所述资源监控阈值时,所述云节点确定所述资源状态值满足所述预设推送条件。When the resource state change value is greater than the resource monitoring threshold, the cloud node determines that the resource state value satisfies the preset push condition.
一种资源监控方法,所述资源监控方法包括:A resource monitoring method, the resource monitoring method includes:
服务器确定在当前拉取周期内是否接收到云节点推送的资源状态值;The server determines whether the resource status value pushed by the cloud node is received in the current pull period;
在当前拉取周期内未接收到所述云节点推送的资源状态值时,所述服务器拉取所述云节点当前的资源状态值。When the resource state value pushed by the cloud node is not received in the current pull period, the server pulls the current resource state value of the cloud node.
可选地,所述在当前拉取周期内未接收到所述云节点推送的资源状态值时,所述服务器拉取所述云节点当前的资源状态值的步骤之后,该方法还包 括:Optionally, after the step of extracting, by the server, the current resource state value of the cloud node when the resource state value of the cloud node is not received in the current pull period, the method further includes include:
所述服务器将所述资源状态值推入所述服务器的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第二预设计算参数计算所述资源状态值对应的资源监控阈值;The server pushes the resource status value into a resource monitoring window of the server, and calculates a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the difference and the Calculating, by the preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
所述服务器基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值,并判断所述资源状态变化值是否小于所述资源监控阈值;The server calculates a resource state change value based on the resource state value and the recorded resource state value obtained by the server, and determines whether the resource state change value is smaller than the resource monitoring threshold;
当所述资源状态变化值大于或等于所述资源监控阈值时,所述服务器根据所述资源状态变化值缩短所述拉取周期;When the resource state change value is greater than or equal to the resource monitoring threshold, the server shortens the pull cycle according to the resource state change value;
当所述资源状态变化值小于所述资源监控阈值时,所述服务器根据所述资源状态变化值延长所述拉取周期。When the resource state change value is smaller than the resource monitoring threshold, the server extends the pull cycle according to the resource state change value.
一种资源监控装置,所述资源监控装置包括第一确定模块和推送模块,其中A resource monitoring device includes a first determining module and a pushing module, wherein
所述第一确定模块设置成:确定服务器在当前推送周期内是否拉取过其所在云节点的资源状态值;The first determining module is configured to: determine whether the server has pulled the resource status value of the cloud node in the current push period;
所述推送模块设置成:当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,获取所述云节点当前的资源状态值,并将获取的所述资源状态值推送至所述服务器。The pushing module is configured to: when the server does not pull the resource state value of the cloud node in the current pushing period, acquire the current resource state value of the cloud node, and obtain the obtained resource state value. Push to the server.
可选地,所述推送模块包括获取子模块、判断子模块和推送子模块,其中Optionally, the pushing module includes an obtaining submodule, a determining submodule, and a pushing submodule, wherein
所述获取子模块设置成:当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,获取所述云节点当前的资源状态值;The acquiring sub-module is configured to: when the server does not pull the resource state value of the cloud node in the current push period, obtain the current resource state value of the cloud node;
所述判断子模块设置成:判断获取的所述资源状态值是否满足预设推送条件;The determining sub-module is configured to: determine whether the acquired resource state value meets a preset pushing condition;
所述推送子模块设置成:在所述资源状态值满足所述预设推送条件时,将所述资源状态值推送至所述服务器。 The push sub-module is configured to: push the resource status value to the server when the resource status value satisfies the preset push condition.
可选地,所述判断子模块包括计算单元和确定单元,其中Optionally, the determining submodule includes a calculating unit and a determining unit, where
所述计算单元设置成:将所述资源状态值推入所述云节点的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第一预设计算参数计算所述资源状态值对应的资源监控阈值;The calculating unit is configured to: push the resource state value into a resource monitoring window of the cloud node, and calculate a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and Calculating, by the difference value and the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
所述计算单元还设置成:基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值;The calculating unit is further configured to: calculate a resource state change value based on the resource state value and the recorded resource state value acquired by the server last time;
所述确定单元设置成:当所述资源状态变化值大于所述资源监控阈值时,确定所述资源状态值满足所述预设推送条件。The determining unit is configured to: when the resource state change value is greater than the resource monitoring threshold, determine that the resource state value satisfies the preset push condition.
一种资源监控装置,所述资源监控装置包括第二确定模块和拉取模块,其中A resource monitoring device includes a second determining module and a pulling module, wherein
所述第二确定模块设置成:确定在当前拉取周期内其所在的服务器是否接收到云节点推送的资源状态值;The second determining module is configured to: determine whether the server where the server is located receives the resource status value pushed by the cloud node during the current pull period;
所述拉取模块设置成:当所述服务器在当前拉取周期内未接收到所述云节点推送的资源状态值时,拉取所述云节点当前的资源状态值。The pull module is configured to: when the server does not receive the resource state value pushed by the cloud node in the current pull period, pull the current resource state value of the cloud node.
可选地,所述资源监控装置还包括计算模块和调整模块,其中Optionally, the resource monitoring device further includes a computing module and an adjustment module, where
所述计算模块设置成:将所述资源状态值推入所述服务器的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第二预设计算参数计算所述资源状态值对应的资源监控阈值;The calculating module is configured to: push the resource status value into a resource monitoring window of the server, and calculate a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the Calculating, by the difference and the second preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
所述计算模块还设置成:基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值,并判断所述资源状态变化值是否小于所述资源监控阈值;The calculating module is further configured to: calculate a resource state change value based on the resource state value, and the recorded resource state value acquired by the server, and determine whether the resource state change value is smaller than the resource monitoring threshold ;
所述调整模块设置成:当所述资源状态变化值大于或等于所述资源监控阈值时,根据所述资源状态变化值缩短所述拉取周期;以及当所述资源状态变化值小于所述资源监控阈值时,根据所述资源状态变化值延长所述拉取周期。 The adjusting module is configured to: when the resource state change value is greater than or equal to the resource monitoring threshold, shorten the pull period according to the resource state change value; and when the resource state change value is smaller than the resource When the threshold is monitored, the pull cycle is extended according to the resource state change value.
一种云节点,包括上述任意的资源监控装置。A cloud node includes any of the above resource monitoring devices.
一种服务器,包括上述任意的资源监控装置。A server includes any of the above resource monitoring devices.
一种资源监控系统,包括:上述任意的云节点和上述任意的服务器。A resource monitoring system includes: any of the above cloud nodes and any of the foregoing servers.
可选地,所述资源监控系统还包括查询服务器,Optionally, the resource monitoring system further includes a query server,
所述查询服务器设置成:在接收到用户终端发送的查询指令时,将所述查询指令转发至所述服务器;The query server is configured to forward the query instruction to the server when receiving a query instruction sent by the user terminal;
所述服务器还包括获取模块,设置成:在接收到所述查询指令时,获取所述云节点的资源状态值,并将获取的所述资源状态值发送至所述查询服务器;The server further includes: an obtaining module, configured to: when receiving the query instruction, acquire a resource state value of the cloud node, and send the obtained resource state value to the query server;
所述查询服务器还设置成:在接收到所述资源状态值时,将所述资源状态值发送至所述用户终端,供其显示。The query server is further configured to: when the resource status value is received, send the resource status value to the user terminal for display.
本发明技术方案通过结合推送和拉取两种资源状态值的获取方式,云节点在且仅在服务器在当前推送周期内未拉取过所述云节点的资源状态值时,进行资源状态值的推送操作,减少了不必要的网络传输,能够降低资源监控的通信消耗。According to the technical solution of the present invention, the cloud node performs the resource status value when the resource status value of the cloud node is not pulled by the server during the current push period by combining the push and pull status of the resource status values. The push operation reduces unnecessary network transmission and reduces the communication consumption of resource monitoring.
附图概述BRIEF abstract
图1为本发明资源监控方法第一实施例的流程示意图;1 is a schematic flowchart of a first embodiment of a resource monitoring method according to the present invention;
图2为图1中当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取当前的资源状态值,并将获取的所述资源状态值推送至所述服务器的细化流程示意图;2 is a diagram showing, when the server does not pull the resource status value of the cloud node in the current push period, the cloud node acquires a current resource status value, and pushes the obtained resource status value. Schematic diagram of the refinement process to the server;
图3为图2中所述云节点判断获取的所述资源状态值是否满足预设推送条件的细化流程示意图; 3 is a schematic diagram of a refinement process of determining whether the resource status value obtained by the cloud node in FIG. 2 meets a preset push condition;
图4为采用本发明资源监控方法的云计算数据中心监控系统的分层结构示例图;4 is a diagram showing an example of a hierarchical structure of a cloud computing data center monitoring system using the resource monitoring method of the present invention;
图5为本发明资源监控方法第四实施例的流程示意图;5 is a schematic flowchart of a fourth embodiment of a resource monitoring method according to the present invention;
图6为本发明资源监控方法第五实施例的流程示意图;6 is a schematic flowchart of a fifth embodiment of a resource monitoring method according to the present invention;
图7为本发明资源监控装置第一实施例的功能模块示意图;7 is a schematic diagram of functional modules of a first embodiment of a resource monitoring apparatus according to the present invention;
图8为图7中推送模块的细化结构示意图;Figure 8 is a schematic view showing the refinement structure of the push module of Figure 7;
图9为图8中判断子模块的细化结构示意图;9 is a schematic diagram showing the refinement structure of the judging sub-module in FIG. 8;
图10为本发明资源监控装置第四实施例的功能模块示意图;10 is a schematic diagram of functional modules of a fourth embodiment of a resource monitoring apparatus according to the present invention;
图11为本发明资源监控装置第五实施例的功能模块示意图;11 is a schematic diagram of functional modules of a fifth embodiment of a resource monitoring apparatus according to the present invention;
图12为本发明资源监控系统第一实施例的拓扑结构示意图;12 is a schematic diagram of a topology structure of a first embodiment of a resource monitoring system according to the present invention;
图13为本发明资源监控系统第一实施例的逻辑层次示意图。FIG. 13 is a schematic diagram showing the logic level of the first embodiment of the resource monitoring system of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.
本发明的较佳实施方式Preferred embodiment of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例提供一种资源监控方法,参照图1,在本发明资源监控方法的第一实施例中,所述资源监控方法包括:The embodiment of the present invention provides a resource monitoring method. Referring to FIG. 1 , in the first embodiment of the resource monitoring method of the present invention, the resource monitoring method includes:
S10,云节点确定服务器在当前推送周期内是否拉取过所述云节点的资源状态值;S10. The cloud node determines whether the server pulls the resource state value of the cloud node in the current push period.
本实施例提出的资源监控方法,可以应用于云计算数据中心的资源监控中,例如,针对某云节点,所述云节点间隔预设的推送周期进行资源状态值的推送,若在当前推送周期内,服务器已经拉取过所述云节点的资源状态值, 云节点则不执行当次资源状态值推送操作,即不进行当前资源状态值的获取以及推送;若在当前周期内,服务器未拉取过所述云节点的资源状态值,云节点执行当次资源状态值推送操作,以降低云计算数据中心资源监控的通信消耗。The resource monitoring method provided in this embodiment may be applied to resource monitoring in a cloud computing data center. For example, for a cloud node, the cloud node pushes a resource state value according to a preset pushing period, if the current pushing period is in the current pushing period. The server has already pulled the resource status value of the cloud node. The cloud node does not perform the current resource state value push operation, that is, does not perform the current resource state value acquisition and push; if the server does not pull the resource state value of the cloud node in the current cycle, the cloud node executes the current time. Resource status value push operations to reduce communication consumption for cloud computing data center resource monitoring.
需要说明的是,对云计算数据中心进行监控,往往不需要整个系统具体资源的具体使用情况,而只需要了解各个资源的当前使用状态是否在预定的可接受范围内,即只需要进行状态监控。本实施例中,云节点确定服务器在当前推送周期内是否拉取过所述云节点的资源状态值,以判断是否需要进行当次的资源状态值推送操作。其中,所述云节点包括虚拟机和物理机中的至少一种。It should be noted that monitoring the cloud computing data center often does not require the specific use of the specific resources of the entire system, but only needs to know whether the current usage status of each resource is within a predetermined acceptable range, that is, only state monitoring is required. . In this embodiment, the cloud node determines whether the resource state value of the cloud node is pulled by the server during the current push period to determine whether the current resource state value push operation needs to be performed. The cloud node includes at least one of a virtual machine and a physical machine.
S20,当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取当前的资源状态值,并将所述资源状态值推送至所述服务器。S20. When the server does not pull the resource state value of the cloud node in the current push period, the cloud node acquires a current resource state value, and pushes the resource state value to the server.
容易理解的是,若在当前推送周期内,所述服务器未拉取过所述云节点的资源状态值,即服务器上对应所述云节点的资源状态值未得到更新,所述云节点需要进行当次资源状态值推送操作以更新服务器上对应所述云节点的资源状态值。本实施例中,当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取当前的资源状态值,并将所述资源状态值推送至所述服务器,以供所述服务器根据所述资源状态值进行更新操作。It is easy to understand that if the server does not pull the resource status value of the cloud node in the current push period, that is, the resource status value corresponding to the cloud node on the server is not updated, the cloud node needs to be performed. The secondary resource state value push operation updates the resource state value corresponding to the cloud node on the server. In this embodiment, when the server does not pull the resource state value of the cloud node in the current push period, the cloud node acquires a current resource state value, and pushes the resource state value to the a server for the server to perform an update operation based on the resource status value.
需要说明的是,云计算是整合资源以即方式提供服务的技术,它主要在三个层面体现技术和服务:It should be noted that cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
(1)基础设施层,让硬件资源以即方式提供服务;(1) The infrastructure layer allows hardware resources to provide services in an immediate manner;
(2)平台层,让应用平台以即方式提供服务;(2) The platform layer allows the application platform to provide services in an instant manner;
(3)应用层,让应用以即方式提供服务;(3) The application layer allows the application to provide services in an instant manner;
其中,即方式就像水电一样,从开始使用到结束使用进行度量,登录应用入口就可以直接使用应用,甚至不用在本地安装应用,就像打开水龙头就可以用水一样,然后付费,它本质是一种推的服务。Among them, the way is like hydropower, from the beginning to the end of the use of measurement, login application portal can use the application directly, even without installing the application locally, just like opening the tap can use water, and then pay, it is essentially a Push service.
在本实施例中,所述云节点在获取当前的资源状态值时,优选采集各个 层次(包括基础设施层、平台层以及应用层)的运行时资源状态值,即各个层次最新的资源状态值。In this embodiment, when the cloud node acquires the current resource state value, it is preferred to collect each The runtime resource state values of the hierarchy (including the infrastructure layer, platform layer, and application layer), that is, the latest resource state values for each level.
可选地,在本实施例中,上述步骤S10之后,还包括:Optionally, in this embodiment, after the step S10, the method further includes:
当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点不执行当次资源状态值推送操作;When the server does not pull the resource status value of the cloud node in the current push period, the cloud node does not perform the current resource status value push operation;
容易理解的是,若在当前推送周期内,所述服务器已经拉取过所述云节点的资源状态值,即服务器上对应所述云节点的资源状态值已经得到更新,所述云节点不再需要执行当次的资源状态值推送操作。It is easy to understand that if the server has pulled the resource status value of the cloud node during the current push period, that is, the resource status value corresponding to the cloud node on the server has been updated, the cloud node is no longer updated. Need to perform the current resource status value push operation.
本实施例提出的资源监控方法,通过结合推送和拉取两种资源状态值的获取方式,云节点在且仅在服务器在当前推送周期内未拉取过所述云节点的资源状态值时,进行资源状态值的推送操作,减少了不必要的网络传输,能够降低云计算数据中心资源监控的通信消耗。In the resource monitoring method of the present embodiment, the cloud node does not pull the resource state value of the cloud node in the current push period by using the method of acquiring the two resource state values in combination with the push and pull. Pushing resource status values reduces unnecessary network transmission and reduces communication consumption of cloud computing data center resource monitoring.
可选地,基于第一实施例,提出本发明资源监控方法的第二实施例,参照图2,在本实施例中,所述步骤S20包括:Optionally, based on the first embodiment, a second embodiment of the resource monitoring method of the present invention is proposed. Referring to FIG. 2, in the embodiment, the step S20 includes:
S21,当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取当前的资源状态值;S21: When the server does not pull the resource state value of the cloud node in the current push period, the cloud node acquires a current resource state value.
需要说明的是,本实施例与第一实施例的区别在于,本实施例中,云节点在进行资源状态值的推送时,添加了预设推送条件进行限制,以过滤掉监控过程中的无用资源状态值。It should be noted that the difference between this embodiment and the first embodiment is that, in this embodiment, when the cloud node performs the pushing of the resource status value, the preset push condition is added to limit, so as to filter out the uselessness in the monitoring process. Resource status value.
具体地,当所述云节点确定所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取当前的资源状态值,其中,所述云节点获取的所述资源状态值包括基础设施层、平台层以及应用层的最新资源状态值。Specifically, when the cloud node determines that the server does not pull the resource state value of the cloud node in the current push period, the cloud node acquires a current resource state value, where the cloud node acquires The resource status values include the latest resource status values of the infrastructure layer, the platform layer, and the application layer.
例如,获取到基础设施层的资源状态值包括CPU占有率、内存占有率以及存储空间占有率。For example, the resource status values obtained to the infrastructure layer include CPU occupancy, memory occupancy, and storage space occupancy.
S22,所述云节点判断获取的所述资源状态值是否满足预设推送条件;S22. The cloud node determines whether the acquired resource state value meets a preset pushing condition.
所述云节点在获取到当前的资源状态值后,首先判断获取的所述资源状 态值是否满足预设推送条件,以确定获取到的所述资源状态值是否为用户需要的。其中,所述预设推送条件可以包括:After obtaining the current resource state value, the cloud node first determines the acquired resource shape. Whether the state value satisfies the preset push condition to determine whether the obtained resource state value is required by the user. The preset push condition may include:
获取的所述资源状态值位于预设的触发信息推送的第一区间。The acquired resource status value is located in a first interval of preset trigger information push.
例如,云节点获取到当前的CPU占有率为80%,位于预设的触发信息推送的第一区间[75%,100%],所述云节点确定获取的所述CPU占有率满足预设推送条件。For example, the cloud node obtains the current CPU occupancy rate of 80%, and is located in a first interval [75%, 100%] of the preset trigger information push, and the cloud node determines that the acquired CPU occupancy rate satisfies the preset push. condition.
所述预设推送条件还可以包括:The preset push condition may further include:
获取的所述资源状态值与所述服务器上一次获取的资源状态值的差值位于预设的触发信息推送的第二区间,其中,所述服务器上一次获取的资源状态值为所述云节点上一次推送的资源状态值,或者为所述服务器上一次从所述云节点拉取的资源状态值。The difference between the obtained resource state value and the last acquired resource state value of the server is located in a second interval of the preset trigger information push, where the last acquired resource state value of the server is the cloud node. The value of the resource state that was last pushed, or the value of the resource state that was last pulled by the server from the cloud node.
例如,云节点获取到当前的CPU占有率为80%,且所述服务器上对应所述云节点的最新资源状态值为所述云节点上一次推送的CPU占有率,为50%,两者的差值30%位于预设的触发信息推送的第二区间[20%,+∞),所述云节点确定获取的所述CPU占有率满足预设推送条件。For example, the cloud node obtains the current CPU occupancy rate of 80%, and the latest resource status value corresponding to the cloud node on the server is the CPU occupancy rate of the last push of the cloud node, which is 50%. The difference 30% is located in the second interval [20%, +∞) of the preset trigger information push, and the cloud node determines that the acquired CPU occupancy rate satisfies the preset push condition.
S23,在所述资源状态值满足所述预设推送条件时,所述云节点将所述资源状态值推送至所述服务器。S23. When the resource state value satisfies the preset push condition, the cloud node pushes the resource state value to the server.
本实施例中,所述云节点在获取到当前的资源状态值,且确定获取的所述资源状态值满足预设推送条件时,将所述资源状态值推送至所述服务器,以供所述服务器更新对应所述云节点的资源状态值为最新资源状态值。In this embodiment, when the cloud node obtains the current resource state value, and determines that the acquired resource state value meets the preset pushing condition, the cloud state value is pushed to the server for the The server update corresponds to the resource status value of the cloud node as the latest resource status value.
本实施例通过对监控过程中云节点采集的资源状态值进行过滤,能够进一步地降低通信消耗。In this embodiment, by filtering the resource state values collected by the cloud node during the monitoring process, communication consumption can be further reduced.
可选地,基于第二实施例,提出本发明资源监控方法的第三实施例,参照图3,在本实施例中,上述步骤S22包括:Optionally, based on the second embodiment, a third embodiment of the resource monitoring method of the present invention is proposed. Referring to FIG. 3, in the embodiment, the foregoing step S22 includes:
S221,所述云节点将所述资源状态值推入所述云节点的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第一预设计算参数计算所述资源状态值对应的资源监控阈 值;S221: The cloud node pushes the resource status value into a resource monitoring window of the cloud node, and calculates a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and based on the Calculating a resource monitoring threshold corresponding to the resource state value by using a difference value and a first preset calculation parameter value;
需要说明的是,本实施例与第二实施例的区别在于,本实施例中,所述云节点通过资源状态的变化程度来判断是否需要进行资源状态值推送操作。形象的说,资源监控窗口就是一个容器,可以用一个二元组(L,V)对其进行描述,L用于表示资源监控窗口的长度,即可以容纳的数据容量,V用于表示资源监控窗口的大小,为资源监控窗口中最大资源状态值和最小资源状态值的差值。云节点每次采集到当前的资源状态值后,将所述资源状态值推入资源监控窗口,然后更新资源监控窗口的V值,并将更新后的V值代入公式(1)计算所述资源状态值对应的资源监控阈值:It should be noted that the difference between this embodiment and the second embodiment is that, in this embodiment, the cloud node determines whether a resource state value push operation needs to be performed by the degree of change of the resource state. The image said that the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring. The size of the window, which is the difference between the maximum resource state value and the minimum resource state value in the resource monitoring window. After collecting the current resource state value, the cloud node pushes the resource state value into the resource monitoring window, then updates the V value of the resource monitoring window, and substitutes the updated V value into the formula (1) to calculate the resource. The resource monitoring threshold corresponding to the status value:
CRMT=CRMW.V*CRMI……公式(1);CRMT=CRMW.V*CRMI...Formula (1);
其中,CRMT表示资源监控阈值,CRMW.V表示更新后的V值,CRMI表示监控相对误差率,即所述第一预设计算参数。Wherein, CRMT represents a resource monitoring threshold, CRMW.V represents an updated V value, and CRMI represents a monitoring relative error rate, that is, the first preset calculation parameter.
需要说明的是,CRMI的取值范围优选为[0,1],用于表示用户对资源状态值的敏感和及时程度,CRMI越小表示用户需要越准确的资源状态值,相反,则说明用户能忍受相对较大的资源状态值不一致性。CRMI可由云节点缺省设置,还可以由用户手动设置,例如,CRMI由云节点缺省设置为15%。It should be noted that the value range of the CRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value. The smaller the CRMI, the more accurate the resource status value the user needs, and the opposite is the user. Can tolerate relatively large resource state value inconsistencies. The CRMI can be set by default by the cloud node, and can also be manually set by the user. For example, the CRMI is set to 15% by default by the cloud node.
可选地,云节点在将获取的所述资源状态值推入资源监控窗口之前,首先判断所述资源监控窗口的容量是否已满,若是则将最早的一条资源状态值移出窗口,然后将新获取的所述资源状态值推入所述资源监控窗口;否则直接将新获取的所述资源状态值推入所述资源监控窗口。Optionally, before the cloud node pushes the acquired resource state value into the resource monitoring window, first determining whether the capacity of the resource monitoring window is full, and if so, moving the earliest resource state value out of the window, and then The obtained resource status value is pushed into the resource monitoring window; otherwise, the newly acquired resource status value is directly pushed into the resource monitoring window.
S222,所述云节点基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值;S222, the cloud node calculates a resource state change value based on the resource state value and the recorded resource state value acquired by the server at a time;
需要说明的是,所述云节点在推送资源状态值时,记录其推送的资源状态值,以及在侦测到所述服务器拉取所述云节点的资源状态值时,记录所述服务器拉取的资源状态值。It should be noted that, when the cloud node pushes the resource state value, the resource state value of the push is recorded, and when the server detects that the resource state value of the cloud node is pulled, the server pulls the server. Resource status value.
本实施例中,所述云节点基于当前获取的所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值。具体地,所述云节点基于记录的所述云节点上一次推送的资源状态值,以及记录的所述服 务器上一次拉取所述云节点的资源状态值各自对应的记录时间点,确定所述服务器上对应所述云节点的最新资源状态值,即所述服务器上一次获取的资源状态值,并将获取的所述资源状态值以及所述最新资源状态值代入公式(2)计算资源状态变化值:In this embodiment, the cloud node calculates a resource state change value based on the currently obtained resource state value and the recorded resource state value acquired by the server. Specifically, the cloud node is based on the recorded resource state value that is last pushed by the cloud node, and the recorded service The server last pulls the recording time point corresponding to the resource state value of the cloud node, and determines the latest resource state value corresponding to the cloud node on the server, that is, the resource state value obtained by the server last time, and Substituting the obtained resource state value and the latest resource state value into the formula (2) to calculate the resource state change value:
RCV=|CRN-RO|……公式(2);RCV=|CRN-RO|...Formula (2);
其中,RCV表示资源状态变化值,CRN表示新获取的资源状态值,RO表示服务器上对应所述云节点的最新资源状态值。The RCV represents a resource state change value, the CRN represents a newly acquired resource state value, and the RO represents a latest resource state value corresponding to the cloud node on the server.
S223,当所述资源状态变化值大于所述资源监控阈值时,所述云节点确定所述资源状态值满足所述预设推送条件。S223. When the resource state change value is greater than the resource monitoring threshold, the cloud node determines that the resource state value meets the preset push condition.
优选地,在本实施例中,当RCV大于CRMT时,所述云节点确定获取的所述资源状态值满足所述预设推送条件。Preferably, in this embodiment, when the RCV is greater than the CRMT, the cloud node determines that the acquired resource state value satisfies the preset push condition.
本实施例通过保持云节点和服务器的资源状态变化值不大于资源当前的资源监控阈值,即资源状态变化程度不超过用户能够容忍的范围,在保持服务器和云节点数据一致性的基础上,进一步降低了资源监控的通信消耗。In this embodiment, the value of the resource state change of the cloud node and the server is not greater than the current resource monitoring threshold of the resource, that is, the degree of change of the resource state does not exceed the range that the user can tolerate, and further, based on maintaining data consistency between the server and the cloud node, further Reduce the communication consumption of resource monitoring.
以下以采用本发明实施例资源监控方法的云计算数据中心监控系统进行说明:The following describes the cloud computing data center monitoring system using the resource monitoring method of the embodiment of the present invention:
参照图4,数据中心监控系统包括3个层次:数据显示层(Presentation Layer)、逻辑处理核心层(Logic Layer)、数据持久化访问层(Data Access Layer)。Referring to FIG. 4, the data center monitoring system includes three levels: a data presentation layer (Presentation Layer), a logical processing core layer (Logic Layer), and a data persistence access layer (Data Access Layer).
其中,数据显示层采用FLEX编写显示界面,提供丰富的数据图形显示效果,比如直方图、曲线图、报表等,能够动态的显示云计算数据中心各节点实时的资源状态值。Among them, the data display layer uses FLEX to write the display interface, providing rich data graphic display effects, such as histograms, graphs, reports, etc., which can dynamically display the real-time resource status values of each node in the cloud computing data center.
逻辑处理核心层,负责对监控数据进行处理,并且提供访问接口,包括5个模块,分别是部署在云计算数据中心的每个节点上(包括物理机和虚拟机)的Agent Manager(代理管理)模块,和部署在服务器的Event Manager(事件管理)模块、CEP Engine(复杂事件处理引擎)模块、Strategy Manager(策略管理)模块以及API Interface(应用程序编程接口)模块。其中,Agent Manager模块负责收集宿主节点上各个层次(基础设施层、平台层和应用层) 的运行时信息,它会过滤掉监控过程中的无用状态信息,然后组装成一个数据包按照本发明实施例资源监控方法提供的策略发送到服务器;Event manager模块负责对Agent Manager中的事件进行预处理,然后发给CEP Engine(复杂事件处理引擎)模块处理;CEP Engine模块负责进行事件规则匹配,将Event manager模块发过来的事件进行模式匹配,然后将事件放入事件处理队列等候Strategy Manager模块处理;Strategy Manager模块从事件处理队列中取出事件,根据事先制定好的策略进行相应的处理;API Interface模块负责和Web前端进行交互并提供访问接口。The logical processing core layer is responsible for processing the monitoring data and providing an access interface, including five modules, which are Agent Manager (Agent Management) deployed on each node of the cloud computing data center (including physical machines and virtual machines). Modules, and Event Manager modules deployed on the server, CEP Engine (Complex Event Processing Engine) modules, Strategy Manager (Policy Management) modules, and API Interface (Application Programming Interface) modules. Among them, the Agent Manager module is responsible for collecting all levels on the host node (infrastructure layer, platform layer and application layer) Runtime information, which filters out useless status information in the monitoring process, and then assembles into a data packet to be sent to the server according to the policy provided by the resource monitoring method in the embodiment of the present invention; the Event manager module is responsible for pre-eventing events in the Agent Manager. Processing, and then sent to the CEP Engine (complex event processing engine) module processing; CEP Engine module is responsible for event rule matching, pattern matching events sent by the Event manager module, and then put the event into the event processing queue waiting for the Strategy Manager module to process The Strategy Manager module takes the event from the event processing queue and processes it according to the pre-defined strategy; the API Interface module is responsible for interacting with the Web front end and providing an access interface.
数据持久化访问层,负责提供多种数据持久化访问方法,包括Database Provider(数据库支持)模块和XML Provider(可扩展标记语言支持)模块,其中Database Provider模块提供对数据库访问的支持,XML Provider模块提供对XML文件读写的支持,并提供接口供前端调用查询。The data persistence access layer is responsible for providing a variety of data persistence access methods, including the Database Provider module and the XML Provider (Extensible Markup Language Support) module, wherein the Database Provider module provides support for database access, and the XML Provider module. Provides support for reading and writing XML files and provides an interface for front-end calls to query.
通过应用本发明实施例提供的资源监控方法,该云计算数据中心监控系统能够在保证服务器和节点资源状态值一致性的基础上,减少资源监控的通信消耗。By applying the resource monitoring method provided by the embodiment of the present invention, the cloud computing data center monitoring system can reduce communication consumption of resource monitoring on the basis of ensuring consistency of server and node resource status values.
本发明实施例还提出了一种资源监控方法,参照图5,提供了本发明资源监控方法的第四实施例,在本实施例中,所述资源监控方法包括:The embodiment of the present invention further provides a resource monitoring method. Referring to FIG. 5, a fourth embodiment of the resource monitoring method of the present invention is provided. In this embodiment, the resource monitoring method includes:
S110,服务器确定在当前拉取周期内是否接收到云节点推送的资源状态值;S110. The server determines whether a resource status value pushed by the cloud node is received in the current pull period.
本实施例提出的资源监控方法,可以应用于云计算数据中心的资源监控中,例如,针对服务器,所述服务器间隔预设的拉取周期从云节点拉取资源状态值,若在当前拉取周期内,所述服务器接收到所述云节点推送的资源状态值,服务器取消当次资源状态值拉取操作;若在当前拉取周期内,所述服务器未接收到所述云节点推送的资源状态值,服务器执行当次资源状态值拉取操作,以达到降低云计算数据中心资源监控通信消耗的目的。The resource monitoring method in this embodiment may be applied to the resource monitoring of the cloud computing data center. For example, for the server, the server pulls the resource state value from the cloud node by using a preset pull period, if the current state is pulled. During the period, the server receives the resource status value pushed by the cloud node, and the server cancels the current resource status value pull operation; if the current pull period does not, the server does not receive the resource pushed by the cloud node. The state value, the server performs the current resource state value pull operation to achieve the purpose of reducing the cloud computing data center resource monitoring communication consumption.
需要说明的是,对云计算数据中心进行监控,往往不需要整个系统具体资源的具体使用情况,而只需要了解各个资源的当前使用状态是否在预定的 可接受范围内,即只需要进行状态监控。本实施例中,所述服务器确定在当前拉取周期内是否接收到所述云节点推送的资源状态值,以判断是否需要进行当次的资源状态值拉取操作。It should be noted that monitoring the cloud computing data center often does not require the specific use of the specific resources of the entire system, but only needs to know whether the current usage status of each resource is in a predetermined state. Within the acceptable range, only state monitoring is required. In this embodiment, the server determines whether the resource status value pushed by the cloud node is received in the current pull period to determine whether the current resource status value pull operation needs to be performed.
S120,在当前拉取周期内未接收到所述云节点推送的资源状态值时,所述服务器拉取所述云节点当前的资源状态值。S120. The server pulls a current resource state value of the cloud node when the resource state value pushed by the cloud node is not received in the current pull period.
容易理解的是,若在当前拉取周期内,所述服务器未接收到所述云节点推送的资源状态值,即服务器上对应所述云节点的资源状态值未得到更新,所述服务器需要进行当次资源状态值拉取操作以更新服务器上对应所述云节点的资源状态值。本实施例中,所述服务器在当前拉取周期内未接收到所述云节点推送的资源状态值时,拉取所述云节点当前的资源状态值,并更新对应所述云节点的资源状态值。It is easy to understand that if the server does not receive the resource status value pushed by the cloud node during the current pull period, that is, the resource status value corresponding to the cloud node on the server is not updated, the server needs to perform The secondary resource state value pull operation updates the resource state value corresponding to the cloud node on the server. In this embodiment, when the server does not receive the resource state value pushed by the cloud node in the current pull period, the server pulls the current resource state value of the cloud node, and updates the resource state corresponding to the cloud node. value.
需要说明的是,云计算是整合资源以即方式提供服务的技术,它主要在三个层面体现技术和服务:It should be noted that cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
(1)基础设施层,让硬件资源以即方式提供服务;(1) The infrastructure layer allows hardware resources to provide services in an immediate manner;
(2)平台层,让应用平台以即方式提供服务;(2) The platform layer allows the application platform to provide services in an instant manner;
(3)应用层,让应用以即方式提供服务;(3) The application layer allows the application to provide services in an instant manner;
其中,即方式就像水电一样,从开始使用到结束使用进行度量,登录应用入口就可以直接使用应用,甚至不用在本地安装应用,就像打开水龙头就可以用水一样,然后付费,它本质是一种推的服务。Among them, the way is like hydropower, from the beginning to the end of the use of measurement, login application portal can use the application directly, even without installing the application locally, just like opening the tap can use water, and then pay, it is essentially a Push service.
在本实施例中,所述服务器在拉取所述云节点当前的资源状态值时,优选拉取所述云节点各个层次(包括基础设施层、平台层以及应用层)的运行时资源状态值,即各个层次最新的资源状态值。In this embodiment, when the server pulls the current resource state value of the cloud node, the server preferably pulls the runtime resource state values of each level of the cloud node (including the infrastructure layer, the platform layer, and the application layer). , that is, the latest resource status values at each level.
可选地,在本实施例中,上述步骤S110之后,还包括:Optionally, in this embodiment, after step S110, the method further includes:
在当前拉取周期内接收到所述云节点推送的资源状态值时,所述服务器不执行当次资源状态值拉取操作;When receiving the resource status value pushed by the cloud node in the current pull period, the server does not perform the current resource status value pull operation;
容易理解的是,若在当前拉取周期内,所述服务器接收到所述云节点推送的资源状态值,即服务器上对应所述云节点的资源状态值已经得到更新,所述服务器不再需要执行当次的资源状态值拉取操作。 It is easy to understand that if the server receives the resource status value pushed by the cloud node during the current pull period, that is, the resource status value corresponding to the cloud node on the server has been updated, the server no longer needs to be updated. Execute the current resource status value pull operation.
本实施例提出的资源监控方法,通过结合推送和拉取两种资源状态值的获取方式,服务器在且仅在当前拉取周期内未接收到所述云节点推送的资源状态值时,进行资源状态值的拉取操作,减少了不必要的网络传输,能够降低资源监控的通信消耗。In the resource monitoring method of the present embodiment, the server performs the resource when the resource state value pushed by the cloud node is not received in the current pull period by combining the push and pull state of the resource state values. The pull operation of the status value reduces unnecessary network transmission and can reduce the communication consumption of resource monitoring.
可选地,基于第四实施例,提出本发明资源监控方法的第五实施例,参照图6,在本实施例中,上述步骤S120之后,还包括:Optionally, based on the fourth embodiment, a fifth embodiment of the resource monitoring method of the present invention is provided. Referring to FIG. 6, in the embodiment, after the step S120, the method further includes:
S130,所述服务器将所述资源状态值推入所述服务器的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第二预设计算参数计算所述资源状态值对应的资源监控阈值;S130. The server pushes the resource status value into a resource monitoring window of the server, and calculates a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the difference. And calculating, by the second preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
形象的说,资源监控窗口就是一个容器,可以用一个二元组(L,V)对其进行描述,L用于表示资源监控窗口的长度,即可以容纳的数据容量,V用于表示资源监控窗口的大小,为当前资源监控窗口中资源状态值最大值和最小值差值。服务器每次拉取到所述云节点当前的资源状态值后,将所述资源状态值推入资源监控窗口,然后更新资源监控窗口的V值,并将更新后的V值代入公式(3)计算所述资源状态值对应的资源监控阈值:The image said that the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring. The size of the window is the difference between the maximum and minimum values of the resource status values in the current resource monitoring window. After the server pulls the current resource state value of the cloud node, the server pushes the resource state value into the resource monitoring window, and then updates the V value of the resource monitoring window, and substitutes the updated V value into the formula (3). Calculating a resource monitoring threshold corresponding to the resource status value:
SRMT=SRMW.V*SRMI……公式(3);SRMT=SRMW.V*SRMI...Formula (3);
其中,SRMT表示资源监控阈值,SRMW.V表示更新后的V值,SRMI表示监控相对误差率,为预设值,即所述第二预设计算参数。The SRMT represents a resource monitoring threshold, the SRMW.V represents an updated V value, and the SRMI represents a monitoring relative error rate, which is a preset value, that is, the second preset calculation parameter.
需要说明的是,SRMI的取值范围优选为[0,1],用于表示用户对资源状态值的敏感和及时程度,SRMI越小表示用户需要越准确的资源状态值,相反,则说明用户能忍受相对较大的资源状态值不一致性。SRMI可由服务器缺省设置,还可以由用户手动设置,例如,SRMI由服务器缺省设置为15%。It should be noted that the value range of the SRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value. The smaller the SRMI is, the more accurate the resource status value is required by the user. Can tolerate relatively large resource state value inconsistencies. SRMI can be set by default by the server and can also be set manually by the user. For example, SRMI is set to 15% by default.
可选地,服务器在将拉取的所述资源状态值推入资源监控窗口之前,首先判断所述资源监控窗口的容量是否已满,若是则将最早的一条资源状态值移出窗口,然后将新拉取的所述资源状态值推入所述资源监控窗口;否则直接将新拉取的所述资源状态值推入所述资源监控窗口。 Optionally, before pushing the pulled resource status value into the resource monitoring window, the server first determines whether the capacity of the resource monitoring window is full, and if so, moves the earliest resource state value out of the window, and then new The resource status value pulled is pushed into the resource monitoring window; otherwise, the newly pulled resource status value is directly pushed into the resource monitoring window.
S140,所述服务器基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值,并判断所述资源状态变化值是否小于所述资源监控阈值;若否则转入执行步骤S150,是则转入执行步骤S160;S140, the server calculates a resource state change value based on the resource state value and the recorded resource state value obtained by the server, and determines whether the resource state change value is smaller than the resource monitoring threshold; Go to step S150, and then go to step S160;
需要说明的是,所述服务器在接收到所述云节点推送的资源状态值时,记录所述云节点推送的资源状态值;所述服务器在拉取所述云节点的资源状态值时,记录拉取的资源状态值。It is to be noted that, when the server receives the resource status value pushed by the cloud node, the resource status value pushed by the cloud node is recorded; when the server pulls the resource status value of the cloud node, the server records The resource status value pulled.
本实施例中,所述服务器基于当前拉取的所述资源状态值,以及所述服务器上一次获取的资源状态值计算资源状态变化值。具体地,所述服务器基于记录的所述云节点上次推送的资源状态值,以及记录的所述服务器上次拉取的资源状态值各自对应的记录时间点,确定所述云节点对应所述云节点的最新资源状态值,即所述服务器上一次获取的资源状态值,并将拉取的所述资源状态值以及所述最新资源状态值代入公式(4)计算资源状态变化值:In this embodiment, the server calculates the resource state change value based on the currently pulled resource state value and the resource state value acquired by the server last time. Specifically, the server determines, according to the recorded resource state value that the cloud node last pushed, and the recorded recording time point corresponding to the resource state value that is last pulled by the server, determining that the cloud node corresponds to the The latest resource status value of the cloud node, that is, the resource status value acquired by the server last time, and the pulled resource status value and the latest resource status value are substituted into the formula (4) to calculate the resource status change value:
RCV=|SRN-RO|……公式(4);RCV=|SRN-RO|...Formula (4);
其中,RCV表示资源状态变化值,SRN表示新拉取的资源状态值,RO表示服务器上对应所述云节点的最新资源状态值。The RCV represents a resource state change value, the SRN represents a newly pulled resource state value, and the RO represents a latest resource state value corresponding to the cloud node on the server.
S150,所述服务器根据所述资源状态变化值缩短所述拉取周期;S150. The server shortens the pull period according to the resource state change value.
S160,所述服务器根据所述资源状态变化值延长所述拉取周期。S160. The server extends the pull period according to the resource state change value.
本实施例中,所述服务器在缩短所述拉取周期时,可以按照预设缩减量缩短所述拉取周期,例如,每次将所述拉取周期缩短5秒。所述服务器还可以按照预设的资源状态变化值与缩减量的关联关系,确定所述资源状态变化值对应的缩减量,并按照确定的缩减量缩短所述拉取周期。In this embodiment, when the server shortens the pull cycle, the pull cycle may be shortened according to a preset reduction amount, for example, the pull cycle is shortened by 5 seconds each time. The server may further determine a reduction amount corresponding to the resource state change value according to a preset relationship between the resource state change value and the reduction amount, and shorten the pull cycle according to the determined reduction amount.
所述服务器在延长所述拉取周期时,可以按照预设增加量延长所述拉取周期,例如,每次将所述拉取周期延长5秒。所述服务器还可以按照预设的资源状态变化值与增加量的关联关系,确定所述资源状态变化值对应的增加量,并按照确定的增加量延长所述拉取周期。When the server extends the pull cycle, the pull cycle may be extended according to a preset increase amount, for example, the pull cycle is extended by 5 seconds each time. The server may further determine an increase amount corresponding to the resource state change value according to a preset relationship between the resource state change value and the increase amount, and extend the pull cycle according to the determined increase amount.
本实施例通过不断调整拉取周期的时长,在保持云节点和服务器资源状态值一致性的基础上,能够进一步降低资源监控的通信消耗。 In this embodiment, by continuously adjusting the duration of the pull cycle, the communication consumption of resource monitoring can be further reduced while maintaining the consistency of the cloud node and server resource state values.
本发明实施例还提供一种资源监控装置,参照图7,在本发明资源监控装置的第一实施例中,所述资源监控装置包括:The embodiment of the present invention further provides a resource monitoring apparatus. Referring to FIG. 7, in the first embodiment of the resource monitoring apparatus of the present invention, the resource monitoring apparatus includes:
第一确定模块10,设置成:确定服务器在当前推送周期内是否拉取过其所在云节点的资源状态值;The first determining module 10 is configured to: determine whether the server pulls the resource status value of the cloud node in the current push period;
本实施例提出的资源监控装置,可以应用于云计算数据中心的资源监控中,例如,资源监控装置内置于云节点运行,所述云节点间隔预设的推送周期进行资源状态值的推送,若在当前推送周期内,服务器已经拉取过所述云节点的资源状态值,云节点则不执行当次资源状态值推送操作,即不进行当前资源状态值的获取以及推送;若在当前周期内,服务器未拉取过所述云节点的资源状态值,云节点执行当次资源状态值推送操作,以降低云计算数据中心资源监控的通信消耗。The resource monitoring device of the present embodiment can be applied to the resource monitoring of the cloud computing data center. For example, the resource monitoring device is built in the cloud node, and the cloud node pushes the resource state value at intervals according to a preset pushing period. During the current push period, the server has pulled the resource state value of the cloud node, and the cloud node does not perform the current resource state value push operation, that is, does not perform the current resource state value acquisition and push; if in the current cycle The server does not pull the resource state value of the cloud node, and the cloud node performs the current resource state value push operation to reduce the communication consumption of the cloud computing data center resource monitoring.
需要说明的是,对云计算数据中心进行监控,往往不需要整个系统具体资源的具体使用情况,而只需要了解各个资源的当前使用状态是否在预定的可接受范围内,即只需要进行状态监控。本实施例提供的资源监控装置内置于云节点运行,具体地,第一确定模块10确定服务器在当前推送周期内是否拉取过其所在云节点的资源状态值,以判断是否需要进行当次的资源状态值推送操作。其中,所述云节点包括虚拟机和物理机中的至少一种。It should be noted that monitoring the cloud computing data center often does not require the specific use of the specific resources of the entire system, but only needs to know whether the current usage status of each resource is within a predetermined acceptable range, that is, only state monitoring is required. . The resource monitoring device provided in this embodiment is built in the cloud node. Specifically, the first determining module 10 determines whether the server pulls the resource state value of the cloud node in the current push period to determine whether the current need is performed. Resource status value push operation. The cloud node includes at least one of a virtual machine and a physical machine.
推送模块20,设置成:当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,获取所述云节点当前的资源状态值,并将获取的所述资源状态值推送至所述服务器。The pushing module 20 is configured to: when the server does not pull the resource state value of the cloud node in the current pushing period, acquire the current resource state value of the cloud node, and obtain the obtained resource state value. Push to the server.
容易理解的是,若在当前推送周期内,所述服务器未拉取过所述云节点的资源状态值,即服务器上对应所述云节点的资源状态值未得到更新,推送模块20需要进行当次资源状态值推送操作以更新服务器上对应所述云节点的资源状态值。本实施例中,当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,推送模块20获取所述云节点当前的资源状态值,并将获取的所述资源状态值推送至所述服务器,以供所述服务器根据所述资源状态值进行更新操作。It is easy to understand that if the server does not pull the resource status value of the cloud node in the current push period, that is, the resource status value corresponding to the cloud node on the server is not updated, the push module 20 needs to perform The secondary resource state value push operation updates the resource state value corresponding to the cloud node on the server. In this embodiment, when the server does not pull the resource state value of the cloud node in the current push period, the pushing module 20 acquires the current resource state value of the cloud node, and obtains the resource state. A value is pushed to the server for the server to perform an update operation based on the resource status value.
需要说明的是,云计算是整合资源以即方式提供服务的技术,它主要在三个层面体现技术和服务: It should be noted that cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
(1)基础设施层,让硬件资源以即方式提供服务;(1) The infrastructure layer allows hardware resources to provide services in an immediate manner;
(2)平台层,让应用平台以即方式提供服务;(2) The platform layer allows the application platform to provide services in an instant manner;
(3)应用层,让应用以即方式提供服务;(3) The application layer allows the application to provide services in an instant manner;
其中,即方式就像水电一样,从开始使用到结束使用进行度量,登录应用入口就可以直接使用应用,甚至不用在本地安装应用,就像打开水龙头就可以用水一样,然后付费,它本质是一种推的服务。Among them, the way is like hydropower, from the beginning to the end of the use of measurement, login application portal can use the application directly, even without installing the application locally, just like opening the tap can use water, and then pay, it is essentially a Push service.
在本实施例中,所述推送模块20在获取所述云节点当前的资源状态值时,优选采集所述云节点各个层次(包括基础设施层、平台层以及应用层)的运行时资源状态值,即各个层次最新的资源状态值。In this embodiment, when the current resource state value of the cloud node is acquired, the push module 20 preferably collects runtime resource state values of each level of the cloud node (including an infrastructure layer, a platform layer, and an application layer). , that is, the latest resource status values at each level.
可选地,在本实施例中,当所述服务器在当前推送周期内拉取过所述云节点的资源状态值时,所述推送模块20不执行资源状态值推送操作;Optionally, in this embodiment, when the server pulls the resource status value of the cloud node in the current push period, the push module 20 does not perform the resource status value push operation;
容易理解的是,若在当前推送周期内,所述服务器已经拉取过所述云节点的资源状态值,即服务器上对应所述云节点的资源状态值已经得到更新,所述推送模块20不再需要执行资源状态值推送操作。It is easy to understand that if the server has pulled the resource status value of the cloud node in the current push period, that is, the resource status value corresponding to the cloud node on the server has been updated, the push module 20 does not It is then necessary to perform a resource state value push operation.
本实施例提出的资源监控装置,通过内置于云节点运行,并结合推送和拉取两种资源状态值的获取方式,使得云节点在且仅在服务器在当前推送周期内未拉取过所述云节点的资源状态值时,进行资源状态值的推送操作,减少了不必要的网络传输,能够降低云计算数据中心资源监控的通信消耗。The resource monitoring device provided in this embodiment is built in the cloud node, and combined with the method of obtaining the two resource state values by pushing and pulling, so that the cloud node does not pull the server in the current push period. When the resource state value of the cloud node is used, the resource state value is pushed, the unnecessary network transmission is reduced, and the communication consumption of the cloud computing data center resource monitoring can be reduced.
可选地,基于第一实施例,提出本发明资源监控装置的第二实施例,参照图8,在本实施例中,所述推送模块20包括:Optionally, based on the first embodiment, a second embodiment of the resource monitoring apparatus of the present invention is provided. Referring to FIG. 8, in the embodiment, the pushing module 20 includes:
获取子模块21,设置成:当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,获取所述云节点当前的资源状态值;The obtaining sub-module 21 is configured to: when the server does not pull the resource state value of the cloud node in the current push period, obtain the current resource state value of the cloud node;
需要说明的是,本实施例与第一实施例的区别在于,本实施例中,推送模块20在进行资源状态值的推送时,添加了预设推送条件进行限制,以过滤掉监控过程中的无用资源状态值。It should be noted that, in this embodiment, the difference between the embodiment and the first embodiment is that, in the embodiment, the push module 20 adds a preset push condition to limit the push of the resource status value to filter out the monitoring process. Unwanted resource status value.
具体地,当所述第一确定模块10确定所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述获取子模块21获取所述云节点当前的 资源状态值,其中,所述获取子模块21获取的所述资源状态值包括基础设施层、平台层以及应用层的最新资源状态值。Specifically, when the first determining module 10 determines that the server does not pull the resource state value of the cloud node in the current pushing period, the acquiring sub-module 21 acquires the current cloud node. The resource status value, wherein the resource status value acquired by the obtaining submodule 21 includes an latest resource status value of an infrastructure layer, a platform layer, and an application layer.
例如,获取子模块21获取到基础设施层的资源状态值包括CPU占有率、内存占有率以及存储空间占有率。For example, the resource status values obtained by the acquisition sub-module 21 to the infrastructure layer include the CPU occupancy rate, the memory occupancy rate, and the storage space occupancy rate.
判断子模块22,设置成:判断获取的所述资源状态值是否满足预设推送条件;The determining sub-module 22 is configured to: determine whether the acquired resource state value satisfies a preset pushing condition;
判断子模块22在所述获取子模块21获取到所述云节点当前的资源状态值后,首先判断获取的所述资源状态值是否满足预设推送条件,以确定获取到的所述资源状态值是否为用户需要的。其中,所述预设推送条件可以包括:After the obtaining sub-module 21 acquires the current resource state value of the cloud node, the determining sub-module 22 first determines whether the acquired resource state value satisfies a preset pushing condition, and determines the acquired resource state value. Whether it is needed by the user. The preset push condition may include:
获取的所述资源状态值位于预设的触发信息推送的第一区间。The acquired resource status value is located in a first interval of preset trigger information push.
例如,所述获取子模块21获取到所述云节点当前的CPU占有率为80%,位于预设的触发信息推送的第一区间[75%,100%],所述判断子模块22确定所述获取子模块21获取的所述CPU占有率满足预设推送条件。For example, the obtaining sub-module 21 acquires that the current CPU occupancy rate of the cloud node is 80%, and is located in a first interval [75%, 100%] of the preset trigger information push, and the determining sub-module 22 determines The CPU occupancy rate obtained by the acquisition sub-module 21 satisfies a preset push condition.
所述预设推送条件还可以包括:The preset push condition may further include:
获取的所述资源状态值与所述服务器上一次获取的资源状态值的差值位于预设的触发信息推送的第二区间,其中,所述服务器上一次获取的资源状态值为所述云节点上一次推送的资源状态值,或者为所述服务器上一次从所述云节点拉取的资源状态值。The difference between the obtained resource state value and the last acquired resource state value of the server is located in a second interval of the preset trigger information push, where the last acquired resource state value of the server is the cloud node. The value of the resource state that was last pushed, or the value of the resource state that was last pulled by the server from the cloud node.
例如,所述获取子模块21获取到所述云节点当前的CPU占有率为80%,且所述服务器上对应所述云节点的最新资源状态值为所述服务器上一次拉取的CPU占有率,为50%,两者的差值30%位于预设的触发信息推送的第二区间[20%,+∞),所述判断子模块22确定所述获取子模块21获取的所述CPU占有率满足预设推送条件。For example, the acquisition sub-module 21 obtains that the current CPU occupancy rate of the cloud node is 80%, and the latest resource status value corresponding to the cloud node on the server is the CPU occupancy rate of the last pull of the server. 50%, the difference between the two is 30% in the second interval [20%, +∞) of the preset trigger information push, and the determining sub-module 22 determines the CPU possession acquired by the obtaining sub-module 21 The rate meets the preset push conditions.
推送子模块23,设置成:在所述资源状态值满足所述预设推送条件时,将所述资源状态值推送至所述服务器。The pushing sub-module 23 is configured to: when the resource state value satisfies the preset pushing condition, push the resource state value to the server.
本实施例中,推送子模块23在所述获取子模块21获取到所述云节点当前的资源状态值,且所述判断子模块22确定获取的所述资源状态值满足预设推送条件时,将所述资源状态值推送至所述服务器,以供所述服务器更新对 应所述云节点的资源状态值为最新资源状态值。In this embodiment, when the obtaining sub-module 21 acquires the current resource state value of the cloud node, and the determining sub-module 22 determines that the acquired resource state value satisfies the preset pushing condition, Pushing the resource status value to the server for the server to update the pair The resource status value of the cloud node should be the latest resource status value.
本实施例通过对监控过程中云节点采集的资源状态值进行过滤,能够进一步地降低通信消耗。In this embodiment, by filtering the resource state values collected by the cloud node during the monitoring process, communication consumption can be further reduced.
可选地,基于第二实施例,提出本发明资源监控装置的第三实施例,参照图9,在本实施例中,所述判断子模块22包括:Optionally, based on the second embodiment, a third embodiment of the resource monitoring apparatus of the present invention is provided. Referring to FIG. 9, in the embodiment, the determining sub-module 22 includes:
计算单元221,设置成:将所述资源状态值推入所述云节点的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第一预设计算参数计算所述资源状态值对应的资源监控阈值;The calculating unit 221 is configured to: push the resource state value into a resource monitoring window of the cloud node, and calculate a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and Calculating, by the difference value and the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
需要说明的是,本实施例与第二实施例的区别在于,本实施例中,所述判断子模块22通过资源状态的变化程度来判断是否需要进行资源状态值推送操作。形象的说,资源监控窗口就是一个容器,可以用一个二元组(L,V)对其进行描述,L用于表示资源监控窗口的长度,即可以容纳的数据容量,V用于表示资源监控窗口的大小,为资源监控窗口中最大资源状态值和最小资源状态值的差值。所述获取子模块21每次采集到当前的资源状态值后,所述计算单元221将所述资源状态值推入资源监控窗口,然后更新资源监控窗口的V值,并将更新后的V值代入公式(1)计算所述资源状态值对应的资源监控阈值:It should be noted that the difference between this embodiment and the second embodiment is that, in this embodiment, the determining sub-module 22 determines whether a resource state value pushing operation is required by the degree of change of the resource state. The image said that the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring. The size of the window, which is the difference between the maximum resource state value and the minimum resource state value in the resource monitoring window. After the acquisition sub-module 21 collects the current resource state value, the computing unit 221 pushes the resource state value into the resource monitoring window, and then updates the V value of the resource monitoring window, and updates the V value. Substituting formula (1) to calculate a resource monitoring threshold corresponding to the resource status value:
CRMT=CRMW.V*CRMI……公式(1);CRMT=CRMW.V*CRMI...Formula (1);
其中,CRMT表示资源监控阈值,CRMW.V表示更新后的V值,CRMI表示监控相对误差率,即所述第一预设计算参数。Wherein, CRMT represents a resource monitoring threshold, CRMW.V represents an updated V value, and CRMI represents a monitoring relative error rate, that is, the first preset calculation parameter.
需要说明的是,CRMI的取值范围优选为[0,1],用于表示用户对资源状态值的敏感和及时程度,CRMI越小表示用户需要越准确的资源状态值,相反,则说明用户能忍受相对较大的资源状态值不一致性。CRMI可由云节点缺省设置,还可以由用户手动设置,例如,CRMI由云节点缺省设置为15%。It should be noted that the value range of the CRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value. The smaller the CRMI, the more accurate the resource status value the user needs, and the opposite is the user. Can tolerate relatively large resource state value inconsistencies. The CRMI can be set by default by the cloud node, and can also be manually set by the user. For example, the CRMI is set to 15% by default by the cloud node.
可选地,所述计算单元221在将获取的所述资源状态值推入资源监控窗口之前,首先判断所述资源监控窗口的容量是否已满,若是则将最早的一条 资源状态值移出窗口,然后将新获取的所述资源状态值推入所述资源监控窗口;否则直接将新获取的所述资源状态值推入所述资源监控窗口。Optionally, the calculating unit 221 first determines whether the capacity of the resource monitoring window is full before pushing the acquired resource state value into the resource monitoring window, and if so, the earliest one. The resource status value is moved out of the window, and the newly acquired resource status value is pushed into the resource monitoring window; otherwise, the newly acquired resource status value is directly pushed into the resource monitoring window.
所述计算单元221还设置成:基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值;The calculating unit 221 is further configured to: calculate a resource state change value based on the resource state value and the recorded resource state value acquired by the server last time;
需要说明的是,所述资源监控装置还包括记录模块,设置成:在云节点(推送模块20)推送资源状态值时,记录其推送的资源状态值;以及在服务器拉取所述云节点的资源状态值时,记录所述服务器拉取的资源状态值。It should be noted that the resource monitoring apparatus further includes a recording module configured to: when the cloud node (the push module 20) pushes the resource state value, record the resource state value pushed by the cloud node; and pull the cloud node at the server When the resource status value is used, the resource status value pulled by the server is recorded.
本实施例中,所述计算单元221基于当前获取的所述资源状态值,以及记录模块记录的所述服务器上一次获取的资源状态值,计算资源状态变化值。具体地,所述计算单元221基于记录的所述云节点上一次推送的资源状态值,以及记录的所述服务器上一次拉取所述云节点的资源状态值各自对应的记录时间点,确定所述服务器上对应所述云节点的最新资源状态值,即所述服务器上一次获取的资源状态值,并将获取的所述资源状态值以及所述最新资源状态值代入公式(2)计算资源状态变化值:In this embodiment, the calculating unit 221 calculates the resource state change value based on the currently obtained resource state value and the resource state value acquired by the server last time recorded by the recording module. Specifically, the calculating unit 221 determines, according to the recorded resource state value that is last pushed by the cloud node, and the recorded recording time point corresponding to the resource state value of the cloud node that is last pulled by the server. The latest resource status value corresponding to the cloud node on the server, that is, the resource status value acquired by the server last time, and the obtained resource status value and the latest resource status value are substituted into the formula (2) computing resource status Change value:
RCV=|CRN-RO|……公式(2);RCV=|CRN-RO|...Formula (2);
其中,RCV表示资源状态变化值,CRN表示新获取的资源状态值,RO表示服务器上对应所述云节点的最新资源状态值。The RCV represents a resource state change value, the CRN represents a newly acquired resource state value, and the RO represents a latest resource state value corresponding to the cloud node on the server.
确定单元222,设置成:当所述资源状态变化值大于所述资源监控阈值时,确定所述资源状态值满足所述预设推送条件。The determining unit 222 is configured to: when the resource state change value is greater than the resource monitoring threshold, determine that the resource state value meets the preset push condition.
优选地,在本实施例中,当RCV大于CRMT时,确定单元222确定获取的所述资源状态值满足所述预设推送条件。Preferably, in the embodiment, when the RCV is greater than the CRMT, the determining unit 222 determines that the acquired resource state value satisfies the preset push condition.
本实施例通过保持云节点和服务器的资源状态变化值不大于资源当前的资源监控阈值,即资源状态变化程度不超过用户能够容忍的范围,在保持服务器和云节点数据一致性的基础上,进一步降低了资源监控的通信消耗。In this embodiment, the value of the resource state change of the cloud node and the server is not greater than the current resource monitoring threshold of the resource, that is, the degree of change of the resource state does not exceed the range that the user can tolerate, and further, based on maintaining data consistency between the server and the cloud node, further Reduce the communication consumption of resource monitoring.
以下以采用本发明实施例资源监控装置的云计算数据中心监控系统进行说明:The following describes the cloud computing data center monitoring system using the resource monitoring device of the embodiment of the present invention:
参照图4,数据中心监控系统包括3个层次:数据显示层(Presentation Layer)、逻辑处理核心层(Logic Layer)、数据持久化访问层(Data Access  Layer)。Referring to FIG. 4, the data center monitoring system includes three levels: a data presentation layer (Presentation Layer), a logical processing core layer (Logic Layer), and a data persistence access layer (Data Access). Layer).
其中,数据显示层采用FLEX编写显示界面,提供丰富的数据图形显示效果,比如直方图、曲线图、报表等,能够动态的显示云计算数据中心各节点实时的资源状态值。Among them, the data display layer uses FLEX to write the display interface, providing rich data graphic display effects, such as histograms, graphs, reports, etc., which can dynamically display the real-time resource status values of each node in the cloud computing data center.
逻辑处理核心层,负责对监控数据进行处理,并且提供访问接口,包括5个模块,分别是部署在云计算数据中心的每个节点上(包括物理机和虚拟机)的Agent Manager(代理管理)模块,和部署在服务器的Event Manager(事件管理)模块、CEP Engine(复杂事件处理引擎)模块、Strategy Manager(策略管理)模块以及API Interface(应用程序编程接口)模块。其中,Agent Manager模块负责收集宿主节点上各个层次(基础设施层、平台层和应用层)的运行时信息,它会过滤掉监控过程中的无用状态信息,然后组装成一个数据包按照本发明实施例资源监控方法提供的策略发送到服务器;Event manager模块负责对Agent Manager中的事件进行预处理,然后发给CEP Engine(复杂事件处理引擎)模块处理;CEP Engine模块负责进行事件规则匹配,将Event manager模块发过来的事件进行模式匹配,然后将事件放入事件处理队列等候Strategy Manager模块处理;Strategy Manager模块从事件处理队列中取出事件,根据事先制定好的策略进行相应的处理;API Interface模块负责和Web前端进行交互并提供访问接口。The logical processing core layer is responsible for processing the monitoring data and providing an access interface, including five modules, which are Agent Manager (Agent Management) deployed on each node of the cloud computing data center (including physical machines and virtual machines). Modules, and Event Manager modules deployed on the server, CEP Engine (Complex Event Processing Engine) modules, Strategy Manager (Policy Management) modules, and API Interface (Application Programming Interface) modules. The Agent Manager module is responsible for collecting runtime information of each level (infrastructure layer, platform layer and application layer) on the host node, which filters out useless status information in the monitoring process, and then assembles into a data packet according to the present invention. The policy provided by the resource monitoring method is sent to the server; the Event manager module is responsible for preprocessing the events in the Agent Manager and then sending them to the CEP Engine (complex event processing engine) module for processing; the CEP Engine module is responsible for matching the event rules, and the Event is The event sent by the manager module performs pattern matching, and then puts the event into the event processing queue for processing by the Strategy Manager module; the Strategy Manager module takes the event from the event processing queue and performs corresponding processing according to the pre-defined strategy; the API Interface module is responsible for Interact with the web front end and provide an access interface.
数据持久化访问层,负责提供多种数据持久化访问方法,包括Database Provider(数据库支持)模块和XML Provider(可扩展标记语言支持)模块,其中Database Provider模块提供对数据库访问的支持,XML Provider模块提供对XML文件读写的支持,并提供接口供前端调用查询。The data persistence access layer is responsible for providing a variety of data persistence access methods, including the Database Provider module and the XML Provider (Extensible Markup Language Support) module, wherein the Database Provider module provides support for database access, and the XML Provider module. Provides support for reading and writing XML files and provides an interface for front-end calls to query.
通过应用本发明实施例提供的资源监控装置,该云计算数据中心监控系统能够在保证服务器和节点资源状态值一致性的基础上,减少资源监控的通信消耗。By applying the resource monitoring apparatus provided by the embodiment of the present invention, the cloud computing data center monitoring system can reduce communication consumption of resource monitoring on the basis of ensuring consistency of server and node resource status values.
本发明实施例还提出了一种资源监控装置,参照图10,提供了本发明资源监控装置的第四实施例,在本实施例中,所述资源监控装置包括: The embodiment of the present invention further provides a resource monitoring apparatus. Referring to FIG. 10, a fourth embodiment of the resource monitoring apparatus of the present invention is provided. In this embodiment, the resource monitoring apparatus includes:
第二确定模块110,设置成:确定在当前拉取周期内其所在的服务器是否接收到云节点推送的资源状态值;The second determining module 110 is configured to: determine whether the server where the server is located receives the resource status value pushed by the cloud node during the current pull period;
本实施例提出的资源监控装置,可以应用于云计算数据中心的资源监控中,例如,资源监控装置内置于服务器运行,所述服务器间隔预设的拉取周期从云节点拉取资源状态值,若在当前拉取周期内,所述服务器接收到所述云节点推送的资源状态值,服务器取消当次资源状态值拉取操作;若在当前拉取周期内,所述服务器未接收到所述云节点推送的资源状态值,服务器执行当次资源状态值拉取操作,以达到降低云计算数据中心资源监控通信消耗的目的。The resource monitoring device of the present embodiment can be applied to the resource monitoring of the cloud computing data center. For example, the resource monitoring device is built in the server, and the server pulls the resource state value from the cloud node by using a preset pull period. If the server receives the resource status value pushed by the cloud node during the current pull period, the server cancels the current resource status value pull operation; if the current pull period, the server does not receive the The resource status value pushed by the cloud node, and the server performs the current resource status value pull operation to reduce the consumption of the cloud computing data center resource monitoring communication.
需要说明的是,对云计算数据中心进行监控,往往不需要整个系统具体资源的具体使用情况,而只需要了解各个资源的当前使用状态是否在预定的可接受范围内,即只需要进行状态监控。本实施例中,第二确定模块110设置成:确定在当前拉取周期内其所在的服务器是否接收到云节点推送的资源状态值,以判断是否需要进行当次的资源状态值拉取操作。It should be noted that monitoring the cloud computing data center often does not require the specific use of the specific resources of the entire system, but only needs to know whether the current usage status of each resource is within a predetermined acceptable range, that is, only state monitoring is required. . In this embodiment, the second determining module 110 is configured to: determine whether the server where the server is located receives the resource state value pushed by the cloud node during the current pull period, to determine whether the current resource state value pull operation needs to be performed.
拉取模块120,设置成:当所述服务器在当前拉取周期内未接收到所述云节点推送的资源状态值时,拉取所述云节点当前的资源状态值。The pull module 120 is configured to: when the server does not receive the resource state value pushed by the cloud node in the current pull period, pull the current resource state value of the cloud node.
容易理解的是,若在当前拉取周期内,所述服务器未接收到所述云节点推送的资源状态值,即服务器上对应所述云节点的资源状态值未得到更新,拉取模块120需要进行当次资源状态值拉取操作以更新服务器上对应所述云节点的资源状态值。本实施例中,所述拉取模块120当所述服务器在当前拉取周期内未接收到所述云节点推送的资源状态值时,拉取所述云节点当前的资源状态值,以供所述服务器更新对应所述云节点的资源状态值。It is easy to understand that if the server does not receive the resource status value pushed by the cloud node during the current pull period, that is, the resource status value corresponding to the cloud node on the server is not updated, the pull module 120 needs to be updated. The current resource status value pull operation is performed to update the resource status value corresponding to the cloud node on the server. In this embodiment, the pull module 120 pulls the current resource state value of the cloud node when the server does not receive the resource state value pushed by the cloud node in the current pull period. The server update corresponds to a resource status value of the cloud node.
需要说明的是,云计算是整合资源以即方式提供服务的技术,它主要在三个层面体现技术和服务:It should be noted that cloud computing is a technology that integrates resources to provide services in an instant manner. It mainly reflects technologies and services at three levels:
(1)基础设施层,让硬件资源以即方式提供服务;(1) The infrastructure layer allows hardware resources to provide services in an immediate manner;
(2)平台层,让应用平台以即方式提供服务;(2) The platform layer allows the application platform to provide services in an instant manner;
(3)应用层,让应用以即方式提供服务;(3) The application layer allows the application to provide services in an instant manner;
其中,即方式就像水电一样,从开始使用到结束使用进行度量,登录应 用入口就可以直接使用应用,甚至不用在本地安装应用,就像打开水龙头就可以用水一样,然后付费,它本质是一种推的服务。Among them, the way is like hydropower, from the beginning to the end of use to measure, the login should With the portal, you can use the app directly, even without installing the app locally, just like opening the tap to use water, and then paying, it is essentially a push service.
在本实施例中,所述拉取模块120在拉取所述云节点当前的资源状态值时,优选拉取所述云节点各个层次(包括基础设施层、平台层以及应用层)的运行时资源状态值,即各个层次最新的资源状态值。In the embodiment, the pull module 120 preferably pulls the running time of each level (including the infrastructure layer, the platform layer, and the application layer) of the cloud node when the current resource state value of the cloud node is pulled. The resource status value, which is the latest resource status value for each level.
可选地,在本实施例中,当所述服务器在当前拉取周期内接收到所述云节点推送的资源状态值时,所述拉取模块120不执行当次资源状态值拉取操作;Optionally, in this embodiment, when the server receives the resource status value pushed by the cloud node in the current pull period, the pull module 120 does not perform the current resource status value pull operation;
容易理解的是,若在当前拉取周期内,所述服务器接收到所述云节点推送的资源状态值,即服务器上对应所述云节点的资源状态值已经得到更新,所述拉取模块120不再需要执行当次的资源状态值拉取操作。It is easy to understand that, if the server receives the resource status value pushed by the cloud node in the current pull period, that is, the resource status value corresponding to the cloud node on the server has been updated, the pull module 120 is updated. It is no longer necessary to perform the current resource state value pull operation.
本实施例提出的资源监控装置,通过内置于服务器运行,并结合推送和拉取两种资源状态值的获取方式,使得服务器在且仅在当前拉取周期内未接收到所述云节点推送的资源状态值时,进行资源状态值的拉取操作,减少了不必要的网络传输,能够降低资源监控的通信消耗。The resource monitoring device provided in this embodiment is built in the server and combined with the method of obtaining the two resource state values by pushing and pulling, so that the server does not receive the cloud node push in the current pull cycle. When the resource status value is used, the pull operation of the resource status value is performed, the unnecessary network transmission is reduced, and the communication consumption of the resource monitoring can be reduced.
可选地,基于第四实施例,提出本发明资源监控装置的第五实施例,参照图11,在本实施例中,所述资源监控装置还包括:Optionally, based on the fourth embodiment, a fifth embodiment of the resource monitoring apparatus of the present invention is provided. Referring to FIG. 11, in the embodiment, the resource monitoring apparatus further includes:
计算模块130,设置成:将所述资源状态值推入所述服务器的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第二预设计算参数计算所述资源状态值对应的资源监控阈值;The calculating module 130 is configured to: push the resource status value into a resource monitoring window of the server, and calculate a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the Calculating, by the difference and the second preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
形象的说,资源监控窗口就是一个容器,可以用一个二元组(L,V)对其进行描述,L用于表示资源监控窗口的长度,即可以容纳的数据容量,V用于表示资源监控窗口的大小,为当前资源监控窗口中资源状态值最大值和最小值差值。服务器每次拉取到所述云节点当前的资源状态值后,将所述资源状态值推入资源监控窗口,然后更新资源监控窗口的V值,并将更新后的V值代入公式(3)计算所述资源状态值对应的资源监控阈值: The image said that the resource monitoring window is a container, which can be described by a two-group (L, V), which is used to indicate the length of the resource monitoring window, that is, the data capacity that can be accommodated, and V is used to indicate resource monitoring. The size of the window is the difference between the maximum and minimum values of the resource status values in the current resource monitoring window. After the server pulls the current resource state value of the cloud node, the server pushes the resource state value into the resource monitoring window, and then updates the V value of the resource monitoring window, and substitutes the updated V value into the formula (3). Calculating a resource monitoring threshold corresponding to the resource status value:
SRMT=SRMW.V*SRMI……公式(3);SRMT=SRMW.V*SRMI...Formula (3);
其中,SRMT表示资源监控阈值,SRMW.V表示更新后的V值,SRMI表示监控相对误差率,为预设值,即所述第二预设计算参数。The SRMT represents a resource monitoring threshold, the SRMW.V represents an updated V value, and the SRMI represents a monitoring relative error rate, which is a preset value, that is, the second preset calculation parameter.
需要说明的是,SRMI的取值范围优选为[0,1],用于表示用户对资源状态值的敏感和及时程度,SRMI越小表示用户需要越准确的资源状态值,相反,则说明用户能忍受相对较大的资源状态值不一致性。SRMI可由服务器缺省设置,还可以由用户手动设置,例如,SRMI由服务器缺省设置为15%。It should be noted that the value range of the SRMI is preferably [0, 1], which is used to indicate the sensitivity and timeliness of the user to the resource status value. The smaller the SRMI is, the more accurate the resource status value is required by the user. Can tolerate relatively large resource state value inconsistencies. SRMI can be set by default by the server and can also be set manually by the user. For example, SRMI is set to 15% by default.
可选地,计算模块130在将拉取的所述资源状态值推入资源监控窗口之前,首先判断所述资源监控窗口的容量是否已满,若是则将最早的一条资源状态值移出窗口,然后将新拉取的所述资源状态值推入所述资源监控窗口;否则直接将新拉取的所述资源状态值推入所述资源监控窗口。Optionally, the calculating module 130 first determines whether the capacity of the resource monitoring window is full before pushing the pulled resource state value into the resource monitoring window, and if yes, moves the earliest resource state value out of the window, and then Pushing the newly pulled resource status value into the resource monitoring window; otherwise, directly pushing the newly pulled resource status value into the resource monitoring window.
所述计算模块130还设置成:基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值;The calculating module 130 is further configured to: calculate a resource state change value based on the resource state value and the recorded resource state value obtained by the server last time;
需要说明的是,所述资源监控装置还包括记录模块,设置成:在所述服务器接收到云节点推送的资源状态值时,记录所述云节点推送的资源状态值;以及在所述服务器拉取所述云节点的资源状态值时,记录所述服务器拉取的资源状态值。It should be noted that the resource monitoring apparatus further includes a recording module, configured to: when the server receives the resource status value pushed by the cloud node, record a resource status value pushed by the cloud node; and pull the server status When the resource state value of the cloud node is taken, the resource state value pulled by the server is recorded.
本实施例中,所述计算模块130基于当前拉取的所述资源状态值,以及所述服务器上一次获取的资源状态值计算资源状态变化值。具体地,所述计算模块130基于记录的所述云节点上次推送的资源状态值,以及记录的所述服务器上次拉取的资源状态值各自对应的记录时间点,确定所述云节点对应所述云节点的最新资源状态值,即所述服务器上一次获取的资源状态值,并将拉取的所述资源状态值以及所述最新资源状态值代入公式(4)计算资源状态变化值:In this embodiment, the calculation module 130 calculates a resource state change value based on the currently pulled resource state value and the resource state value acquired by the server last time. Specifically, the calculating module 130 determines that the cloud node corresponds to the recorded resource time value that is last pushed by the cloud node and the recorded time point corresponding to the resource state value that is last pulled by the server. The latest resource status value of the cloud node, that is, the resource status value acquired by the server last time, and the pulled resource status value and the latest resource status value are substituted into the formula (4) to calculate the resource status change value:
RCV=|SRN-RO|……公式(4);RCV=|SRN-RO|...Formula (4);
其中,RCV表示资源状态变化值,SRN表示新拉取的资源状态值,RO表示服务器上对应所述云节点的最新资源状态值。The RCV represents a resource state change value, the SRN represents a newly pulled resource state value, and the RO represents a latest resource state value corresponding to the cloud node on the server.
调整模块140,设置成:当所述资源状态变化值大于或等于所述资源监 控阈值时,根据所述资源状态变化值缩短所述拉取周期;以及当所述资源状态变化值小于所述资源监控阈值时,根据所述资源状态变化值延长所述拉取周期。The adjusting module 140 is configured to: when the resource state change value is greater than or equal to the resource monitoring When the threshold is controlled, the pull period is shortened according to the resource state change value; and when the resource state change value is smaller than the resource monitoring threshold, the pull period is extended according to the resource state change value.
本实施例中,所述调整模块140在缩短所述拉取周期时,可以按照预设缩减量缩短所述拉取周期,例如,调整模块140每次将所述拉取周期缩短5秒。所述调整模块140还可以按照预设的资源状态变化值与缩减量的关联关系,确定所述资源状态变化值对应的缩减量,并按照确定的缩减量缩短所述拉取周期。In this embodiment, when the adjustment module 140 shortens the pull cycle, the pull cycle may be shortened according to a preset reduction amount. For example, the adjustment module 140 shortens the pull cycle by 5 seconds each time. The adjustment module 140 may further determine the reduction amount corresponding to the resource state change value according to the preset relationship between the resource state change value and the reduction amount, and shorten the pull cycle according to the determined reduction amount.
所述调整模块140在延长所述拉取周期时,可以按照预设增加量延长所述拉取周期,例如,调整模块140每次将所述拉取周期延长5秒。所述调整模块140还可以按照预设的资源状态变化值与增加量的关联关系,确定所述资源状态变化值对应的增加量,并按照确定的增加量延长所述拉取周期。The adjustment module 140 may extend the pull period according to a preset increase amount when the pull period is extended. For example, the adjustment module 140 extends the pull period by 5 seconds each time. The adjustment module 140 may further determine an increase amount corresponding to the resource state change value according to a preset relationship between the resource state change value and the increase amount, and extend the pull cycle according to the determined increase amount.
本实施例通过不断调整拉取周期的时长,在保持云节点和服务器资源状态值一致性的基础上,能够进一步降低资源监控的通信消耗。In this embodiment, by continuously adjusting the duration of the pull cycle, the communication consumption of resource monitoring can be further reduced while maintaining the consistency of the cloud node and server resource state values.
本发明实施例还提供一种资源监控系统,参照图12,在本发明资源监控系统的第一实施例中,所述资源监控系统包括云节点100和服务器200,其中,The embodiment of the present invention further provides a resource monitoring system. Referring to FIG. 12, in the first embodiment of the resource monitoring system of the present invention, the resource monitoring system includes a cloud node 100 and a server 200, where
所述云节点100包括:The cloud node 100 includes:
第一确定模块,设置成:确定服务器200在当前推送周期内是否拉取过所述云节点100的资源状态值;The first determining module is configured to: determine whether the server 200 pulls the resource status value of the cloud node 100 during the current push period;
推送模块,设置成:当所述服务器200在当前推送周期内未拉取过所述云节点100的资源状态值时,获取所述云节点100当前的资源状态值,并将获取的所述资源状态值推送至所述服务器200;The pushing module is configured to: when the server 200 does not pull the resource state value of the cloud node 100 in the current pushing period, acquire the current resource state value of the cloud node 100, and obtain the obtained resource The status value is pushed to the server 200;
所述服务器200包括:The server 200 includes:
第二确定模块,设置成:确定在当前拉取周期内所述服务器200是否接收到云节点100推送的资源状态值;The second determining module is configured to: determine whether the server 200 receives the resource status value pushed by the cloud node 100 during the current pull period;
拉取模块,设置成:当所述服务器200在当前拉取周期内未接收到所述 云节点100推送的资源状态值时,拉取所述云节点100当前的资源状态值。Pulling the module, configured to: when the server 200 does not receive the current pull period When the resource state value pushed by the cloud node 100 is pulled, the current resource state value of the cloud node 100 is pulled.
为了减少服务器端的压力以及从易于管理的方面考虑,参照图12,本实施例提供的资源监控系统采用分区域部署服务器200方式,每个区域的服务器200只接收和处理该区域的各个云节点100的监控数据,其中,服务器200获取监控数据(包括服务器200拉取和云节点100推送)的过程具体可参照前述实施例施行,此处不再赘述。In order to reduce the pressure on the server side and from the aspect of easy management, referring to FIG. 12, the resource monitoring system provided in this embodiment adopts a sub-area deployment server 200 manner, and the server 200 in each area only receives and processes each cloud node 100 in the area. For the monitoring data, the process for the server 200 to obtain the monitoring data (including the server 200 pull and the cloud node 100 push) may be specifically implemented by referring to the foregoing embodiment, and details are not described herein again.
此外,为方便用户查询,在本实施例提供的资源监控系统中还设置有查询服务器300,用以响应用户终端400的查询。In addition, in order to facilitate the user's query, the resource monitoring system provided in this embodiment is further provided with a query server 300 for responding to the query of the user terminal 400.
具体的,所述查询服务器300设置成:在接收到用户终端400发送的查询指令时,将所述查询指令转发至所述服务器200;Specifically, the query server 300 is configured to: when receiving the query instruction sent by the user terminal 400, forward the query instruction to the server 200;
所述服务器200还包括获取模块,设置成:在接收到所述查询指令时,获取相应的资源状态值,并将获取的所述资源状态值发送至所述查询服务器300;The server 200 further includes an obtaining module, configured to: when receiving the query instruction, acquire a corresponding resource status value, and send the obtained resource status value to the query server 300;
所述查询服务器300还设置成:在接收到所述资源状态值时,将所述资源状态值发送至所述用户终端400,供其显示。The query server 300 is further configured to: when receiving the resource status value, send the resource status value to the user terminal 400 for display.
进一步的,参照图13,图13为本发明实施例资源监控系统的逻辑层次结构示例图。Further, referring to FIG. 13, FIG. 13 is a diagram showing an example of a logical hierarchical structure of a resource monitoring system according to an embodiment of the present invention.
本实施例提供的资源监控系统采用三级架构,由数据展示层(Presentation Layer)、数据处理层(Data Processing Layer)、被监控层(Resource Layer)三个层次组成。The resource monitoring system provided by this embodiment adopts a three-level architecture, and is composed of three layers: a presentation layer, a data processing layer, and a resource layer.
其中,数据展示层负责监控数据的统一展现,通过Portal以完全B/S方式展现,并实现与用户互动,响应用户的操作与设定等。The data display layer is responsible for the unified display of the monitoring data, and is displayed in a complete B/S manner through the portal, and realizes interaction with the user, responding to the user's operation and setting, and the like.
数据处理层负责监控策略的下发执行,将采集的原始数据经数据汇总,写入数据库,以供数据展示层从数据库调用监控数据。The data processing layer is responsible for monitoring the execution of the policy, and the collected raw data is summarized by the data and written into the database, so that the data display layer calls the monitoring data from the database.
被监控层包括所有被管理的对象,即资源,可通过Agent方式来获取数据。The monitored layer includes all managed objects, that is, resources, which can be acquired by the Agent.
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令 被云节点执行时,使得该云节点可执行上述任意的资源监控方法。The embodiment of the invention also discloses a computer program, including program instructions, when the program instruction When executed by the cloud node, the cloud node can perform any of the above resource monitoring methods.
本发明实施例还公开了一种载有所述的计算机程序的载体。The embodiment of the invention also discloses a carrier carrying the computer program.
本发明实施例还公开了一种计算机程序,包括程序指令,当该程序指令被服务器执行时,使得该服务器可执行上述任意的资源监控方法。The embodiment of the invention also discloses a computer program, comprising program instructions, which, when executed by the server, enable the server to perform any of the above resource monitoring methods.
本发明实施例还公开了一种载有所述的计算机程序的载体。The embodiment of the invention also discloses a carrier carrying the computer program.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Alternatively, all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve. Thus, the invention is not limited to any specific combination of hardware and software.
上述实施例中的各装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的各装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When each device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求所述的保护范围为准。Variations or substitutions are readily conceivable within the scope of the present invention by those skilled in the art and are within the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.
工业实用性 Industrial applicability
本发明技术方案通过结合推送和拉取两种资源状态值的获取方式,云节点在且仅在服务器在当前推送周期内未拉取过所述云节点的资源状态值时,进行资源状态值的推送操作,减少了不必要的网络传输,能够降低资源监控的通信消耗。因此本发明具有很强的工业实用性。 According to the technical solution of the present invention, the cloud node performs the resource status value when the resource status value of the cloud node is not pulled by the server during the current push period by combining the push and pull status of the resource status values. The push operation reduces unnecessary network transmission and reduces the communication consumption of resource monitoring. Therefore, the present invention has strong industrial applicability.

Claims (14)

  1. 一种资源监控方法,所述资源监控方法包括:A resource monitoring method, the resource monitoring method includes:
    云节点确定服务器在当前推送周期内是否拉取过所述云节点的资源状态值;The cloud node determines whether the server pulls the resource state value of the cloud node in the current push period;
    当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取自身当前的资源状态值,并将获取的所述资源状态值推送至所述服务器。When the server does not pull the resource status value of the cloud node in the current push period, the cloud node acquires its current resource status value, and pushes the obtained resource status value to the server.
  2. 如权利要求1所述的资源监控方法,其中,所述当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取自身当前的资源状态值,并将获取的所述资源状态值推送至所述服务器的步骤包括:The resource monitoring method according to claim 1, wherein the cloud node acquires its current resource state value when the server does not pull the resource state value of the cloud node in the current push period. And the step of pushing the obtained resource status value to the server includes:
    当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,所述云节点获取自身当前的资源状态值;When the server does not pull the resource state value of the cloud node in the current push period, the cloud node obtains its current resource state value;
    所述云节点判断获取的所述资源状态值是否满足预设推送条件;Determining, by the cloud node, whether the acquired resource state value meets a preset pushing condition;
    在所述资源状态值满足所述预设推送条件时,所述云节点将所述资源状态值推送至所述服务器。When the resource state value satisfies the preset push condition, the cloud node pushes the resource state value to the server.
  3. 如权利要求2所述的资源监控方法,其中,所述云节点判断获取的所述资源状态值是否满足预设推送条件的步骤包括:The resource monitoring method according to claim 2, wherein the step of determining, by the cloud node, whether the acquired resource status value satisfies a preset push condition comprises:
    所述云节点将所述资源状态值推入所述云节点的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第一预设计算参数计算所述资源状态值对应的资源监控阈值;The cloud node pushes the resource status value into a resource monitoring window of the cloud node, and calculates a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and based on the difference And calculating, by the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
    所述云节点基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值;The cloud node calculates a resource state change value based on the resource state value and the recorded resource state value acquired by the server at a time;
    当所述资源状态变化值大于所述资源监控阈值时,所述云节点确定所述资源状态值满足所述预设推送条件。When the resource state change value is greater than the resource monitoring threshold, the cloud node determines that the resource state value satisfies the preset push condition.
  4. 一种资源监控方法,所述资源监控方法包括:A resource monitoring method, the resource monitoring method includes:
    服务器确定在当前拉取周期内是否接收到云节点推送的资源状态值;The server determines whether the resource status value pushed by the cloud node is received in the current pull period;
    在当前拉取周期内未接收到所述云节点推送的资源状态值时,所述服务 器拉取所述云节点当前的资源状态值。The service is not received when the cloud node pushes the resource status value in the current pull period The device pulls the current resource state value of the cloud node.
  5. 如权利要求4所述的资源监控方法,其中,所述在当前拉取周期内未接收到所述云节点推送的资源状态值时,所述服务器拉取所述云节点当前的资源状态值的步骤之后,该方法还包括:The resource monitoring method according to claim 4, wherein the server pulls the current resource state value of the cloud node when the resource state value pushed by the cloud node is not received within the current pull period After the step, the method further includes:
    所述服务器将所述资源状态值推入所述服务器的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第二预设计算参数计算所述资源状态值对应的资源监控阈值;The server pushes the resource status value into a resource monitoring window of the server, and calculates a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the difference and the Calculating, by the preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
    所述服务器基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值,并判断所述资源状态变化值是否小于所述资源监控阈值;The server calculates a resource state change value based on the resource state value and the recorded resource state value obtained by the server, and determines whether the resource state change value is smaller than the resource monitoring threshold;
    当所述资源状态变化值大于或等于所述资源监控阈值时,所述服务器根据所述资源状态变化值缩短所述拉取周期;When the resource state change value is greater than or equal to the resource monitoring threshold, the server shortens the pull cycle according to the resource state change value;
    当所述资源状态变化值小于所述资源监控阈值时,所述服务器根据所述资源状态变化值延长所述拉取周期。When the resource state change value is smaller than the resource monitoring threshold, the server extends the pull cycle according to the resource state change value.
  6. 一种资源监控装置,所述资源监控装置包括第一确定模块和推送模块,其中A resource monitoring device includes a first determining module and a pushing module, wherein
    所述第一确定模块设置成:确定服务器在当前推送周期内是否拉取过其所在云节点的资源状态值;The first determining module is configured to: determine whether the server has pulled the resource status value of the cloud node in the current push period;
    所述推送模块设置成:当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,获取所述云节点当前的资源状态值,并将获取的所述资源状态值推送至所述服务器。The pushing module is configured to: when the server does not pull the resource state value of the cloud node in the current pushing period, acquire the current resource state value of the cloud node, and obtain the obtained resource state value. Push to the server.
  7. 如权利要求6所述的资源监控装置,其中,所述推送模块包括获取子模块、判断子模块和推送子模块,其中The resource monitoring device according to claim 6, wherein the push module comprises an acquisition submodule, a determination submodule, and a push submodule, wherein
    所述获取子模块设置成:当所述服务器在当前推送周期内未拉取过所述云节点的资源状态值时,获取所述云节点当前的资源状态值;The acquiring sub-module is configured to: when the server does not pull the resource state value of the cloud node in the current push period, obtain the current resource state value of the cloud node;
    所述判断子模块设置成:判断获取的所述资源状态值是否满足预设推送条件; The determining sub-module is configured to: determine whether the acquired resource state value meets a preset pushing condition;
    所述推送子模块设置成:在所述资源状态值满足所述预设推送条件时,将所述资源状态值推送至所述服务器。The push sub-module is configured to: push the resource status value to the server when the resource status value satisfies the preset push condition.
  8. 如权利要求7所述的资源监控装置,其中,所述判断子模块包括计算单元和确定单元,其中The resource monitoring device according to claim 7, wherein said judgment sub-module comprises a calculation unit and a determination unit, wherein
    所述计算单元设置成:将所述资源状态值推入所述云节点的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第一预设计算参数计算所述资源状态值对应的资源监控阈值;The calculating unit is configured to: push the resource state value into a resource monitoring window of the cloud node, and calculate a difference between a maximum resource state value and a minimum resource state value in the resource monitoring window, and Calculating, by the difference value and the first preset calculation parameter, a resource monitoring threshold corresponding to the resource state value;
    所述计算单元还设置成:基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值;The calculating unit is further configured to: calculate a resource state change value based on the resource state value and the recorded resource state value acquired by the server last time;
    所述确定单元设置成:当所述资源状态变化值大于所述资源监控阈值时,确定所述资源状态值满足所述预设推送条件。The determining unit is configured to: when the resource state change value is greater than the resource monitoring threshold, determine that the resource state value satisfies the preset push condition.
  9. 一种资源监控装置,所述资源监控装置包括第二确定模块和拉取模块,其中A resource monitoring device includes a second determining module and a pulling module, wherein
    所述第二确定模块设置成:确定在当前拉取周期内其所在的服务器是否接收到云节点推送的资源状态值;The second determining module is configured to: determine whether the server where the server is located receives the resource status value pushed by the cloud node during the current pull period;
    所述拉取模块设置成:当所述服务器在当前拉取周期内未接收到所述云节点推送的资源状态值时,拉取所述云节点当前的资源状态值。The pull module is configured to: when the server does not receive the resource state value pushed by the cloud node in the current pull period, pull the current resource state value of the cloud node.
  10. 如权利要求9所述的资源监控装置,其中,所述资源监控装置还包括计算模块和调整模块,其中The resource monitoring device according to claim 9, wherein said resource monitoring device further comprises a calculation module and an adjustment module, wherein
    所述计算模块设置成:将所述资源状态值推入所述服务器的资源监控窗口中,并计算所述资源监控窗口中的最大资源状态值和最小资源状态值的差值,以及基于所述差值和第二预设计算参数计算所述资源状态值对应的资源监控阈值;The calculating module is configured to: push the resource status value into a resource monitoring window of the server, and calculate a difference between a maximum resource status value and a minimum resource status value in the resource monitoring window, and based on the Calculating, by the difference and the second preset calculation parameter, a resource monitoring threshold corresponding to the resource status value;
    所述计算模块还设置成:基于所述资源状态值,以及记录的所述服务器上一次获取的资源状态值,计算资源状态变化值,并判断所述资源状态变化值是否小于所述资源监控阈值; The calculating module is further configured to: calculate a resource state change value based on the resource state value, and the recorded resource state value acquired by the server, and determine whether the resource state change value is smaller than the resource monitoring threshold ;
    所述调整模块设置成:当所述资源状态变化值大于或等于所述资源监控阈值时,根据所述资源状态变化值缩短所述拉取周期;以及当所述资源状态变化值小于所述资源监控阈值时,根据所述资源状态变化值延长所述拉取周期。The adjusting module is configured to: when the resource state change value is greater than or equal to the resource monitoring threshold, shorten the pull period according to the resource state change value; and when the resource state change value is smaller than the resource When the threshold is monitored, the pull cycle is extended according to the resource state change value.
  11. 一种云节点,包括如权利要求6-8中任一项所述的资源监控装置。A cloud node comprising the resource monitoring device according to any one of claims 6-8.
  12. 一种服务器,包括如权利要求9或10所述的资源监控装置。A server comprising the resource monitoring device of claim 9 or 10.
  13. 一种资源监控系统,包括:如权利要求11所述的云节点和如权利要求12所述的服务器。A resource monitoring system comprising: the cloud node according to claim 11 and the server according to claim 12.
  14. 如权利要求13所述的资源监控系统,所述资源监控系统还包括查询服务器,The resource monitoring system according to claim 13, wherein the resource monitoring system further comprises a query server,
    所述查询服务器设置成:在接收到用户终端发送的查询指令时,将所述查询指令转发至所述服务器;The query server is configured to forward the query instruction to the server when receiving a query instruction sent by the user terminal;
    所述服务器还包括获取模块,设置成:在接收到所述查询指令时,获取所述云节点的资源状态值,并将获取的所述资源状态值发送至所述查询服务器;The server further includes: an obtaining module, configured to: when receiving the query instruction, acquire a resource state value of the cloud node, and send the obtained resource state value to the query server;
    所述查询服务器还设置成:在接收到所述资源状态值时,将所述资源状态值发送至所述用户终端,供其显示。 The query server is further configured to: when the resource status value is received, send the resource status value to the user terminal for display.
PCT/CN2016/078121 2015-08-24 2016-03-31 Resource monitoring method, apparatus and system WO2017031988A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510522743.XA CN106487601B (en) 2015-08-24 2015-08-24 Resource monitoring method, device and system
CN201510522743.X 2015-08-24

Publications (1)

Publication Number Publication Date
WO2017031988A1 true WO2017031988A1 (en) 2017-03-02

Family

ID=58099425

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/078121 WO2017031988A1 (en) 2015-08-24 2016-03-31 Resource monitoring method, apparatus and system

Country Status (2)

Country Link
CN (1) CN106487601B (en)
WO (1) WO2017031988A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911791A (en) * 2017-03-16 2017-06-30 北京方研矩行科技有限公司 A kind of expansible application dissemination system
CN111600753A (en) * 2020-05-13 2020-08-28 山东汇贸电子口岸有限公司 Intelligent agent management system in cloud computing environment
CN112988506A (en) * 2021-02-19 2021-06-18 山东英信计算机技术有限公司 Big data server node performance monitoring method and system
US11296999B2 (en) * 2018-06-26 2022-04-05 Telefonaktiebolaget Lm Ericsson (Publ) Sliding window based non-busy looping mode in cloud computing

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753401A (en) * 2017-11-03 2019-05-14 中国电信股份有限公司 Monitoring method, collection terminal, control end, monitoring system and device
CN108429635B (en) * 2018-01-31 2021-01-05 昆明理工大学 Data transmission method used in distributed environment
EP3734928A4 (en) * 2018-03-23 2021-01-20 Huawei Technologies Co., Ltd. Method for virtual machine to access remote acceleration device, and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387521A (en) * 2010-08-27 2012-03-21 中兴通讯股份有限公司 Method and system for monitoring states of nodes of wireless sensor network (WSN)
CN102647452A (en) * 2012-03-20 2012-08-22 广东电子工业研究院有限公司 Self-adaptation resource monitoring system and method based on large-scale cloud computing platform
WO2012134799A2 (en) * 2011-03-31 2012-10-04 Microsoft Corporation Fault detection and recovery as a service

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179499B (en) * 2007-12-06 2010-07-07 上海大学 Method for wireless self-organizing of monitoring system to form tree-shaped routing
US8271615B2 (en) * 2009-03-31 2012-09-18 Cloud Connex, Llc Centrally managing and monitoring software as a service (SaaS) applications
CN103378978A (en) * 2012-04-16 2013-10-30 腾讯科技(深圳)有限公司 Message push method and server
CN103780696A (en) * 2014-01-23 2014-05-07 北京荣之联科技股份有限公司 Cloud monitoring method, device and system based on distributed pushing
US9438435B2 (en) * 2014-01-31 2016-09-06 Intenational Business Machines Corporation Secure, multi-tenancy aware and bandwidth-efficient data center multicast

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387521A (en) * 2010-08-27 2012-03-21 中兴通讯股份有限公司 Method and system for monitoring states of nodes of wireless sensor network (WSN)
WO2012134799A2 (en) * 2011-03-31 2012-10-04 Microsoft Corporation Fault detection and recovery as a service
CN102647452A (en) * 2012-03-20 2012-08-22 广东电子工业研究院有限公司 Self-adaptation resource monitoring system and method based on large-scale cloud computing platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LI, YANG.: "Research On Performance Management for Cloud Computing Platform", CHINA MASTER'S THESES FULL-TEXT DATABASE INFORMATION TECHNOLOGY SERIES, 15 June 2013 (2013-06-15), ISSN: 1674-0246 *
YANG, GANG ET AL.: "Adaptive approach to monitor resource for cloud computing platform", COMPUTER ENGINEERING AND APPLICATIONS, vol. 45, no. 29, 11 October 2009 (2009-10-11), ISSN: 1002-8331 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106911791A (en) * 2017-03-16 2017-06-30 北京方研矩行科技有限公司 A kind of expansible application dissemination system
US11296999B2 (en) * 2018-06-26 2022-04-05 Telefonaktiebolaget Lm Ericsson (Publ) Sliding window based non-busy looping mode in cloud computing
CN111600753A (en) * 2020-05-13 2020-08-28 山东汇贸电子口岸有限公司 Intelligent agent management system in cloud computing environment
CN111600753B (en) * 2020-05-13 2023-03-28 山东汇贸电子口岸有限公司 Intelligent agent management system in cloud computing environment
CN112988506A (en) * 2021-02-19 2021-06-18 山东英信计算机技术有限公司 Big data server node performance monitoring method and system

Also Published As

Publication number Publication date
CN106487601B (en) 2021-04-30
CN106487601A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
WO2017031988A1 (en) Resource monitoring method, apparatus and system
CN109446032A (en) The method and system of the scalable appearance of Kubernetes copy
CN102893257B (en) The mechanism of sensor hub will be tasked outside context-aware applications related functionality
CN112181764B (en) Kubernetes resource data monitoring method and device
US20130145015A1 (en) Overhead management for event tracing
CN110515539A (en) Cloud disk hanging method, device, equipment and storage medium based on cloud storage
CN110930291B (en) GPU video memory management control method and related device
US9218199B2 (en) Identifying thread progress information by monitoring transitions between interesting states
WO2015139164A1 (en) Task scheduling method, apparatus and device
CN104871114A (en) Idle phase prediction for integrated circuits
CN113971066A (en) Kubernetes cluster resource dynamic adjustment method and electronic equipment
CN108369550B (en) Real-time alteration of data from different sources
CN107483292B (en) Dynamic monitoring method for cloud platform
WO2022016845A1 (en) Multi-node monitoring method and apparatus, electronic device, and storage medium
CN103685544A (en) Performance pre-evaluation based client cache distributing method and system
CN103442087B (en) A kind of Web service system visit capacity based on response time trend analysis controls apparatus and method
US20060190639A1 (en) Automatic adjustment of time a consumer waits to access data from a queue during a waiting phase and transmission phase at the queue
CN106550002A (en) A kind of paas clouds mandatory system and method
CN109656945A (en) A kind of information processing method
JP2023530996A (en) Cluster capacity reduction/expansion method and system, capacity reduction/expansion control terminal, and medium
CN108989146A (en) A kind of monitoring method and monitoring system of computer hardware equipment
CN112422627B (en) Internet of things node control method and device, intelligent terminal and storage medium
CN108900335A (en) Workflow management method and device based on Hadoop
CN113973121B (en) Internet of things data processing method and device, electronic equipment and storage medium
CN116405391A (en) OpenStack-based virtual machine node screening method, system and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16838251

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16838251

Country of ref document: EP

Kind code of ref document: A1