Alarm processing method, device, equipment, computer program product and medium
By updating the alarm repair marks and time in the storage system, the problem of redundant alarm repair process and inability to view the alarm history is solved, and efficient alarm repair and historical record retention is achieved.
Patent Information
- Application Number
- CN202510260669.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The alarm repair process in existing storage systems is redundant and the alarm history information cannot be viewed.
By receiving the alarm repair request sent by the service module, find the first target alarm and update its repair mark and time, and then find the second target alarm and update its repair mark and time, ensuring that the associated alarms are all repaired in one repair process.
The alarm process has been optimized, the problem of redundancy of the alarm repair process has been solved, the efficiency of alarm repair is improved, and the alarm historical information has been retained.
Smart Images

Figure CN119759709A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to an alarm processing method, device, equipment, computer program product and medium. Background Art
[0002] During the operation of the storage system, objects such as disk arrays and volumes in the storage system will inevitably fail. When a failure occurs, the user or administrator needs to be notified as soon as possible to handle it, so an alarm mechanism is introduced in the relevant technology. After various objects in the storage system fail, the failure is reported to remind the user or administrator to repair the failure in time. Although the relevant technology implements reporting an alarm after a failure occurs, clearing the alarm and releasing the alarm resources after the failure is repaired, the alarm mechanism of the relevant technology is not flexible, resulting in redundant alarm repair processes, and the alarm history information cannot be viewed after the alarm resources are released. Therefore, how to solve the above-mentioned technical defects has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0003] The present application provides an alarm processing method, apparatus, device, computer program product and medium to at least solve the problems of redundant alarm repair processes and inability to view alarm history in related technologies.
[0004] The present application provides an alarm processing method, including:
[0005] Receive alarm repair requests sent by the business module;
[0006] According to the alarm repair request, searching for a first target alarm; the first target alarm refers to the alarm to be repaired specified by the alarm repair request;
[0007] Setting the repair mark corresponding to the first target alarm to a first mark, and updating the repair time of the first target alarm; the first mark is used to indicate that the alarm has been repaired;
[0008] Searching for a second target alarm; the first target alarm is a necessary condition for generating the second target alarm;
[0009] The repair mark corresponding to the second target alarm is set to the first mark, and the repair time of the second target alarm is updated.
[0010] The present application also provides an alarm processing device, comprising:
[0011] A receiving unit, used for receiving an alarm repair request sent by a business module;
[0012] A first search unit is used to search for a first target alarm according to the alarm repair request; the first target alarm refers to the alarm to be repaired specified by the alarm repair request;
[0013] a first repair unit, configured to set a repair mark corresponding to the first target alarm to a first mark, and update a repair time of the first target alarm; the first mark is used to indicate that the alarm has been repaired;
[0014] A second search unit is used to search for a second target alarm; the first target alarm is a necessary condition for generating the second target alarm;
[0015] The second repair unit is used to set the repair mark corresponding to the second target alarm to the first mark, and update the repair time of the second target alarm.
[0016] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned alarm processing methods when executing the computer program.
[0017] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned alarm processing methods are implemented.
[0018] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned alarm processing methods when executed by a processor.
[0019] The beneficial effects are as follows: the first target alarm is a necessary condition for generating the second target alarm, indicating that the first target alarm is associated with the second target alarm. During the alarm repair process, in addition to updating the repair mark and repair time of the alarm specified by the alarm repair request, i.e., the first target alarm, the application also updates the repair mark and repair time of the second target alarm associated with this alarm, thereby achieving the repair of all associated alarms in one repair process, optimizing the alarm process, solving the technical problem of redundancy in the alarm repair process, and achieving the technical effect of improving the efficiency of alarm repair. Moreover, during the alarm repair process, the operation performed by the application is to update the repair mark and repair time without clearing the alarm information, so as to ensure that the alarm history can be viewed. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A flowchart of an alarm processing method provided in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of an alarm architecture provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of another alarm architecture provided in an embodiment of the present application;
[0024] Figure 4 A schematic diagram of filling in description information provided in an embodiment of the present application;
[0025] Figure 5 A schematic diagram of filling alarm information provided in an embodiment of the present application;
[0026] Figure 6 A schematic diagram of a process for searching a target alarm body provided in an embodiment of the present application;
[0027] Figure 7 A schematic diagram of another process for searching a target alarm body provided in an embodiment of the present application;
[0028] Figure 8 A schematic diagram of another alarm architecture provided in an embodiment of the present application;
[0029] Fig. 9 A schematic diagram of an alarm processing device provided in an embodiment of the present application;
[0030] Fig.10 A schematic diagram of an electronic device provided for an application embodiment. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0032] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0033] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0034] An embodiment of the present application provides an alarm processing method, and the method is described in detail in conjunction with the execution flow of the alarm processing method.
[0035] refer to Figure 1 As shown, the alarm processing method provided by the embodiment of the present application includes:
[0036] S101: Receive an alarm repair request sent by a business module.
[0037] S102: According to the alarm repair request, search for a first target alarm; the first target alarm refers to the alarm to be repaired specified by the alarm repair request; the alarm body is used to record alarm information.
[0038] S103: Set the repair mark of the first target alarm to the first mark, and update the repair time of the first target alarm; the first mark is used to indicate that the alarm has been repaired.
[0039] The execution subject of the alarm processing method provided in this embodiment is the alarm management module. The alarm processing method provided in this embodiment can be applied to storage systems and other systems. When applied to a storage system, during the operation of the storage system, when a certain fault is repaired, the storage system automatically initiates the alarm repair related to the fault. Figure 2 As shown, when a certain fault is repaired, the business module sends an alarm repair request to the alarm management module. The alarm management module searches for the first target alarm according to the alarm repair request. The repair mark of the first target alarm is set to the first mark, and the repair time of the first target alarm is updated; the first target alarm is the alarm to be repaired specified by the alarm repair request, and the alarm to be repaired is the alarm corresponding to the repaired fault. Among them, the alarm repair request sent by the business module may carry relevant information that can specify the alarm to be repaired. For example, the alarm repair request sent by the business module may carry an alarm identifier. The alarm identifier is a unique identifier for the alarm. For example, the alarm identifier is an alarm ID (Identity document).
[0040] The number of alarms to be repaired, i.e., the first target alarms, specified in the alarm repair request may be one or more. The business module may send only one alarm repair request specifying one alarm to be repaired to the alarm processing module at a time. The business module may also send more than one alarm repair request specifying more than one alarm to be repaired to the alarm processing module at a time. When the alarm repair request specifies more than one alarm to be repaired, the alarm processing module sets the repair mark of each alarm to be repaired, i.e., the first target alarm, to the first mark, and updates the repair time of each first target alarm.
[0041] Figure 2The alarm management module and the business module can correspond one to one, that is, each business module can correspond to one alarm management module. In the alarm reporting process, the business module sends an alarm reporting request to the corresponding alarm management module. In the alarm repair process, the business module sends an alarm repair request to the corresponding alarm management module.
[0042] It should be noted that, in addition to Figure 2 In addition to the embodiment in which the alarm management module corresponds to the service module one by one, the relationship between the alarm management module and the service module can also be one-to-many, that is, multiple service modules correspond to the same alarm management module. Figure 3 As shown, each business module corresponds to the same alarm management module. Any business module can send an alarm reporting request to the alarm management module, and can also send an alarm repair request to the alarm management module.
[0043] In some embodiments, searching for the first target alert includes:
[0044] Search for an alarm whose alarm ID is the same as the alarm ID carried in the alarm repair request.
[0045] The alarm management module traverses all alarm bodies in the alarm library. The alarm body is used to record the alarm information of the alarm. The alarm library is an array of fixed length, and the elements of the array are the alarm bodies. The alarm library is an array of fixed length, and the alarm body is the element of the array, so the number of alarm bodies is limited. By limiting the number of alarm bodies, excessive use of alarm resources can be avoided.
[0046] The alarm information recorded in the alarm database may include alarm identifier, repair time, repair mark, etc. The alarm management module compares the alarm identifier of the unrepaired alarm in the alarm database with the alarm identifier carried by the alarm repair request. If the alarm identifier of an unrepaired alarm is the same as the alarm identifier carried by the alarm repair request, the unrepaired alarm is the first target alarm.
[0047] The alarm management module sets the repair mark of the first target alarm found to the first mark, and updates the repair time of the first target alarm. The first mark indicates that the alarm has been repaired. The alarm whose repair mark is the first mark is a repaired alarm, and the alarm whose repair mark is the second mark is an unrepaired alarm. The second mark is used to indicate that the alarm is unrepaired. For example, the first mark is true, and the second mark is false. After the alarm management module finds the first target alarm, the alarm management module sets the repair mark of the first target alarm found from false to true.
[0048] S104: Search for the second target alarm; the first target alarm is a necessary condition for generating the second target alarm.
[0049] S105: Set the repair mark corresponding to the second target alarm to the first mark, and update the repair time of the second target alarm.
[0050] In addition to searching for the first target alarm, the alarm management module also searches for the second target alarm, sets the repair mark of the second target alarm to the first mark, and updates the repair time of the second target alarm. The relationship between the first target alarm and the second target alarm is: the first target alarm is a necessary condition for generating the second target alarm. For example, alarm A is a necessary condition for the generation of alarm B. Alarm A is called the root alarm of alarm B. In the alarm repair process, in addition to searching for alarm A, alarm B is also searched, the repair mark of alarm A is set to the first mark, and the repair time of alarm A is updated. The repair mark of alarm B is set to the first mark, and the repair time of alarm B is updated.
[0051] It is clear that not every alarm is the root alarm of other alarms. For alarms that are not the root alarms of other alarms, only the alarm can be found in the alarm repair process, and other alarms that have the alarm as the root alarm will not be found. In addition, the number of second target alarms may be one or more. If the number of alarms with the first target alarm as the root alarm may be one or more. For example, alarm A is the first target alarm, and the alarm with alarm A as the root alarm is alarm B, then the number of second target alarms is one. Alarm A is the first target alarm, and the alarms with alarm A as the root alarm include alarm B and alarm C, then the number of second target alarms is two.
[0052] In some embodiments, searching for the second target alert includes:
[0053] Search for the alarm with the alarm ID of the first target alarm as the root alarm ID.
[0054] The alarm management module traverses all alarm bodies in the alarm library and compares the root alarm identifier of the unrepaired alarm with the alarm identifier carried by the alarm repair request. If the root alarm identifier of an unrepaired alarm is the same as the alarm identifier carried by the alarm repair request, then the unrepaired alarm is the second target alarm.
[0055] For example, the alarm identifier carried by the alarm repair request is the alarm identifier of alarm A, and the unrepaired alarm with the alarm identifier of alarm A as the root alarm identifier is alarm B, then alarm B is the second target alarm.
[0056] In some embodiments, it also includes:
[0057] Notify the business module of the repaired first target alarm and second target alarm so that the business module paying attention to the first target alarm and the second target alarm can clean up the corresponding alarm information in this module and check whether it is necessary to report the alarm again.
[0058] This embodiment divides the alarm repair into two stages: the repair performed by the alarm management module and the repair performed by the business module. The repair performed by the alarm management module includes the alarm management module updating the repair mark and repair time of the alarm that needs to be repaired. The repair performed by the business module includes the business module clearing the corresponding alarm information in this module and checking whether the alarm needs to be re-reported. Dividing the alarm repair into two stages: the repair performed by the alarm management module and the repair performed by the business module facilitates the management of both the alarm management module and the business module.
[0059] The alarm management module executes steps S103 and S105 to complete the alarm repair. This alarm repair completes the update of the repair mark and the repair time. Further, in this embodiment, the business module performs alarm processing. Specifically, the alarm management module notifies the business module of the repaired alarm. The business module can determine whether the repaired alarm is an alarm of concern to this business module based on the error code of the alarm. If so, the business module cleans up the residual information of the repaired alarm in this business module, such as the alarm identifier. In addition, the business module checks whether it is necessary to re-initiate the alarm report. The situation of re-initiating the alarm report generally occurs in the scenario where the user actively repairs the alarm, but the fault corresponding to the alarm has not actually been repaired.
[0060] For example, the alarm management module notifies all business modules that alarm A has been repaired, and alarm A is an alarm that business module 1 is concerned about, so business module 1 clears the residual information of alarm A in business module 1. If business module 1 finds that fault A corresponding to alarm A is not actually repaired, business module A re-initiates the alarm report for fault A.
[0061] In some embodiments, it also includes:
[0062] Receive alarm reporting requests sent by the business module;
[0063] According to the alarm reporting request, the corresponding alarm information is filled into the alarm body; the alarm body is used to record the alarm information.
[0064] During the operation of the storage system, when a certain fault is found, the business module sends an alarm reporting request to the alarm management module so that the alarm management module can report the alarm. Alarm reporting means recording the alarm information into the alarm body. The alarm reporting request sent by the business module to the alarm management module can carry alarm information such as alarm code and object type. The business module records the alarm information such as alarm ID and alarm code into the alarm body.
[0065] The number of alarms to be reported, i.e., new alarms, specified in the alarm repair request may be one or more. The business module may only send one new alarm reporting request to the alarm processing module at a time. The business module may also send more than one new alarm repair request to the alarm processing module at a time.
[0066] In some embodiments, according to the alarm reporting request, filling the corresponding alarm information into the alarm body includes:
[0067] According to the alarm reporting request, the alarm ID, alarm code, alarm level, reporting time, object type, object index, root alarm ID, repair mark, repair time, and description information are filled into the alarm body.
[0068] In this embodiment, the alarm information filled into the alarm body includes alarm ID, alarm code, alarm level, reporting time, object type, object index, root alarm ID, repair mark, repair time, and description information, which can help users understand the alarm details.
[0069] The alarm identifier may be an alarm id, and the root alarm identifier may be a root alarm id. As shown in Table 1, the alarm body includes the following information: alarm, alarm code, alarm level, reporting time, object type, object index, root alarm id, repair mark, repair time, and description information. The alarm id is the unique identifier of the alarm, and each newly generated alarm will be assigned an id incrementally. The alarm code indicates the error code corresponding to the alarm, and each error code indicates a specific warning meaning. The alarm level may include config (configuration change), information (active notification), warning (general warning), and error (serious error), and the severity increases from configuration change to serious error. The reporting time is the reporting time of the alarm, which can be the time when the alarm management module receives the alarm reporting request. The object type indicates the type of the object reporting the alarm. For a storage system, the object may be an IO card, a hard disk, a volume, a controller, a cluster, etc. The object index indicates the index of the object reporting the alarm, for example, when the object is a hard disk, it indicates the number of the hard disk. The root alarm id is the alarm id of the root alarm of the alarm. For example, if alarm A is a necessary condition for the generation of alarm B, then alarm A is the root alarm of alarm B, and the root alarm id of alarm B is the alarm id of alarm A. The repair mark indicates whether the alarm has been repaired, and its possible values are true and false. True means repaired, and false means not repaired. The repair time is the repair time of the alarm, which can be the time when the alarm management module sets the repair mark to the first mark. The description information is the custom information presented by the alarm. For example, when the object of the alarm is an IO card, the description information can show which port of the IO card has failed, which is to facilitate users to further understand the alarm.
[0070] The alarm code, object type, object index, root alarm id and description information are provided by the business module. The alarm reporting request sent by the business module can carry the alarm code, object type, object index, root alarm id and description information. The alarm id, reporting time, repair time and repair mark are determined by the alarm management module.
[0071] In addition, when filling the alarm body, the "description information" attribute of the alarm body needs to be processed separately. Figure 4 As shown, the description information is essentially a memory buffer. Different alarms can customize their filling methods to fill the description information. Later, in the alarm display stage, reverse parsing is performed based on the filling method and then displayed. Through the description information, support for customized alarm filling and parsing can be achieved, and alarm information can be flexibly presented.
[0072] For example, for a hard disk temperature alarm, the corresponding description information can be filled in as follows: hard disk ID (number) + hard disk type + hard disk temperature (number). This filling method was fixed during the development phase. When displaying the alarm, the filled content is taken from the front to the back three times, and then parsed into hard disk ID, hard disk type, and hard disk temperature.
[0073] For example, if an FC card fails and an alarm is reported, the corresponding description information alarm filling method can be: FC card position (a mask number) + fault description (string). When the alarm is displayed, it is parsed and displayed according to the filling method.
[0074] Table 1
[0075]
[0076] refer to Figure 5 As shown, in some embodiments, according to the alarm reporting request, filling the corresponding alarm information into the alarm body includes:
[0077] S201: Determine whether the alarm information can be merged with the alarm information in the used alarm body;
[0078] S202: If yes, merging the alarm information with the alarm information in the used alarm body;
[0079] S203: If not, search for the target alarm body and fill the alarm information into the target alarm body.
[0080] This embodiment preferentially adopts a merging strategy to fill the alarm body, which can maximize the use of alarm resources.
[0081] When the alarm processing module reports an alarm, it first needs to apply for an alarm body for the new alarm from the alarm library, and then fill the alarm information of the new alarm into the applied alarm body. This embodiment preferentially adopts the merge strategy to fill the alarm information. Specifically, the alarm management module traverses the alarm library to check whether the new alarm can be merged into the existing alarm, that is, to check whether the alarm information of the new alarm can be merged with the alarm information in the used alarm body. The premise for merging is that the alarm code of the new alarm is the same as the alarm code in the used alarm body. If it can be merged, the alarm information of the new alarm is merged with the alarm information in the used alarm body. Among them, if it can be merged, the alarm management module will not assign a new alarm identifier to the new alarm, but will continue to use the alarm identifier of the original alarm merged with it. When merging, the alarm information of the new alarm is filled into the used alarm body. Update the reporting time when merging. If the combination is not possible, the target alarm body is searched from the alarm database, and the alarm information of the new alarm is filled into the target alarm body. The target alarm body is an alarm body that cannot be combined with the alarm information of the new alarm and is used to fill the alarm signal of the new alarm.
[0082] In some embodiments, determining whether the warning information can be merged with the warning information in the used warning body includes:
[0083] Determine whether the alarm code, root alarm identifier, object type, and object index in the alarm information correspond to the alarm code, root alarm identifier, object type, and object index in the used alarm body;
[0084] If so, it is determined that the alarm information can be merged with the alarm information in the used alarm body.
[0085] If the alarm code, root alarm identifier, object type and object index in a used alarm body are the same as those in a new alarm, the alarm information of the new alarm can be merged with the alarm information in the used alarm body. If the alarm code, root alarm identifier, object type and object index in a used alarm body are the same as those in a new alarm, it indicates that the new alarm is a re-reported alarm due to the same fault.
[0086] For example, the alarm code of the new alarm is 00A1, the root alarm identifier is 001, the object type is hard disk, and the object index is the third hard disk. The alarm code in the used alarm body 3 is 00A1, the root alarm identifier is 001, the object type is hard disk, and the object index is the third hard disk. Then the alarm information of the new alarm can be merged with the alarm information in the alarm body 3. When merging, it is necessary to update the reporting time in the alarm body 3, and the alarm identifier in the alarm body 3 uses the previous alarm identifier. If the alarm code is the same, the alarm level is also the same. The alarm code, alarm level, root alarm identifier, object type, and object index in the alarm body 3 can remain unchanged, and there is no need to re-fill the alarm code, alarm level, root alarm identifier, object type, and object index. The repair mark is a mark that represents unrepaired, the repair time is empty, and the description information is overwritten with the description information of the new alarm.
[0087] In some embodiments, determining whether the warning information can be merged with the warning information in the used warning body includes:
[0088] Determine whether the alarm code, object type, and object index in the alarm information correspond to the alarm code, object type, and object index in the used alarm body;
[0089] If so, it is determined that the alarm information can be merged with the alarm information in the used alarm body.
[0090] If the alarm code, object type and object index in a used alarm body are the same as the alarm code, object type and object index of the new alarm, the alarm information of the new alarm can be merged with the alarm information in the used alarm body. If the alarm code, object type and object index in a used alarm body are the same as the alarm code, root alarm identifier, object type and object index of the new alarm, it indicates that the new alarm is not caused by the same root alarm, but is the same alarm object.
[0091] For example, the alarm code of the new alarm is 00A1, the object type is hard disk, and the object index is the third hard disk. The alarm code in the used alarm body 4 is 00A1, the object type is hard disk, and the object index is the third hard disk, then the alarm information of the new alarm can be merged with the alarm information in the alarm body 3. When merging, it is necessary to update the reporting time in the alarm body 4, and the alarm identifier in the alarm body 4 continues to use the previous alarm identifier. If the alarm code is the same, the alarm level is also the same. The alarm code, alarm level, object type, and object index in the alarm body 4 can remain unchanged, and there is no need to re-fill the alarm code, alarm level, object type, and object index. The repair mark is a mark that represents an unrepaired state, the repair time is empty, the description information is overwritten with the description information of the new alarm, and the root alarm identifier is filled with the root alarm identifier of the new alarm.
[0092] In some embodiments, determining whether the warning information can be merged with the warning information in the used warning body includes:
[0093] Determine whether the alarm code and object type in the alarm information correspond to the alarm code and object type in the used alarm body;
[0094] If so, it is determined that the alarm information can be merged with the alarm information in the used alarm body.
[0095] If the alarm code, object type and object index in a used alarm body are the same as the alarm code, object type and object index of the new alarm, the alarm information of the new alarm can be merged with the alarm information in the used alarm body. If the alarm code, object type and object index in a used alarm body are the same as the alarm code, root alarm identifier, object type and object index of the new alarm, it indicates that the new alarm is not caused by the same root alarm, but is the same alarm object.
[0096] For example, the alarm code of the new alarm is 00A1, and the object type is hard disk. The alarm code in the used alarm body 5 is 00A1, and the object type is hard disk, then the alarm information of the new alarm can be merged with the alarm information in the alarm body 5. When merging, it is necessary to update the reporting time in the alarm body 5, and the alarm identifier in the alarm body 5 continues to use the previous alarm identifier. If the alarm code is the same, the alarm level is also the same. The alarm code, alarm level, and object type in the alarm body 5 can remain unchanged, and there is no need to re-fill the alarm code, alarm level, and object type. The repair mark is a mark that represents an unrepaired condition, the repair time is empty, the description information is overwritten with the description information of the new alarm, the root alarm identifier is filled with the root alarm identifier of the new alarm, and the object index is filled with the object index of the new alarm.
[0097] refer to Figure 6 As shown, in some embodiments, searching for a target alarm body includes:
[0098] S301: Searching for unused alarm bodies;
[0099] S302: If an unused alarm body is found, the unused alarm body is used as the target alarm body;
[0100] S303: If no unused alarm body is found, then find the alarm body corresponding to the alarm with the earliest repair time;
[0101] S304: If the alarm body corresponding to the alarm with the earliest repair time is found, the alarm body corresponding to the alarm with the earliest repair time is used as the target alarm body;
[0102] S305: If the alarm body corresponding to the alarm with the earliest repair time is not found, an alarm body is selected from the alarms that are being used and not repaired as the target alarm body.
[0103] This embodiment preferentially searches for unused alarm bodies, that is, alarm bodies that are not filled with any content. If an unused alarm body is found, the unused alarm body is used as the target alarm body. If no unused alarm body is found, the alarm body corresponding to the alarm with the earliest repair time is searched from the used alarm bodies. If the alarm body corresponding to the alarm with the earliest repair time is found, the alarm body corresponding to the alarm with the earliest repair time is used as the target alarm body. If the alarm body corresponding to the alarm with the earliest repair time is not found, an alarm body is selected from the alarms that are being used and not repaired as the target alarm body.
[0104] When the number of new alarms is one, if an unused alarm body is found, and the number of unused alarm bodies is greater than one, one of them can be randomly selected as the target alarm body. If no unused alarm body is found, if the number of alarm bodies corresponding to the alarm with the earliest repair time is greater than one, one of them can be randomly selected as the target alarm body.
[0105] The search strategy provided in this embodiment can maximize the use of alarm resources and retain recent alarms as much as possible, thereby ensuring the timeliness of alarm information.
[0106] In some embodiments, selecting an alarm body as a target alarm body from alarms that are being used and not repaired includes:
[0107] According to the alarm level, an alarm body with the same severity level is selected from the alarms that are being used and not repaired as the target alarm body.
[0108] In this embodiment, the priority of the alarm information being covered is negatively correlated with the severity of the alarm level. That is, the more severe the alarm level, the lower the priority of the alarm information being covered, and vice versa. In the case where the alarm level includes four levels: configuration change, active notification, general alarm, and serious error, the severity increases from configuration change to serious error, with the configuration change having the lowest severity and the serious error having the highest severity. The alarm management module traverses each alarm body, selects an alarm body with the same alarm level severity as the target alarm body, and fills the alarm information of the new alarm into the target alarm body.
[0109] This embodiment preferentially selects the alarm body with the lowest severity level as the target alarm body, so as to retain alarms with high severity levels as much as possible and avoid covering more serious alarms.
[0110] When the number of alarm bodies with the lowest severity level among the alarm bodies that are being used and not repaired is greater than one, one of them can be randomly selected as the target alarm body. For example, when the alarm body with the lowest severity level among the alarm bodies that are being used and not repaired is an alarm body with an active notification level, and the number is greater than one, then an alarm body with an active notification level is randomly selected from the alarm bodies that are being used and not repaired as the target alarm body.
[0111] In some embodiments, selecting an alarm body as a target alarm body from alarms that are being used and not repaired includes:
[0112] According to the reporting time, the alarm body with the earliest reporting time is selected from the alarms that are being used and not repaired as the target alarm body.
[0113] In this embodiment, the alarm body with the earliest reporting time is preferentially covered. The alarm management module traverses each alarm body, selects an alarm body with the earliest reporting time as the target alarm body, and fills the alarm information of the new alarm into the target alarm body.
[0114] This embodiment preferentially selects the alarm body with the earliest reporting time as the target alarm body, so as to retain the most recent alarms and avoid the recent alarms being overwritten.
[0115] When the number of alarm bodies with the earliest reporting time among the alarm bodies being used and not repaired is greater than one, one of them may be randomly selected as the target alarm body.
[0116] refer to Figure 7 As shown, in some embodiments, selecting an alarm body as a target alarm body from alarms that are being used and not repaired includes:
[0117] S401: According to the alarm level, select an alarm body with a severity level from the alarms that are being used and not repaired as a candidate alarm body;
[0118] S402: According to the reporting time, select the alarm body with the earliest reporting time from the candidate alarm bodies as the target alarm body.
[0119] This embodiment selects an alarm body as the target alarm body in combination with the alarm level and the reporting time. The alarm management module first traverses each alarm body, selects an alarm body with the alarm level severity as a candidate alarm body, and then the alarm management module traverses each candidate alarm body, selects an alarm body with the earliest reporting time as the target alarm body, and fills the alarm information of the new alarm into the target alarm body.
[0120] This embodiment preferentially selects the alarm body with the lowest severity and the earliest reporting time as the target alarm body, so as to retain the alarms with high severity and recent alarms as much as possible, and avoid covering more serious alarms and recent alarms.
[0121] In some embodiments, it also includes:
[0122] Receive query instructions;
[0123] The corresponding alarm information is returned to the target server according to the query instruction so that the target server can display the alarm information.
[0124] refer to Figure 2 As shown, the target server may be a web server. The target server sends a query instruction for the alarm information to the alarm management module. After receiving the query instruction, the alarm management module returns the corresponding alarm information to the target server according to the query instruction, and then the target server displays the received alarm information. Among them, the web server performs reverse parsing according to the filling method of the custom description information when the alarm management module reports the alarm, obtains the content of its description information, and then displays it. For example: when reporting an alarm, the description information of the alarm is filled with a string, then when the web server parses the alarm, it reversely converts the content of the description information into a string, and then presents it on the web interface for the user to understand.
[0125] In some embodiments, returning corresponding alarm information to the target server according to the query instruction includes:
[0126] If the query instruction is the first query instruction, the alarm information corresponding to the unrepaired alarm is returned to the target server;
[0127] If the query instruction is the second query instruction, the alarm information corresponding to the unrepaired alarm and the alarm information corresponding to the repaired alarm are returned to the target server.
[0128] The target server can display the alarm information of all unrepaired alarms, or it can display the alarm information of all alarms (including unrepaired alarms and repaired alarms). Among them, the unrepaired alarms are displayed by default. At this time, the target server sends a first query instruction to the alarm management module, and the alarm management module sends the alarm information of the unrepaired alarms to the target server, and the target server displays the alarm information of the unrepaired alarms. If the alarm information of all alarms is required to be displayed in full, the target server sends a second query instruction to the alarm management module, and the alarm management module sends the alarm information of all alarms to the target server, and the target server displays the alarm information of all alarms.
[0129] In the above embodiment, the alarm management module has the functions of receiving and responding to instructions. The alarm management module can return alarm information to the target server according to the query instruction. In addition to this embodiment, in some embodiments, an additional instruction processing module can be set to receive the query instruction of the target server and return the corresponding alarm information to the target server. For example, Figure 8 As shown, in addition to the alarm management module and the business module, it also includes an instruction processing module. The instruction processing module receives the query instruction sent by the target server and sends corresponding alarm information to the target server according to the query instruction.
[0130] In summary, the first target alarm is a necessary condition for generating the second target alarm, indicating that the first target alarm is associated with the second target alarm. During the alarm repair process, in addition to updating the repair mark and repair time of the alarm specified by the alarm repair request, i.e., the first target alarm, this application also updates the repair mark and repair time of the second target alarm associated with this alarm. In this way, all the associated alarms are repaired in one repair process, the alarm process is optimized, and the technical problem of redundancy in the alarm repair process can be solved, achieving the technical effect of improving the efficiency of alarm repair. Moreover, during the alarm repair process, the operation performed by this application is to update the repair mark and repair time, and the alarm information will not be cleared, so that the alarm history can be viewed.
[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0132] The embodiment of the present application also provides an alarm processing device, referring to Fig. 9 As shown, the device comprises:
[0133] The receiving unit 10 is used to receive the alarm repair request sent by the service module;
[0134] A first search unit 20 is used to search for a first target alarm according to the alarm repair request; the first target alarm refers to the alarm to be repaired specified by the alarm repair request;
[0135] The first repair unit 30 is used to set the repair mark corresponding to the first target alarm to the first mark, and update the repair time of the first target alarm; the first mark is used to indicate that the alarm has been repaired;
[0136] The second search unit 40 is used to search for a second target alarm; the first target alarm is a necessary condition for generating the second target alarm;
[0137] The second repairing unit 50 is used to set the repair mark corresponding to the second target alarm to the first mark, and update the repair time of the second target alarm.
[0138] Based on the above embodiment, as a specific implementation method, it also includes:
[0139] The notification unit is used to notify the business module of the first target alarm and the second target alarm that have been repaired, so that the business module paying attention to the first target alarm and the second target alarm cleans up the corresponding alarm information in this module and checks whether it is necessary to report the alarm again.
[0140] Based on the above embodiment, as a specific implementation method, it also includes:
[0141] An alarm reporting request receiving unit, used to receive an alarm reporting request sent by a business module;
[0142] The alarm information filling unit is used to fill the corresponding alarm information into the alarm body according to the alarm reporting request; the alarm body is used to record the alarm information.
[0143] Based on the above embodiment, as a specific implementation manner, the alarm information filling unit is used to:
[0144] According to the alarm reporting request, the alarm ID, alarm code, alarm level, reporting time, object type, object index, root alarm ID, repair mark, repair time, and description information are filled into the alarm body.
[0145] Based on the above embodiment, as a specific implementation mode, the alarm information filling unit includes:
[0146] A judgment subunit, used to judge whether the alarm information can be merged with the alarm information in the used alarm body;
[0147] A merging subunit, for merging the alarm information with the alarm information in the used alarm body if possible;
[0148] The search subunit is used to search for the target alarm body if it is not possible, and fill the alarm information into the target alarm body; the target alarm body is the alarm body that cannot be merged with the alarm information.
[0149] Based on the above embodiment, as a specific implementation mode, the judging subunit is used for:
[0150] Determine whether the alarm code, root alarm identifier, object type, and object index in the alarm information correspond to the alarm code, root alarm identifier, object type, and object index in the used alarm body;
[0151] If so, it is determined that the alarm information can be merged with the alarm information in the used alarm body.
[0152] Based on the above embodiment, as a specific implementation mode, the judging subunit is used for:
[0153] Determine whether the alarm code, object type, and object index in the alarm information correspond to the alarm code, object type, and object index in the used alarm body;
[0154] If so, it is determined that the alarm information can be merged with the alarm information in the used alarm body.
[0155] Based on the above embodiment, as a specific implementation mode, the judging subunit is used for:
[0156] Determine whether the alarm code and object type in the alarm information correspond to the alarm code and object type in the used alarm body;
[0157] If so, it is determined that the alarm information can be merged with the alarm information in the used alarm body.
[0158] Based on the above embodiment, as a specific implementation manner, the search subunit includes:
[0159] A first search subunit is used to search for unused alarm bodies;
[0160] A first determining subunit is used to use the unused alarm body as a target alarm body if an unused alarm body is found;
[0161] The second search subunit is used to search for the alarm body corresponding to the alarm with the earliest repair time if no unused alarm body is found;
[0162] The second determining subunit is used for, if an alarm body corresponding to the alarm with the earliest repair time is found, taking the alarm body corresponding to the alarm with the earliest repair time as the target alarm body;
[0163] The third searching subunit is configured to select an alarm body from alarms that are being used and not repaired as a target alarm body if the alarm body corresponding to the alarm with the earliest repair time is not found.
[0164] Based on the above embodiment, as a specific implementation manner, the third search subunit is used for:
[0165] According to the alarm level, an alarm body with the same severity level is selected from the alarms that are being used and not repaired as the target alarm body.
[0166] Based on the above embodiment, as a specific implementation manner, the third search subunit is used for:
[0167] According to the reporting time, the alarm body with the earliest reporting time is selected from the alarms that are being used and not repaired as the target alarm body.
[0168] Based on the above embodiment, as a specific implementation manner, the third search subunit is used for:
[0169] According to the alarm level, an alarm body with the same severity level is selected from the alarms that are being used and not repaired as a candidate alarm body;
[0170] According to the reporting time, the alarm body with the earliest reporting time is selected from the candidate alarm bodies as the target alarm body.
[0171] Based on the above embodiment, as a specific implementation manner, the first search unit 20 is used to:
[0172] Search for an alarm whose alarm ID is the same as the alarm ID carried in the alarm repair request.
[0173] Based on the above embodiment, as a specific implementation manner, the second search unit 40 is used to:
[0174] Search for the alarm with the alarm ID of the first target alarm as the root alarm ID.
[0175] Based on the above embodiment, as a specific implementation method, it also includes:
[0176] An instruction receiving unit, used for receiving a query instruction;
[0177] The information returning unit is used to return corresponding alarm information to the target server according to the query instruction, so that the target server can display the alarm information.
[0178] Based on the above embodiment, as a specific implementation mode, the information returning unit includes:
[0179] A first returning subunit, configured to return alarm information corresponding to the unrepaired alarm to the target server if the query instruction is a first query instruction;
[0180] The second returning subunit is used to return the alarm information corresponding to the unrepaired alarm and the alarm information corresponding to the repaired alarm to the target server if the query instruction is the second query instruction.
[0181] In addition to updating the repair mark and repair time of the alarm specified by the alarm repair request, i.e., the first target alarm, the alarm processing device provided by the present application also updates the repair mark and repair time of the second target alarm associated with this alarm, thereby achieving the goal of repairing all associated alarms in one repair process, optimizing the alarm process, solving the technical problem of redundancy in the alarm repair process, and achieving the technical effect of improving the efficiency of alarm repair. Moreover, during the alarm repair process, the operation performed by the alarm processing device provided by the present application is to update the repair mark and repair time, and the alarm information will not be cleared, so that the alarm history can be viewed.
[0182] For the description of the features in the embodiment corresponding to the alarm processing device, reference can be made to the relevant description of the embodiment corresponding to the alarm method, which will not be repeated here.
[0183] The embodiment of the present application also provides an electronic device, referring to Fig.10 As shown, the electronic device includes a memory 1 and a processor 2, wherein the memory 1 stores a computer program, and the processor 2 is configured to run the computer program to execute the steps in any of the above-mentioned alarm processing method embodiments.
[0184] In addition to updating the repair mark and repair time of the alarm specified by the alarm repair request, i.e., the first target alarm, the electronic device provided by the present application also updates the repair mark and repair time of the second target alarm associated with this alarm, thereby achieving the repair of all associated alarms in one repair process, optimizing the alarm process, solving the technical problem of redundancy in the alarm repair process, and achieving the technical effect of improving the efficiency of alarm repair. Moreover, during the alarm repair process, the operation performed by the electronic device provided by the present application is to update the repair mark and repair time, without clearing the alarm information, so as to ensure that the alarm history can be viewed.
[0185] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned alarm processing method embodiments when running.
[0186] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0187] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above alarm processing method embodiments are implemented.
[0188] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned alarm processing method embodiments are implemented.
[0189] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0190] The above is a detailed introduction to an alarm processing method, device, equipment, computer program product and medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. An alarm processing method, characterized in that: include: Receive alarm repair requests sent by the business module; According to the alarm repair request, searching for a first target alarm; The first target alarm refers to the alarm to be repaired specified by the alarm repair request; Setting the repair mark corresponding to the first target alarm to the first mark, and updating the repair time of the first target alarm; The first mark is used to indicate that the alarm has been repaired; Find the second target alarm; The first target alarm is a necessary condition for generating the second target alarm; The repair mark corresponding to the second target alarm is set to the first mark, and the repair time of the second target alarm is updated.
2. The alarm processing method according to claim 1, characterized in that: Also includes: Notify the service module of the repaired first target alarm and the second target alarm, so that the service module paying attention to the first target alarm and the second target alarm cleans up the corresponding alarm information in the module and checks whether it is necessary to report the alarm again.
3. The alarm processing method according to claim 1, characterized in that: Also includes: Receiving an alarm reporting request sent by the business module; According to the alarm reporting request, fill the corresponding alarm information into the alarm body; The alarm body is used to record alarm information.
4. The alarm processing method according to claim 3, characterized in that: According to the alarm reporting request, filling the corresponding alarm information into the alarm body includes: According to the alarm reporting request, the alarm identifier, alarm code, alarm level, reporting time, object type, object index, root alarm identifier, repair mark, repair time, and description information are filled into the alarm body.
5. The alarm processing method according to claim 3, characterized in that: According to the alarm reporting request, filling the corresponding alarm information into the alarm body includes: Determining whether the warning information can be merged with the warning information in the used warning body; If possible, merging the warning information with the warning information in the used warning body; If not, then search for a target alarm body, and fill the alarm information into the target alarm body; the target alarm body is an alarm body that cannot be merged with the alarm information.
6. The alarm processing method according to claim 5, characterized in that: Determining whether the alarm information can be merged with the alarm information in the used alarm body includes: Determine whether the alarm code, root alarm identifier, object type, and object index in the alarm information correspond to the same alarm code, root alarm identifier, object type, and object index in the used alarm body; If so, it is determined that the warning information can be merged with the warning information in the used warning body.
7. The alarm processing method according to claim 5, characterized in that: Determining whether the alarm information can be merged with the alarm information in the used alarm body includes: Determine whether the alarm code, object type, and object index in the alarm information correspond to the same alarm code, object type, and object index in the used alarm body; If so, it is determined that the warning information can be merged with the warning information in the used warning body.
8. The alarm processing method according to claim 5, characterized in that: Determining whether the alarm information can be merged with the alarm information in the used alarm body includes: Determine whether the alarm code and object type in the alarm information correspond to the same alarm code and object type in the used alarm body; If so, it is determined that the warning information can be merged with the warning information in the used warning body.
9. The alarm processing method according to claim 5, characterized in that: Searching for target alarm bodies includes: Find unused alarm bodies; If an unused alarm body is found, the unused alarm body is used as the target alarm body; If no unused alarm body is found, then the alarm body corresponding to the alarm with the earliest repair time is searched; If the alarm body corresponding to the alarm with the earliest repair time is found, the alarm body corresponding to the alarm with the earliest repair time is used as the target alarm body; If the alarm body corresponding to the alarm with the earliest repair time is not found, an alarm body is selected from the alarms that are being used and not repaired as the target alarm body.
10. The alarm processing method according to claim 9, characterized in that: Selecting an alarm body as the target alarm body from the alarms that are being used and not repaired includes: According to the alarm level, an alarm body with an alarm level severity is selected from the alarms that are being used and not repaired as the target alarm body.
11. The alarm processing method according to claim 9, characterized in that: Selecting an alarm body as the target alarm body from the alarms that are being used and not repaired includes: According to the reporting time, the alarm body with the earliest reporting time is selected from the alarms that are being used and not repaired as the target alarm body.
12. The alarm processing method according to claim 9, characterized in that: Selecting an alarm body as the target alarm body from the alarms that are being used and not repaired includes: According to the alarm level, an alarm body with the same severity level is selected from the alarms that are being used and not repaired as a candidate alarm body; According to the reporting time, the alarm body with the earliest reporting time is selected from the candidate alarm bodies as the target alarm body.
13. The alarm processing method according to claim 1, characterized in that: Finding the first target alarm includes: Search for an alarm whose alarm identifier is the same as the alarm identifier carried in the alarm repair request.
14. The alarm processing method according to claim 1, characterized in that: Finding the second target alarm includes: Search for an alarm that uses the alarm identifier of the first target alarm as a root alarm identifier.
15. The alarm processing method according to claim 1, characterized in that: Also includes: Receive query instructions; The corresponding alarm information is returned to the target server according to the query instruction, so that the target server displays the alarm information.
16. The alarm processing method according to claim 15, characterized in that: The corresponding alarm information returned to the target server according to the query instruction includes: If the query instruction is the first query instruction, then returning alarm information corresponding to the unrepaired alarm to the target server; If the query instruction is the second query instruction, the alarm information corresponding to the unrepaired alarm and the alarm information corresponding to the repaired alarm are returned to the target server.
17. An alarm processing device, characterized in that: include: A receiving unit, used for receiving an alarm repair request sent by a business module; A first search unit, configured to search for a first target alarm according to the alarm repair request; The first target alarm refers to the alarm to be repaired specified by the alarm repair request; A first repair unit, configured to set a repair mark corresponding to the first target alarm to a first mark, and update a repair time of the first target alarm; The first mark is used to indicate that the alarm has been repaired; A second search unit, used to search for a second target alarm; The first target alarm is a necessary condition for generating the second target alarm; The second repair unit is used to set the repair mark corresponding to the second target alarm to the first mark, and update the repair time of the second target alarm.
18. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the alarm processing method according to any one of claims 1 to 16 when executing the computer program.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the alarm processing method according to any one of claims 1 to 16.
20. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the alarm processing method according to any one of claims 1 to 16 are implemented.
Citation Information
Patent Citations
Server fault root cause filtering method and device, storage medium and electronic device
CN115766402A
Alarm data processing method and device, equipment and storage medium
CN117891692A
Computer system and restoration method
US20110295809A1