CN113986653A - Openstack load balancing data monitoring method, system, storage medium and equipment - Google Patents

Openstack load balancing data monitoring method, system, storage medium and equipment Download PDF

Info

Publication number
CN113986653A
CN113986653A CN202111175169.7A CN202111175169A CN113986653A CN 113986653 A CN113986653 A CN 113986653A CN 202111175169 A CN202111175169 A CN 202111175169A CN 113986653 A CN113986653 A CN 113986653A
Authority
CN
China
Prior art keywords
data
socket
statistical data
load balancing
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111175169.7A
Other languages
Chinese (zh)
Inventor
马良义
秦海中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202111175169.7A priority Critical patent/CN113986653A/en
Publication of CN113986653A publication Critical patent/CN113986653A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a method for monitoring openstack load balancing data, which comprises the following steps: establishing an amphora virtual machine, and configuring the number of multi-queue, the number of haproxy processes and the counted number of sockets for a network card of the virtual machine according to the number of CPUs of the amphora virtual machine; after starting a haproxy process, filtering and collecting the statistical data in the socket one by one; after data are collected for the socket corresponding to each process, summarizing is carried out, and data of the total newly-built connection number and the maximum newly-built connection number are output; and reading the latest statistical data from the storage file and returning the latest statistical data to the user when the data needs to be monitored. The method is beneficial to acquiring the statistical data of each haproxy process in real time and integrating the statistical data, and accurately reflects the load balancing statistical data.

Description

