Object storage index monitoring method and device, equipment and medium
By using the combination of count controller and Prometheus platform in object storage, the problem of lack of alarm function in object storage architecture is solved, timely monitoring and notification of faults is achieved, and the scope of impact of faults is reduced.
Patent Information
- Application Number
- CN202411049414.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-29
AI Technical Summary
The existing object storage architecture lacks the ability to visualize indicators and alarm functions, which makes it difficult for operation and maintenance personnel to perceive system errors, evaluate the scope of the failure impact, and locate the source of the error.
Through the count controller, count relevant indicators when a preset error category occurs in the object storage, and use the Prometheus platform to read indicators according to time intervals, determine the monitoring status and alarm, decouple the indicator functions and services, and realize the alarm rules Automatic notification.
It realizes timely monitoring and alarming of object storage failures, reduces the scope of the failure impact, and improves the response capabilities of operation and maintenance personnel.
Smart Images

Figure CN119046035A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an object storage indicator monitoring method, device, equipment and medium. Background Art
[0002] Object storage is a storage method that uses objects as the basic storage unit. It uses the object's unique identifier as an index and stores the object as a whole. An object can be composed of multiple files or a complex data structure containing multiple data types. Object storage has been widely used due to its scalability and reliability.
[0003] Existing object storage architectures generally lack indicator visualization capabilities and alarm functions. Object storage operation and maintenance personnel are unable to perceive occasional errors that occur in the above systems. Even when customers report that the service is occasionally unavailable, they are unable to grasp the overall operating status of the service, and are unable to promptly assess the impact of the failure, as well as the links and locations of the system where occasional errors occur. Summary of the invention
[0004] Based on the above problems in the prior art, embodiments of the present invention provide an object storage indicator monitoring method, apparatus, device and medium.
[0005] According to one aspect of the present invention, a method for monitoring object storage indicators is provided, comprising:
[0006] When an error of a preset error category occurs in the object storage, the object storage indicator of the error category is counted through the set counting controller;
[0007] Reading the object storage indicator according to a preset time interval through the Prometheus platform, and determining the monitoring status of the storage indicator according to the object storage indicator;
[0008] An alarm is issued according to the monitoring status.
[0009] Optionally, the counting controller comprises a first counter, a second counter and a counter flag, wherein only one of the first counter and the second counter is in an operating state at the same time, and the other is in a non-operating state; when the counter flag is in a positive state, the first counter is in an operating state, and the second counter is in a non-operating state; when the counter flag is in a negative state, the second counter is in an operating state, and the first counter is in a non-operating state; the counter flag is switched between a positive state and a negative state by inversion;
[0010] The object storage index includes an error category of the number of unreachable times that characterizes the data pool of the object storage is unreachable and an error category of the number of abnormal times that characterizes the authentication module of the object storage is abnormal.
[0011] Optionally, when an error of a preset error category occurs in the object storage, counting the object storage indicators of the error category by using a set counting controller includes:
[0012] When the data pool of the object storage is unreachable, the first counter or the second counter in the running state accumulates the object storage index of the number of unreachable times by 1;
[0013] When the authentication module of the object storage malfunctions, the first counter or the second counter in operation adds 1 to the object storage index of the malfunction times.
[0014] Optionally, the counting controller further includes: a counter read-write lock; accordingly, the method further includes:
[0015] Before the first counter or the second counter performs accumulation, the write lock of the counter read-write lock is competed, and the write lock of the counter read-write lock is released after the accumulation is performed;
[0016] When the Prometheus platform reads the object storage indicator, it competes for the read lock of the counter read-write lock. After reading the object storage indicator, the Prometheus platform releases the read lock of the counter read-write lock and inverts the counter flag bit.
[0017] Optionally, determining the monitoring status of the storage indicator according to the object storage indicator includes:
[0018] Obtaining a first state value and a second state value based on a first accumulated value of the object storage index of the unreachable number of times and a second accumulated value of the object storage index of the abnormal number of times, respectively;
[0019] According to a preset correspondence between a state value and a monitoring state, a first monitoring state and a second monitoring state corresponding to the first accumulated value and the second accumulated value are determined respectively.
[0020] Optionally, the first accumulated value of the object storage indicator based on the number of unreachable times and the second accumulated value of the object storage indicator based on the number of abnormal times respectively obtain a first state value and a second state value, including:
[0021] Determine a first numerical interval and a second numerical interval to which the first accumulated value and the second accumulated value belong respectively;
[0022] The first state value and the second state value are determined according to a correspondence between a preset numerical range and an accumulated value.
[0023] Optionally, the issuing of an alarm according to the monitoring status includes:
[0024] Determine, according to a preset correspondence between states and accumulated values, a first state and a second state corresponding to the first accumulated value and the second accumulated value, respectively;
[0025] Warning information is generated based on the first fault level and the second fault level.
[0026] According to another aspect of the present invention, there is provided an object storage indicator monitoring device, comprising:
[0027] A counting unit, used for counting the object storage index of a preset error category through a set counting controller when an error of a preset error category occurs in the object storage;
[0028] A determination unit, configured to read the object storage indicator according to a preset time interval through the Prometheus platform, and determine the state of the storage indicator according to the object storage indicator;
[0029] An alarm unit is used to issue an alarm according to the status of each storage indicator.
[0030] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the object storage indicator monitoring method described in any embodiment of the present invention.
[0031] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the object storage indicator monitoring method described in any embodiment of the present invention when executed.
[0032] The embodiments of the present invention provide an object storage indicator monitoring method, device, equipment and medium. Through a set counting controller, when an error of a preset error category occurs in the object storage, the object storage indicator of the error category is counted; the object storage indicator is read according to a preset time interval through the Prometheus platform, and the monitoring status of the storage indicator is determined according to the object storage indicator; and an alarm is issued according to the monitoring status. The solution of the embodiment of the present invention decouples the indicator function and the object storage business through the counting controller, and the alarm rules configured in Prometheus can issue an alarm according to the monitoring status, notify the operation and maintenance personnel to intervene in time, and reduce the impact of the system failure.
[0033] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 It is a flow chart of a method for monitoring object storage indicators provided by an embodiment of the present invention;
[0036] Figure 2 This is a visualization architecture diagram of an object storage indicator provided by an embodiment of the present invention;
[0037] Figure 3 It is a structural diagram of an object storage indicator monitoring device provided by an embodiment of the present invention;
[0038] Figure 4 It is a structural schematic diagram of an electronic device for implementing the object storage indicator monitoring method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0041] Figure 1 is a flow chart of an object storage indicator monitoring method provided by an embodiment of the present invention. Figure 1 As shown, the method includes:
[0042] S110. When an error of a preset error category occurs in the object storage, the object storage index of the error category is counted by a preset counting controller.
[0043] In an embodiment of the present invention, the counting controller includes a first counter, a second counter and a counter flag bit, wherein only one of the first counter and the second counter is in a running state at the same time, and the other is in a non-running state, when the counter flag bit is in a positive state, the first counter is in a running state, and the second counter is in a non-running state; when the counter flag bit is in a negative state, the second counter is in a running state, and the first counter is in a non-running state; the counter flag is switched between a positive state and a negative state by inversion;
[0044] The object storage index includes an error category of the number of unreachable times that characterizes the data pool of the object storage is unreachable and an error category of the number of abnormal times that characterizes the authentication module of the object storage is abnormal.
[0045] The counter controller is designed to decouple the indicator function from the business of object storage. The counter controller records the number of times the data pool is unreachable and the number of times the authentication module fails in real time. The counter controller contains two sub-counters, a positive sub-counter (first counter) and a negative sub-counter (second counter), and a sub-counter flag. The positive sub-counter and the negative sub-counter have the same counting function and can record the number of times the data pool is unreachable and the number of times the authentication module fails in real time. At any time, only one of the two sub-counters is in operation and the other is in non-operation.
[0046] In the embodiment of the present invention, when an error of a preset error category occurs in the object storage, the object storage index of the error category is counted by the set counting controller, including:
[0047] When the data pool of the object storage is unreachable, the first counter or the second counter in the running state accumulates the object storage index of the number of unreachable times by 1;
[0048] When the authentication module of the object storage malfunctions, the first counter or the second counter in operation adds 1 to the object storage index of the malfunction times.
[0049] When the data pool access is unreachable, the sub-counter in the running state will add 1 to the number of unreachable data pools and record the name of the data pool where the unreachable data pool occurs. Generally, data pools are divided into standard data pools, low-frequency data pools and archived data pools, so recording the data pool name is important for the analysis of subsequent indicators. When the authentication module fails, the sub-counter in the running state will add 1 to the number of abnormal authentication module failures and record the remote authentication service address linked to the authentication module. The remote authentication service linked to the authentication module generally includes identity and access management service (IAM), Keystone (OpenStack ldentityService) and Keycloak, so recording the remote authentication service address is important for the analysis of subsequent indicators.
[0050] The sub-counter flag bit controls the sub-counter in the running state in real time. The sub-counter flag bit has only two states: positive state and negative state. When the sub-counter flag bit is in the positive state, the positive-sub-counter is in the running state, and the negative-sub-counter is in the non-running state. When the sub-counter flag bit is in the negative state, the negative-sub-counter is in the running state, and the positive-sub-counter is in the non-running state.
[0051] In an embodiment of the present invention, the counting controller further includes: a counter read-write lock; accordingly, the method further includes:
[0052] Before the first counter or the second counter performs accumulation, the write lock of the counter read-write lock is competed, and the write lock of the counter read-write lock is released after the accumulation is performed;
[0053] When the Prometheus platform reads the object storage indicator, it competes for the read lock of the counter read-write lock. After reading the object storage indicator, the Prometheus platform releases the read lock of the counter read-write lock and inverts the counter flag bit.
[0054] The counter read-write lock takes effect when the number of unreachable times of the data pool and the number of abnormal times of the authentication module in the sub-counter is read and written. Specifically, before the number of unreachable times of the data pool and the number of abnormal times of the authentication module are accumulated, the counter read-write lock is competed for, and the write lock of the counter read-write lock is released after the accumulation is executed; when Prometheus reads the data pool access status indicator and the authentication module operation status indicator, it competes for the read lock of the counter read-write lock, and releases the read lock of the counter read-write lock after obtaining the indicator. In particular, after the object storage completes the Prometheus reading indicator request, it reverses the sub-counter flag bit of the counter controller. When performing the reversal operation, there is no competition for the write lock of the counter read-write lock, because the reversal operation only occurs after the Prometheus reading indicator request, and Prometheus reads the indicator every 3 minutes, so there is no scenario where multiple reversal operations are performed at the same time, and the reversal operation is a lock-free operation. The above lock-free reversal operation completely decouples the indicator function and the user business, and realizes that the indicator function and the object storage business do not affect each other.
[0055] After the object storage completes the Prometheus read index request, it reverses the sub-counter flag of the counter controller. When the sub-counter flag is currently in a positive state, the sub-counter flag is set to a negative state; when the sub-counter flag is currently in a negative state, the sub-counter flag is set to a positive state. Then the sub-counters that were originally in the running state are cleared and stopped, and the other group of sub-counters enter the running state.
[0056] S120. Read the object storage indicator according to a preset time interval through the Prometheus platform, and determine the monitoring status of the storage indicator according to the object storage indicator.
[0057] Prometheus is often used as a cloud-native monitoring platform. It supports collecting and processing indicator data from infrastructure or application components to monitor the operating status of services. Through the integration of Prometheus and message middleware, front-end visualization of service indicators as well as alarm and notification functions can be achieved, enriching the cloud-native ecosystem.
[0058] In an embodiment of the present invention, determining the monitoring status of the storage indicator according to the object storage indicator includes:
[0059] Obtaining a first state value and a second state value based on a first accumulated value of the object storage index of the unreachable number of times and a second accumulated value of the object storage index of the abnormal number of times, respectively;
[0060] According to a preset correspondence between a state value and a monitoring state, a first monitoring state and a second monitoring state corresponding to the first accumulated value and the second accumulated value are determined respectively.
[0061] In the embodiment of the present invention, the first accumulated value of the object storage indicator based on the unreachable number of times and the second accumulated value of the object storage indicator based on the abnormal number of times obtain the first state value and the second state value respectively, including:
[0062] Determine a first numerical interval and a second numerical interval to which the first accumulated value and the second accumulated value belong respectively;
[0063] The first state value and the second state value are determined according to a correspondence between a preset numerical range and an accumulated value.
[0064] After receiving the data pool access situation indicator and the authentication module operation status indicator, Prometheus stores the indicators, uses the time point as the horizontal axis, and uses the status value in the data pool access situation indicator and the authentication module operation status indicator as the vertical axis, and displays the data pool access situation indicator and the authentication module operation status indicator on the front-end interface. Specifically, when the number of data pool unreachable times is greater than 0 and less than 20, the status value of the data pool access situation indicator is 1; when the number of data pool unreachable times is greater than or equal to 20 and less than 200, the status value of the data pool access situation indicator is 2; when the number of data pool unreachable times is greater than or equal to 200, the status value of the data pool access situation indicator is 3. Similarly, when the number of authentication module failures is greater than 0 and less than 20, the status value of the authentication module operation status indicator is 1; when the number of authentication module failures is greater than or equal to 20 and less than 200, the status value of the authentication module operation status indicator is 2; when the number of authentication module failures is greater than or equal to 200, the status value of the authentication module operation status indicator is 3. The value indicates that a status value of 1 indicates a minor fault, which is within an acceptable range and needs to be prevented from spreading. A status value of 2 indicates a moderate fault, which requires timely processing by the operation and maintenance personnel to restore the fault. A status value of 3 indicates a severe fault, at which the system availability is extremely poor and a comprehensive inspection of the fault is required to prevent the recurrence of such faults. In the above design, the time point is used as the horizontal axis to facilitate the operation and maintenance personnel to check the operation status of the object storage service within the specified time period. Because Prometheus collects data pool access status indicators and authentication module operation status indicators every 3 minutes, it is impossible to provide an indicator change trend chart with a time granularity of less than 3 minutes. Only indicator change trend charts with a time granularity of 3 minutes or more within the specified time period can be checked. The trend chart is attached with the name of the unreachable data pool at the corresponding time point, or the remote authentication service address of the authentication module link with an abnormality.
[0065] S130: Issue an alarm according to the monitoring status.
[0066] In the embodiment of the present invention, the issuing of an alarm according to the monitoring status includes:
[0067] Determine, according to a preset correspondence between states and accumulated values, a first state and a second state corresponding to the first accumulated value and the second accumulated value, respectively;
[0068] Warning information is generated based on the first fault level and the second fault level.
[0069] Configure the alarm rules in Prometheus. When the status values of the data pool access status indicator and the authentication module operation status indicator exceed the threshold, send an alarm event to the message middleware, and notify the object storage operation and maintenance personnel by phone through the event notification component. Generally, when the status values of the data pool access status indicator and the authentication module operation status indicator are greater than or equal to 2, an alarm message is sent to the operation and maintenance personnel.
[0070] Figure 2 is a visualization architecture diagram of an object storage indicator provided by an embodiment of the present invention, such as Figure 2 As shown, the present invention realizes the visualization of object storage indicators, and records the number of times the data pool is unreachable and the number of times the authentication module fails in real time, as well as the name of the unreachable data pool and the remote authentication service address of the fault through the counting controller, and organizes the above data into data pool access status indicators and authentication module operation status indicators and returns them to Prometheus. If the status value in the indicator exceeds the threshold, Prometheus sends an alarm event to the message middleware, and notifies the object storage operation and maintenance personnel by phone through the event notification component. The counter controller realizes the complete decoupling of the alarm function and the object storage business through the lock-free reversal operation of the sub-counter flag bit, ensuring that the performance of the object storage is not affected by the alarm function. By actively recording the fault and promptly alerting the operation and maintenance personnel through the message middleware and event notification components, the impact of the fault on the object storage business is reduced.
[0071] Figure 3 FIG. 1 is a schematic diagram of a structure of an object storage index monitoring device provided by an embodiment of the present invention. Figure 3 As shown, the device comprises:
[0072] The counting unit 310 is used to count the object storage index of the preset error category when an error of the preset error category occurs in the object storage through a preset counting controller;
[0073] A determination unit 320 is configured to read the object storage indicator according to a preset time interval through the Prometheus platform, and determine the state of the storage indicator according to the object storage indicator;
[0074] The alarm unit 330 is used to generate an alarm according to the status of each storage indicator.
[0075] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the object storage index monitoring device. In other embodiments of the present invention, the object storage index monitoring device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0076] The information interaction, execution process and other contents between the units in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.
[0077] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0078] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0079] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0080] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the object storage indicator monitoring method.
[0081] In some embodiments, the object storage metric monitoring method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the object storage metric monitoring method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the object storage metric monitoring method in any other appropriate manner (e.g., by means of firmware).
[0082] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0083] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0084] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0085] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0086] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0087] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0088] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0089] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. The object storage indicator monitoring method is characterized in that: include: When an error of a preset error category occurs in the object storage, the object storage indicator of the error category is counted through the set counting controller; Reading the object storage indicator according to a preset time interval through the Prometheus platform, and determining the monitoring status of the storage indicator according to the object storage indicator; An alarm is issued according to the monitoring status.
2. The method according to claim 1, characterized in that The counting controller comprises a first counter, a second counter and a counter flag bit, wherein only one of the first counter and the second counter is in a running state at the same time, and the other is in a non-running state, and when the counter flag bit is in a positive state, the first counter is in a running state, and the second counter is in a non-running state; when the counter flag bit is in a negative state, the second counter is in a running state, and the first counter is in a non-running state; The counter flag is switched between a positive state and a negative state by inversion; The object storage index includes an error category of the number of unreachable times that characterizes the data pool of the object storage is unreachable and an error category of the number of abnormal times that characterizes the authentication module of the object storage is abnormal.
3. The method according to claim 2, characterized in that The method of counting the object storage index of a preset error category by the set counting controller when an error of a preset error category occurs in the object storage includes: When the data pool of the object storage is unreachable, the first counter or the second counter in the running state accumulates the object storage index of the number of unreachable times by 1; When the authentication module of the object storage malfunctions, the first counter or the second counter in operation adds 1 to the object storage index of the malfunction times.
4. The method according to claim 3, characterized in that The counting controller further includes: a counter read-write lock; correspondingly, the method further includes: Before the first counter or the second counter performs accumulation, the write lock of the counter read-write lock is competed, and the write lock of the counter read-write lock is released after the accumulation is performed; When the Prometheus platform reads the object storage indicator, it competes for the read lock of the counter read-write lock. After reading the object storage indicator, the Prometheus platform releases the read lock of the counter read-write lock and inverts the counter flag bit.
5. The method according to claim 3, characterized in that: Determining the monitoring status of the storage indicator according to the object storage indicator includes: Obtaining a first state value and a second state value based on a first accumulated value of the object storage index of the unreachable number of times and a second accumulated value of the object storage index of the abnormal number of times, respectively; According to a preset correspondence between a state value and a monitoring state, a first monitoring state and a second monitoring state corresponding to the first accumulated value and the second accumulated value are determined respectively.
6. The method according to claim 1, characterized in that The first accumulated value of the object storage indicator based on the number of unreachable times and the second accumulated value of the object storage indicator based on the number of abnormal times respectively obtain a first state value and a second state value, including: Determine a first numerical interval and a second numerical interval to which the first accumulated value and the second accumulated value belong respectively; The first state value and the second state value are determined according to a correspondence between a preset numerical range and an accumulated value.
7. The method according to claim 5, characterized in that The issuing of an alarm according to the monitoring status includes: Determine, according to a preset correspondence between states and accumulated values, a first state and a second state corresponding to the first accumulated value and the second accumulated value, respectively; Warning information is generated based on the first fault level and the second fault level.
8. The object storage indicator monitoring device is characterized in that: include: A counting unit, used for counting the object storage index of a preset error category through a set counting controller when an error of a preset error category occurs in the object storage; A determination unit, configured to read the object storage indicator according to a preset time interval through the Prometheus platform, and determine the state of the storage indicator according to the object storage indicator; An alarm unit is used to issue an alarm according to the status of each storage indicator.
9. An electronic device, characterized in that include: at least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the object storage indicator monitoring method described in any one of claims 1-7.
10. A computer readable medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the object storage indicator monitoring method according to any one of claims 1 to 7 when executed.