Openstack load balancing data monitoring method, system, storage medium and equipment
Technical Field
The invention relates to the technical field of data monitoring, in particular to a method, a system, a storage medium and equipment for monitoring openstack load balancing data.
Background
Today, the internet is rapidly developing, and various intelligent products realized through the cloud end enter the daily life of people. Despite the rapid adoption of cloud computing technology, the ability to reliably distribute workloads across a multi-cloud platform, multiple data centers, and a mixed infrastructure remains a long-standing drawback. The result is uneven workload distribution and reduced application performance, which can be avoided if the workload is better managed on a global scale. Currently, the default used by the load balancing item octavia in openstack is haproxy of a single process. As network traffic increases, the performance requirements for load balancing also increase. And starting a multiprocess mode of the haproxy, mapping the multiprocess mode to each cpu core, and fully utilizing the cpu performance to greatly improve the load balancing capability of the haproxy.
However, after the haproxy starts multiple processes, the situation of statistical distortion exists when a single socket is used for counting load balancing data, such as the number of newly-built connections and the maximum number of newly-built connections per second in statistics, and the data counted by each process cannot be acquired. However, the octavia project only supports the statistical method of a single socket at present, and the problem of statistical data errors occurs when a plurality of processes are started.
Disclosure of Invention
In view of the above, the present invention provides a method, a system, a storage medium, and a device for monitoring openstack load balancing data, so as to solve the disadvantages of the existing openstack load balancing data monitoring method and system.
Based on the above purpose, the invention provides a method for monitoring openstack load balancing data, which comprises the following steps:
establishing an amphora virtual machine, and configuring the number of multi-queue, the number of haproxy processes and the counted number of sockets for a network card of the virtual machine according to the number of CPUs of the amphora virtual machine;
after starting a haproxy process, filtering and collecting the statistical data in the socket one by one;
after data are collected for the socket corresponding to each process, summarizing is carried out, and data of the total newly-built connection number and the maximum newly-built connection number are output; and
and when the data needs to be monitored, reading the latest statistical data from the storage file and returning the latest statistical data to the user.
In some embodiments, the instruction to create the amphora virtual machine is given through the openstack operating interface.
In some embodiments, the number of multi-queues, the number of haproxy processes, and the counted number of sockets are equal.
In some embodiments, the specific method for collecting the statistical data in the socket is to filter and redirect the statistical data in the socket by using a soct command and a grep command.
In some embodiments, when data needs to be monitored, load balancing statistical data is acquired through a URL interface, parameters are added to the URL to acquire target data, and the octavia receives a URL request and then parses a requested data field. Whether the socket file exists or not and whether the statistic data exist or not are checked, and when no socket file exists or no statistic data exist, no available data are returned; and when the socket file exists and the statistical data exists, performing data acquisition and interception processing on each socket according to the query field. And accumulating the collected data to obtain a total value, and returning the total value together with the data assembly of the single process.
In some embodiments, the parameters include the following:
and (3) Rate: the number of newly-built connections of each process and the number of newly-built connections of all processes at present, namely the number of newly-built connections in the past one second;
rmax: counting the maximum newly-built connection number and the total maximum connection number in the history by each process;
bin, Bout: total number of incoming bytes and total number of sent bytes;
scur: current session number, etc., can be referenced to hatop statistics.
In another aspect of the present invention, a system for monitoring openstack load balancing data is further provided, including:
the system comprises a creating module, a processing module and a processing module, wherein the creating module is used for creating an amphora virtual machine and configuring the number of multi-queue, the number of hash processes and the counted number of sockets for a network card of the virtual machine according to the number of CPUs of the amphora virtual machine;
the acquisition module is used for filtering and acquiring the statistical data in the socket one by one after the haproxy process is started;
the output module is used for collecting data after the socket corresponding to each process collects the data and outputting the data of the total newly-built connection number and the maximum newly-built connection number; and
and the reading module is used for reading the latest statistical data from the storage file and returning the latest statistical data to the user when the data needs to be monitored.
In yet another aspect of the present invention, there is also provided a computer readable storage medium storing computer program instructions which, when executed, implement any one of the methods described above.
In yet another aspect of the present invention, a computer device is provided, which includes a memory and a processor, the memory storing a computer program, the computer program executing any one of the above methods when executed by the processor.
The invention has at least the following beneficial technical effects:
1. the statistical data of each haproxy process can be obtained in real time and integrated, and the accurate load balancing statistical data are reflected;
2. the cloud environment based on openstack provides a system for load balancing statistics, accurate statistical data and statistical data of each hash process are obtained under the scene of using hash multiple processes, and load balancing can be accurately monitored, so that the service volume and the system performance are accurately judged;
3. the problem that the statistical data of a single socket is inaccurate and the statistical data of each process cannot be acquired is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic diagram of a method for monitoring openstack load balancing data according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a system for monitoring openstack load balancing data according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a computer-readable storage medium for implementing a method for monitoring openstack load balancing data according to an embodiment of the present invention;
fig. 4 is a schematic hardware structural diagram of a computer device for executing the method for monitoring openstack load balancing data according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two non-identical entities with the same name or different parameters, and it is understood that "first" and "second" are only used for convenience of expression and should not be construed as limiting the embodiments of the present invention. Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements does not include all of the other steps or elements inherent in the list.
Based on the above purpose, in a first aspect of the embodiments of the present invention, an embodiment of a method for monitoring openstack load balancing data is provided. Fig. 1 is a schematic diagram illustrating an embodiment of a method for monitoring openstack load balancing data provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
step S10, creating an amphora virtual machine, and configuring the number of multi-queue, the number of haproxy processes and the counted number of sockets for the network card of the virtual machine according to the number of CPUs of the amphora virtual machine;
step S20, after the haproxy process is started, filtering and collecting the statistical data in the socket one by one;
step S30, after data are collected for the socket corresponding to each process, summarizing is carried out, and data of the total new connection number and the maximum new connection number are output;
and step S40, when the data needs to be monitored, reading the latest statistical data from the storage file and returning the latest statistical data to the user.
The load balancing is to distribute the operation to a plurality of operation units for execution, so as to complete the work task together and improve the overall work efficiency. Openstack is a cloud computing open source infrastructure item. Octavia is an open source, operator-scale load balancing solution intended to work with OpenStack. Amphora is a component in the Octavia project, the load balancing function execution unit. Haproxy is a free and open source software written in C language that provides high availability, load balancing, and TCP and HTTP based application proxies, the load balancing software currently used by the Octavia project. SOCKET is an intermediate software abstraction layer for communication between an application layer and a TCP/IP protocol family, and is a group of interfaces through which users can communicate and acquire data. The network card multi-queue is a technical means, and can solve the problem of network I/O bandwidth QoS (quality of service). The network card multi-queue driver binds each queue to different cores through interruption, so that the processing bottleneck of a single-core CPU (central processing unit) when the I/O (input/output) bandwidth of a network is increased is solved, and the network forwarding efficiency and the bandwidth performance are improved. The Hatop is an open source data statistical tool applied to haproxy, and can monitor the number of newly-built connections, the maximum number of newly-built connections, the number of processed bytes and the like of the haproxy.
In some preferred embodiments, the instruction to create the amphora virtual machine is given through the openstack operating interface.
In some preferred embodiments, the number of multi-queues, the number of haproxy processes and the number of packets counted are equal.
In some preferred embodiments, the specific method for collecting the statistics in the socket is to filter and redirect the statistics in the socket by using a socket command and a grep command
In a specific embodiment, the openstack load balancing data monitoring method of the present invention may include:
1) in a haproxy multi-process environment, self-adapting to the CPU core number of the amphora virtual machine, configuring the network card multi-queue number, the haproxy process number and the statistical socket number of the amphora virtual machine, storing a directory, and respectively binding each process through a specified process number;
2) acquiring data of each socket through the socat, and deleting and filtering the data according to the requirement;
3) and traversing each socket regularly, collecting and sorting expected data, and returning to the client.
In some preferred embodiments, when monitoring data is required, the following operations are performed:
a. the load balance statistical data is obtained through the URL interface, parameters are added in the URL to obtain target data, and the data field of the request is analyzed after the octavia receives the URL request.
Request type: get to
Request parameters:
and (3) Rate: the number of newly-built connections of each process at present, and the number of newly-built connections of all processes, that is, the number of newly-built connections in the past one second.
Rmax: and counting the maximum newly-built connection number and the total maximum connection number in the history by each process.
Bin, Bout: a total number of incoming bytes and a total number of sent bytes.
Scur: current session number, etc., can be referenced to hatop statistics.
b. After receiving the url request, the octavia parses the data field of the request.
c. And checking whether the socket file exists or not and whether statistic data exist or not, and returning no available data if no socket file exists or no statistic data exist.
d. And if the socket file exists and the statistical data exists, performing data acquisition and interception processing on each socket according to the query field.
e. And accumulating the collected data to obtain a total value, and returning the total value together with the data assembly of the single process.
As shown in fig. 1, the present invention provides a method for monitoring openstack load balancing data. In the cluster building process, the connection state of each node is monitored constantly, when the heartbeat of a certain node cannot be connected, a session backup module is triggered, all session contents in the cluster building process and node information which is disconnected at the moment are recorded, and a timestamp is stored. When the node is monitored again, the backup operation session information is automatically synchronized to the node, and the missing operation is completed. After the completion, the cluster detects the integrity of the cluster function through a detection module, and if the normal operation of the cluster is influenced by the newly recovered node, the rollback operation is automatically carried out, and the integrity of the function is preferentially ensured.
By the openstack load balancing data monitoring method, the statistical data of each haproxy process can be acquired in real time and integrated, and the accurate load balancing statistical data can be reflected. The cloud environment based on openstack provides a load balancing statistical method, accurate statistical data and statistical data of each hash process are obtained in a hash multi-process scene, and load balancing can be accurately monitored, so that the service volume and the system performance are accurately judged. The problem that the statistical data of a single socket is inaccurate and the statistical data of each process cannot be acquired is solved.
In a second aspect of the embodiment of the present invention, a system for monitoring openstack load balancing data is further provided. Fig. 2 is a schematic diagram illustrating an embodiment of a system for monitoring openstack load balancing data provided by the present invention. As shown in fig. 2, a system for monitoring openstack load balancing data includes: the creating module 10 is used for creating an amphora virtual machine and configuring the number of multi-queue, the number of hash processes and the counted number of sockets for a network card of the virtual machine according to the number of CPUs of the amphora virtual machine; the acquisition module 20 is used for filtering and acquiring the statistical data in the socket one by one after the haproxy process is started; the output module 30 is configured to collect data of the socket corresponding to each process, and then output data of the total new connection number and the maximum new connection number; and a reading module 40, which is used for reading the latest statistical data from the storage file and returning the latest statistical data to the user when the data needs to be monitored
Through the system for monitoring openstack load balancing data, the following operations can be executed:
step S10, creating an amphora virtual machine, and configuring the number of multi-queue, the number of haproxy processes and the counted number of sockets for the network card of the virtual machine according to the number of CPUs of the amphora virtual machine;
step S20, after the haproxy process is started, filtering and collecting the statistical data in the socket one by one;
step S30, after data are collected for the socket corresponding to each process, summarizing is carried out, and data of the total new connection number and the maximum new connection number are output;
and step S40, when the data needs to be monitored, reading the latest statistical data from the storage file and returning the latest statistical data to the user.
Through the openstack load balancing data monitoring system, the statistical data of each haproxy process can be acquired in real time and integrated, and the accurate load balancing statistical data are reflected. The cloud environment based on openstack provides a load balancing statistical system, accurate statistical data and statistical data of each hash process are obtained in a hash multi-process scene, and load balancing can be accurately monitored, so that the service volume and the system performance are accurately judged. The problem that the statistical data of a single socket is inaccurate and the statistical data of each process cannot be acquired is solved.
In a third aspect of the embodiment of the present invention, a computer-readable storage medium is further provided, and fig. 3 is a schematic diagram of a computer-readable storage medium for implementing a method for monitoring openstack load balancing data according to the embodiment of the present invention. As shown in fig. 3, the computer-readable storage medium 3 stores computer program instructions 31, the computer program instructions 31 being executable by a processor. The computer program instructions 31 when executed implement the method as follows:
step S10, creating an amphora virtual machine, and configuring the number of multi-queue, the number of haproxy processes and the counted number of sockets for the network card of the virtual machine according to the number of CPUs of the amphora virtual machine;
step S20, after the haproxy process is started, filtering and collecting the statistical data in the socket one by one;
step S30, after data are collected for the socket corresponding to each process, summarizing is carried out, and data of the total new connection number and the maximum new connection number are output;
and step S40, when the data needs to be monitored, reading the latest statistical data from the storage file and returning the latest statistical data to the user.
It should be understood that all the embodiments, features and advantages set forth above for the method for openstack load balancing data monitoring according to the present invention are equally applicable to the system and storage medium for openstack load balancing data monitoring according to the present invention, without conflict therebetween.
In a fourth aspect of the embodiments of the present invention, there is further provided a computer device, including a memory 402 and a processor 401, where the memory stores a computer program, and the computer program, when executed by the processor, implements the method of any one of the above embodiments.
Fig. 4 is a schematic hardware structural diagram of an embodiment of a computer device for executing the openstack load balancing data monitoring method according to the present invention. Taking the computer device shown in fig. 4 as an example, the computer device includes a processor 401 and a memory 402, and may further include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected by a bus or other means, and fig. 4 illustrates an example of a connection by a bus. The input device 403 can receive input numeric or character information and generate key signal inputs related to user settings and function control of the system monitored by openstack load balancing data. The output device 404 may include a display device such as a display screen.
The memory 402 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions/modules corresponding to the method for monitoring openstack load balancing data in the embodiment of the present application. The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by use of the method for openstack load balancing data monitoring, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The processor 401 executes various functional applications and data processing of the server by running the nonvolatile software program, instructions and modules stored in the memory 402, that is, the method for monitoring openstack load balancing data of the above-described method embodiment is implemented.
Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items. The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. An openstack load balancing data monitoring method is characterized by comprising the following steps:
establishing an amphora virtual machine, and configuring the number of multi-queue, the number of haproxy processes and the counted number of sockets for a network card of the virtual machine according to the number of CPUs of the amphora virtual machine;
after starting a haproxy process, filtering and collecting the statistical data in the socket one by one;
after data are collected for the socket corresponding to each process, summarizing is carried out, and data of the total newly-built connection number and the maximum newly-built connection number are output; and
and when the data needs to be monitored, reading the latest statistical data from the storage file and returning the latest statistical data to the user.
2. The method of claim 1, wherein the instruction to create the amphora virtual machine is issued via an openstack operating interface.
3. The method of claim 1, wherein the number of multi-queues, the number of haproxy processes, and the number of statistical sockets are equal.
4. The method according to claim 1, wherein the specific method for collecting the statistical data in the socket is to filter and redirect the statistical data in the socket by using a socket command and a grep command.
5. The method of claim 1,
when data needs to be monitored, load balancing statistical data is obtained through a URL interface, parameters are added in the URL to obtain target data, the octavia receives a URL request and analyzes the requested data field,
whether the socket file exists or not and whether the statistic data exist or not are checked, and when no socket file exists or no statistic data exist, no available data are returned; when the socket file exists and the statistical data exists, the data acquisition and interception processing is carried out on each socket according to the query field,
and accumulating the collected data to obtain a total value, and returning the total value together with the data assembly of the single process.
6. The method of claim 5, wherein the parameters comprise:
and (3) Rate: the number of newly-built connections of each process and the number of newly-built connections of all processes at present, namely the number of newly-built connections in the past one second;
rmax: counting the maximum newly-built connection number and the total maximum connection number in the history by each process;
bin, Bout: total number of incoming bytes and total number of sent bytes;
scur: current session number, etc., can be referenced to hatop statistics.
7. An openstack load balancing data monitoring system, comprising:
the system comprises a creating module, a processing module and a processing module, wherein the creating module is used for creating an amphora virtual machine and configuring the number of multi-queue, the number of hash processes and the counted number of sockets for a network card of the virtual machine according to the number of CPUs of the amphora virtual machine;
the acquisition module is used for filtering and acquiring the statistical data in the socket one by one after the haproxy process is started;
the output module is used for collecting data after the socket corresponding to each process collects the data and outputting the data of the total newly-built connection number and the maximum newly-built connection number; and
and the reading module is used for reading the latest statistical data from the storage file and returning the latest statistical data to the user when the data needs to be monitored.
8. The system of claim 7, wherein the reading module obtains the load balancing statistical data through the URL interface when the data needs to be monitored, adds parameters to the URL to obtain the target data, and the octavia parses the requested data field after receiving the URL request,
whether the socket file exists or not and whether the statistic data exist or not are checked, and when no socket file exists or no statistic data exist, no available data are returned; when the socket file exists and the statistical data exists, the data acquisition and interception processing is carried out on each socket according to the query field,
and accumulating the collected data to obtain a total value, and returning the total value together with the data assembly of the single process.
9. A computer-readable storage medium, characterized in that computer program instructions are stored which, when executed, implement the method according to any one of claims 1-6.
10. A computer device comprising a memory and a processor, characterized in that the memory has stored therein a computer program which, when executed by the processor, performs the method according to any one of claims 1-6.
CN202111175169.7A 2021-10-09 2021-10-09 Openstack load balancing data monitoring method, system, storage medium and equipment Pending CN113986653A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111175169.7A CN113986653A (en) 2021-10-09 2021-10-09 Openstack load balancing data monitoring method, system, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111175169.7A CN113986653A (en) 2021-10-09 2021-10-09 Openstack load balancing data monitoring method, system, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN113986653A true CN113986653A (en) 2022-01-28

Family

ID=79737844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111175169.7A Pending CN113986653A (en) 2021-10-09 2021-10-09 Openstack load balancing data monitoring method, system, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN113986653A (en)

Similar Documents

Publication Publication Date Title
WO2021203623A1 (en) Internet-of-things resource access system and resource access method
CN103609071B (en) Systems and methods for tracking application layer flow via a multi-connection intermediary device
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
WO2020135575A1 (en) System and method for obtaining network topology, and server
US9112894B2 (en) Real time distributed network monitoring and security monitoring platform (RTD-NMS)
CN108471366A (en) A kind of stereoscopic monitoring system of facing cloud native applications
CN108900374B (en) Data processing method and device applied to DPI equipment
US7761609B1 (en) Socket level packet scheduling for connectionless protocols
CN108696452B (en) Container-level network traffic acquisition and network quality identification method, device and system
CN109960634B (en) Application program monitoring method, device and system
CN107634848A (en) A kind of system and method for collection analysis network equipment information
US20080162690A1 (en) Application Management System
CN112350854B (en) Flow fault positioning method, device, equipment and storage medium
WO2014177023A1 (en) Method and device for determining service type
WO2023123956A1 (en) Io full-lifecycle latency monitoring method and related apparatus
CN111147403A (en) Message processing method and device, storage medium and electronic device
CN115002186A (en) Network information acquisition method and device, electronic equipment and readable storage medium
CN111147323A (en) Speed measuring method and device
CN110708209B (en) Virtual machine flow acquisition method and device, electronic equipment and storage medium
CN107426012B (en) Fault recovery method and device based on super-fusion architecture
CN113986653A (en) Openstack load balancing data monitoring method, system, storage medium and equipment
CN111464629B (en) Hot spot data determination method and device
WO2023278574A1 (en) Streaming analytics using a serverless compute system
CN111083215B (en) Session information synchronization method, device, equipment, system and storage medium
KR102082484B1 (en) Apparatus for transmitting and receiving data

Legal Events

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