Alarm information processing method and device, storage medium and electronic equipment
By generating simulated URLs and receivers within the virtualization system, the intranet sending and receiving alarm information is realized, which solves the problem of low data security in the field of cloud computing virtualization and improves the security and confidentiality of intranet development.
Patent Information
- Application Number
- CN202411171108.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-13
AI Technical Summary
In the field of cloud computing virtualization, there is a problem of low data security in the processing of alarm information. The existing technology relies on external network environment for system debugging, which poses a risk of data leakage and has no effective solution.
By generating a target simulation URL inside the virtualization system, sending the encapsulated alarm information to the virtual receiver, and parsing and comparing it on the intranet, we determine whether the debugging process meets the expected requirements, avoid connecting to the external network, and improve data security sex.
It realizes the secure sending and receiving of alarm information in an intranet environment, reduces the risk of data leakage, and improves the security and confidentiality of virtual system development.
Smart Images

Figure CN119127392A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computers, and more specifically, to a method and device for processing alarm information, a storage medium, and an electronic device. Background Art
[0002] In the field of cloud computing virtualization, an alert is a notification that occurs in response to a selected system event, such as a notification that occurs when a compute node or virtual machine exceeds a specified threshold on CPU (Central Processing Unit), memory usage, network throughput, storage throughput, or storage repository. These settings can be configured using iCenter to create notifications based on any available host or VM (short for VMware host) performance indicator.
[0003] However, the entire process of alarm generation in related technologies needs to rely on the external network environment for development. In particular, when the alarm notification involves SMS, enterprise WeChat, DingTalk and other notification methods, it is necessary to ensure that the virtual system (intranet) and the external network are connected before the debugging of alarm information sending and receiving can be performed. However, this method of relying on the external network environment for system debugging has a high risk of data leakage, resulting in the problem of low data security in the virtual system development process.
[0004] Regarding the related technologies, there is a problem of low data security in the processing of alarm information during the development of virtual systems, and no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method and device for processing alarm information, a storage medium, and an electronic device, so as to at least solve the problem of low data security in the processing of alarm information during the development of a virtual system.
[0006] According to an embodiment of the present application, a method for processing alarm information is provided, including: obtaining target alarm information, wherein the target alarm information is information generated in response to a system event in a virtualization system; encapsulating the target alarm information to obtain encapsulated alarm information that meets the interface protocol format requirements of a target sending method; sending the encapsulated alarm information to a virtual receiver in the virtualization system through a target simulation URL, wherein the virtual receiver includes a virtual account corresponding to a real account, and the target simulation URL is a URL generated in the virtualization system; parsing the encapsulated alarm information to obtain parsed alarm information; obtaining a target comparison result by comparing the parsed alarm information with the target alarm information, and determining whether the debugging process of the virtualization system meets the expected requirements based on the target comparison result.
[0007] In an exemplary embodiment, the above-mentioned sending of the encapsulated alarm information to the virtual recipient in the virtualization system through the target simulation URL includes: generating a target simulation URL according to the interface protocol of the target sending method, wherein the target sending method is pre-set based on the debugging requirements of the virtualization system; when it is determined that the alarm shielding function is not enabled and the virtual recipient has been configured, sending the encapsulated information to the virtual recipient through the target simulation URL.
[0008] In an exemplary embodiment, the target simulation URL is generated according to the interface protocol of the target sending method, including: generating a simulation URL template on the operation interface of the virtualization system according to the interface protocol of the target sending method; configuring the key fields in the simulation URL template according to the account authentication information of the virtual recipient to obtain the target simulation URL, wherein the account authentication information includes the virtual account and login password of the virtual recipient, and the key fields include the fields in the simulation URL template used to distinguish different virtual recipients.
[0009] In an exemplary embodiment, the above-mentioned parsing of the encapsulated alarm information to obtain the parsed alarm information includes: parsing the encapsulated alarm information to obtain a character string containing alarm parameters; determining an arrangement rule of the character string based on the header information of the character string, wherein the header information is used to identify the content format of the alarm information; and converting the character string into the parsed alarm information according to the content format.
[0010] In an exemplary embodiment, the above-mentioned target comparison result is obtained by comparing the parsed alarm information with the target alarm information, and whether the debugging process of the virtualization system meets the expected requirements is determined based on the target comparison result, including: comparing the first object identifier of the alarm object in the parsed alarm information with the second object identifier of the alarm object in the target alarm information, and determining that the debugging process of the virtualization system meets the expected requirements when the first object identifier is the same as the second object identifier; or comparing the first value of the system parameter in the parsed alarm information with the second value of the system parameter in the target alarm information, and determining that the debugging process of the virtualization system meets the expected requirements when the first value is the same as the second value; or comparing the first object identifier of the alarm object in the parsed alarm information with the second object identifier of the alarm object in the target alarm information. The second object identifier of the alarm object is compared, and the first value of the system parameter in the parsed alarm information is compared with the second value of the system parameter in the target alarm information, and when the first object identifier is the same as the second object identifier, and the first value is the same as the second value, it is determined that the debugging process of the virtualization system meets the expected requirements; or the string length of the first attribute information of the system parameter in the parsed alarm information is compared with the string length of the second attribute information of the target system parameter in the target alarm information, and the string type of the first attribute information is compared with the string type of the second attribute information, and when the string length of the first attribute information is the same as the string length of the second attribute information, and the string type of the first attribute information is the same as the string type of the second attribute information, it is determined that the debugging process of the virtualization system meets the expected requirements.
[0011] In an exemplary embodiment, the above-mentioned acquisition of target alarm information includes: acquiring a pre-configured set of alarm items, wherein the alarm items include device parameters of a set of devices required to support the operation process of the virtualization system; when the device parameters of a set of devices are greater than or equal to the target threshold, generating target alarm information.
[0012] Optionally, after sending the encapsulated alarm information to the virtual recipient in the virtualization system through the target simulation URL, the method also includes: obtaining the current status information of the target alarm item to which the target alarm information belongs at a preset time interval, wherein the current status information is used to indicate whether the target alarm item meets the generation conditions of the target alarm information; when the current status information indicates that the target alarm item does not meet the generation conditions, the cancellation alarm information is sent to the virtual recipient.
[0013] According to another embodiment of the embodiment of the present application, there is also provided an alarm information processing device, including: an acquisition unit, used to acquire target alarm information, wherein the target alarm information is information generated in response to a system event in a virtualization system; an encapsulation unit, used to encapsulate the target alarm information to obtain encapsulated alarm information that meets the interface protocol format requirements of the target sending method; a sending unit, used to send the encapsulated alarm information to a virtual receiver in the virtualization system through a target simulation URL, wherein the virtual receiver includes a virtual account corresponding to a real account, and the target simulation URL is a URL generated in the virtualization system; a parsing unit, used to parse the encapsulated alarm information to obtain parsed alarm information; a first processing unit, used to obtain a target comparison result by comparing the parsed alarm information with the target alarm information, and determine whether the debugging process of the virtualization system meets the expected requirements based on the target comparison result.
[0014] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.
[0015] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0016] According to another embodiment of the present application, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0017] Through the above-mentioned embodiments provided by the present application, the target alarm information is encapsulated, and a target simulation URL is generated inside the virtual system according to the interface protocol of the target sending method, and the encapsulated alarm information is sent to the virtual receiver through the target simulation URL, and the encapsulated alarm information received by the virtual receiver is parsed to obtain the parsed alarm information, and finally, by comparing the parsed alarm information with the target alarm information, it is determined whether the adjustment process of the virtual system meets the expected requirements. In other words, by creating a virtual URL and a virtual receiver inside the virtual system, the sending and receiving of alarm information is realized inside the virtual system, avoiding connection with the external network, improving the security and confidentiality of the virtual system development in the intranet environment, and achieving the technical effect of improving the security of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 It is a hardware structure block diagram of a server device of a method for processing alarm information according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of an optional method for processing alarm information according to an embodiment of the present application;
[0021] Figure 3 is a flowchart of an optional notification process of alarm information according to an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of a script structure of a simulated receiving URL corresponding to an optional SMS notification method according to an embodiment of the present application;
[0023] Figure 5 is an optional flow chart of receiving alarm information according to an embodiment of the present application;
[0024] Figure 6 is a structural block diagram of a verification device for a soft decoding function according to an embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0028] The method for processing alarm information provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a server device of a method for processing alarm information in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for processing alarm information in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0031] In order to better understand the method of processing the above alarm information, the basic concepts of the virtualization system are briefly introduced below.
[0032] The so-called virtualization system is a technology that abstracts and isolates physical resources. It can divide a physical host into multiple virtual machine instances, each of which can run the operating system and applications independently. This technology is widely used in cloud computing, server deployment and test environment construction.
[0033] In a virtualization system, there are two important components: the host and the virtual machine. The host is the physical host responsible for managing the creation, destruction, and resource allocation of virtual machines. Virtual machines are containers for operating systems and applications running on the host. They share the physical resources of the host, but are isolated from each other.
[0034] During the development of a virtualization system, in order to respond to selected system events, an alarm message is usually generated when the device indicators of the host or virtual machine in the virtualization system do not meet the preset conditions. For example, when the memory usage of host 1 is higher than 80%, alarm message 1 is generated (for example, the memory usage of host 1 exceeds the standard), or parameter 1 of virtual machine 1 is less than the minimum value, alarm message 2 is generated (for example, the device parameter of virtual machine 1 is abnormal), etc.
[0035] It is easy to understand that during the development of the virtualization system, various types of alarm items are set according to device indicators and device parameters, such as the memory usage of the host, the parameters of the virtual machine, etc., and the corresponding alarm information is generated when the conditions for generating the alarm information are met. In addition, a set of alarm information sending and receiving mechanisms are set up within the virtualization system to verify whether the functions of the virtualization system meet the expected requirements.
[0036] In order to solve the above problems existing in the related art, a method for processing alarm information is provided in this embodiment, and its execution body includes but is not limited to an alarm information sending module of a virtualization system and a virtual receiving module of the alarm information, such as Figure 2 As shown, the process includes the following steps S202-S210:
[0037] Step S202: Acquire target alarm information, wherein the target alarm information is information generated in response to a system event in the virtualization system;
[0038] Step S204: encapsulating the target alarm information to obtain the encapsulated alarm information that meets the interface protocol format requirements of the target sending mode;
[0039] Step S206: sending the packaged alarm information to a virtual recipient in the virtualization system through a target simulated website, wherein the virtual recipient includes a virtual account corresponding to a real account, and the target simulated website is a website generated in the virtualization system;
[0040] Step S208: parsing the encapsulated alarm information to obtain parsed alarm information;
[0041] Step S210: obtaining a target comparison result by comparing the analyzed alarm information with the target alarm information, and determining whether the debugging process of the virtualization system meets the expected requirements according to the target comparison result.
[0042] In an embodiment of the present application, the alarm information may be, but is not limited to, alarm detail information generated when the alarm item meets preset conditions, wherein the alarm items include the memory usage of the host in the virtualization system, the CPU occupancy of the virtual machine, the throughput of the network interface, the usage of the disk memory, etc.
[0043] During the virtual system development process, developers will pre-configure alarm items that meet specified conditions to generate alarm information. For example, when the memory usage of host 1 is greater than or equal to 80%, an alarm information is generated, or when the CPU occupancy of the virtual machine is greater than or equal to 90%, an alarm information is generated.
[0044] In this embodiment, whether an alarm item generates alarm information can be determined by setting an alarm threshold, but is not limited to the method. The alarm threshold interface provides functions such as viewing, configuring, disabling / enabling specified alarm item thresholds, etc.
[0045] In addition, you can disable the alarm item, and after disabling the alarm item, the system will no longer generate alarm information related to the high image, nor will it record the alarm information, and the existing current alarm information will be automatically transferred to the historical alarm. For example, when alarm item 1 is the memory usage of host 2, if the disable function is enabled, even if the memory usage of host 2 reaches 90% (the preset threshold is 80%), alarm item 1 will not generate alarm information (which can also be understood as alarm details information).
[0046] In order to enable the sending and receiving of alarm information of the virtualized system (which can also be understood as the intranet) without connecting to the external network, a corresponding simulated URL is configured in the embodiment of the present application. The simulated URL is generated according to the specific configuration of the alarm notification method (which can also be understood as the method of sending the alarm information). Common alarm notification methods include SMS, WeChat for Enterprise, DingTalk, Microsoft Teams, Webhook, etc. By correctly configuring the corresponding notification method, the alarm information can be sent to the corresponding virtual recipient.
[0047] Unlike the traditional intranet debugging method in which the alarm information generated by the intranet (i.e., the virtualization system) is sent to the receiving end in the pre-connected external network, in the embodiment of the present application, a virtual receiver with the same function as the receiving end in the external network is created in the virtualization system, where the virtual receiver includes but is not limited to a virtual account (which can also be understood as a user name), a virtual password, and a virtual mobile phone number.
[0048] In order to be suitable for the above-mentioned different types of alarm notification methods, the target alarm information is usually encapsulated into alarm information that meets the interface protocol format requirements of the target sending method according to the alarm notification method (which can also be understood as the target sending method), and the encapsulated alarm information is sent to the virtual recipient through the above-mentioned simulated URL.
[0049] After receiving the encapsulated alarm information, the encapsulated alarm information is parsed to obtain a character string of a target alarm parameter corresponding to the target alarm information, and then by comparing the character string of the target alarm parameter with the character string in the target alarm information, it is determined whether the target alarm information is accurately transmitted to the virtual receiver.
[0050] If the parsed alarm information is the same as the target alarm information, it means that the functional items developed in the intranet meet expectations. Otherwise, it means that the functional items developed in the intranet do not meet expectations.
[0051] For example, assuming that the target alarm information is that the memory usage of host 1 is 90%, and the parsed alarm information is that the memory usage of host 2 is 90%, it means that the sending and receiving functions of the alarm items in the intranet development process do not meet the expected requirements. The specific implementation process of the parsed alarm information and the target alarm information will be described in detail below in conjunction with specific embodiments.
[0052] By adopting the above method, the sending and receiving of alarm information can be realized within the virtual voice system without connecting to the external network, thereby realizing the debugging of functional items in the internal network development process, reducing the risk of leaking internal network data when connected to the external network, and improving the data security of the internal network development process.
[0053] In addition, different alarm notification methods can be adaptively selected according to user needs, which improves the flexibility and compatibility of the intranet development process.
[0054] In an exemplary embodiment, the above-mentioned sending the encapsulated alarm information to the virtual receiver in the virtualization system through the target simulation website includes:
[0055] Generate a target simulation URL according to the interface protocol of the target sending mode, wherein the target sending mode is preset based on the debugging requirements of the virtualization system;
[0056] When it is determined that the alarm shielding function is not enabled and the virtual receiver has been configured, the encapsulated information is sent to the virtual receiver via the target simulation website.
[0057] Combined with the description in the above embodiments, it can be known that the alarm notification method includes but is not limited to SMS, enterprise WeChat, DingTalk, Microsoft Teams, SNMP (Simple Network Management Protocol), Webhook, etc. In the actual debugging process, the target sending method (alarm notification method) can be preset by the user, and each alarm notification method has an independent configuration method. In this embodiment, by preparing alarm data parameters, the alarm information is sent through a method of simulating the preparation of alarm notification information.
[0058] Combine the following Figure 3 The flowchart shown describes the method of sending the above-mentioned alarm information, which specifically includes:
[0059] S302, configure the alarm notification method;
[0060] Specifically, it includes two parts: alarm notification configuration and alarm notification method. The process of alarm notification configuration is as follows:
[0061] S302-1, determining to which virtual recipients (for example, which virtual accounts) the specified alarm information is sent, the alarm notification depends on the configuration of the alarm notification mode;
[0062] S302-2, alarm notification supports configuration of alarm information of which levels and alarm objects are sent to a specified virtual account;
[0063] The default is to send all alarm information of all levels of all alarm objects to the specified virtual account. In some cases, the user can also set to send only the alarm information of some alarm objects (for example, host, virtual machine).
[0064] S302-3, when the alarm notification selection is [Specified], it means that the alarm information generated by the alarm object or alarm item selected by the user configuration is sent;
[0065] 1) When only an alarm item is configured but no specific alarm object is configured for the alarm item, the alarm item applies to the alarm information generated by all objects, and alarm notifications will be sent to all objects;
[0066] 2) When the alarm object is configured but the specific alarm item that the alarm object is concerned about is not configured, no alarm notification will be sent;
[0067] 3) When both the alarm item and the alarm object are configured, only the alarm notification of the configured alarm object is sent;
[0068] 4) The alarm notification environment identifier is used to distinguish which site environment the alarm notification message comes from.
[0069] It mainly includes SMS, enterprise WeChat, DingTalk, etc., and correctly configures the corresponding notification method to send the alarm information to the corresponding alarm notification method.
[0070] S304, setting an alarm threshold item;
[0071] The alarm threshold setting interface provides functions such as viewing, configuring, disabling / enabling specified alarm thresholds, etc. After disabling an alarm item, the system will no longer generate alarm information related to the alarm item, nor will it record it. The existing current alarm information will automatically be transferred to historical alarms.
[0072] in, Figure 3 The alarm threshold content shown in is enabled, and the current alarm value is greater than the pre-configured threshold or the configured alarm value; if you do not need to pay attention to the current alarm information, but need to view the historical status of the alarm, you can use the [Alarm Shield] function to achieve it.
[0073] S306, the alarm item generates alarm information;
[0074] During the operation of the virtualization system, it is possible but not limited to determine that an alarm message is generated when the object parameter of the alarm object in the alarm item is greater than (greater than or equal to) a preset threshold. For example, if the value of parameter 2 of the virtual machine exceeds the preset threshold, it can trigger the generation of alarm detail information.
[0075] In addition, the current virtualization system may generate alarm information by adjusting (for example, increasing) the alarm performance value corresponding to the alarm threshold of the current alarm object.
[0076] S308, determining whether to perform alarm shielding;
[0077] If the alarm shielding function is not enabled, execute step S3 10; otherwise, end the process.
[0078] S3 1 0, receiving alarm information through alarm notification;
[0079] When it is determined that the alarm shielding function is not enabled, the generated alarm information is distributed, for example, the alarm information is sent to a pre-selected virtual recipient through a configured alarm method.
[0080] If it is confirmed again that the object parameter of the alarm object is greater than or equal to the preset threshold, the alarm information is sent, and the alarm information is received at the receiving end (virtual receiver).
[0081] S3 1 2, the virtual receiver receives the alarm information, and during the operation of the system, if the object parameter of the alarm object is less than a preset threshold, an alarm recovery information is generated;
[0082] And distribute the alarm recovery information, for example, distribute it to the virtual receiver.
[0083] S314, receiving alarm recovery information.
[0084] The alarm recovery information may include, but is not limited to, indicating a state change from the alarm item generating alarm information to the alarm item canceling the generation of alarm information.
[0085] From the description of the above embodiments, it can be seen that from the configuration process of the generation and sending method of the alarm information, it is possible to adjust in real time whether the alarm item generates alarm information, sends alarm information or sends alarm recovery information, etc. according to user needs or actual conditions, which reflects the flexibility of the alarm information processing process and also improves the efficiency of alarm information processing.
[0086] In an exemplary embodiment, the target simulated website is generated according to the interface protocol of the target sending mode, including:
[0087] Generate a simulated URL template on the operation interface of the virtualization system according to the interface protocol of the target sending method;
[0088] According to the account authentication information of the virtual recipient, the key fields in the simulation URL template are configured to obtain the target simulation URL, wherein the account authentication information includes the virtual account and login password of the virtual recipient, and the key fields include the fields in the simulation URL template used to distinguish different virtual recipients.
[0089] As described in the above embodiments, the key to the embodiment of the present application being able to implement debugging during the intranet development process without connecting to the external network is that a simulated URL matching the alarm information sending method is generated in the intranet. For ease of understanding, the specific process of generating a simulated URL is described below using SMS sending as an example.
[0090] Assume that the initial SMS simulation URL entered on the operation interface of the virtualization system is http: / / 100.6.2.12:8080 / sendAlarmSms?userName=admin&passWord=Cloud@123&target={PhoneNumber}&content={AlarmMessage}.
[0091] The basic principle of generating the above SMS simulation URL is to receive SMS messages at port 8080 of the 100.6.2.12 server. The received SMS messages include but are not limited to the administrator account, password, and virtual mobile phone number for receiving alarm information. The alarm SMS content will be replaced according to the content entered on the operation interface. The sendAlarmSms script structure in the SMS receiving simulation URL is as follows: Figure 4 shown.
[0092] It should be noted that the above Figure 4 It is based on the submission method of POST, PUT, GET, etc., that is, it is a string in UTF-8 format and GBK format, and the virtual mobile phone number, user name, password and alarm information are replaced according to the placeholder.
[0093] The POST, PUT and GET methods are described below in the form of specific examples, and corresponding codes can also be selected according to corresponding submission methods.
[0094] For example, the selection code for HttpMethod:POST format and charset UTF-8 is:
[0095] #HttpMethod:POST,Content-Type:application / x-www-form-urlencoded; charset=UTF-8
[0096] cmd="curl-H\"Content-Type:application / x-www-form-urlencoded; charset="UTF-8\"-XPOST\"http: / / 100.6.2.12:8080 / smsUTF8.aspx? appId=app&userId=user&password=pwd&templateId=template&title=title&numbers={PhoneNumber}\"--data-urlencode\"text="{AlarmMessage}\""
[0097] The implementation principle of the above code paragraph is to encapsulate the virtual user name, password and virtual mobile phone number (the mobile phone number configured on the operation interface for receiving alarm information), SMS alarm information and other contents of the current virtualization system into the cmd variable, and after sending it to the receiving end, parse out the specific content (for example, user name, password, mobile phone number and SMS alarm information, etc.).
[0098] Among them, the cmd variable is a variable modified through the command prompt. This method of setting environment variables is only valid for the current running window. The setting will be invalid after closing the running window.
[0099] For another example, the selection code for HttpMethod:POST format and charset GBK is:
[0100] #HttpMethod:POST,Content-Type:application / x-www-form-urlencoded; charset=GBK
[0101] #cmd="curl-H\"Content-Type:application / x-www-form-urlencoded; charset="GBK\"-XPOST\"http: / / 100.6.2.12:8080 / smsUTF8.aspx? appId=app&userId=user&password=pwd&templateId=template&title=title&numbers={PhoneNumber}\"--data-urlencode\"text="{AlarmMessage}\""
[0102] Obviously, the generation process of the simulated URL corresponding to the above SMS notification method is only an example and does not limit it. In addition, the generation process of the simulated URL corresponding to other notification methods (such as DingTalk, Enterprise WeChat, etc.) can refer to the SMS notification method, which will not be repeated here.
[0103] Through the simulated URL generated in the above embodiment, a connection between the sender and receiver of the alarm information can be created inside the virtualization system, realizing a debugging environment with the same functions when the intranet and the extranet are connected, thereby improving the convenience of the debugging method during the intranet development process, and also improving the security and confidentiality of software development in the intranet environment.
[0104] In an exemplary embodiment, the encapsulated alarm information is parsed to obtain the parsed alarm information, including:
[0105] Parse the encapsulated alarm information to obtain a character string containing alarm parameters;
[0106] Determine an arrangement rule of the character string according to the header information of the character string, wherein the header information is used to identify the content format of the alarm information;
[0107] Convert the string into parsed warning information according to the content format.
[0108] For example, if the encapsulated alarm information is parsed, the string containing the alarm parameters includes host 1, usage rate, and 90%. Since the process of encapsulating the target alarm information depends on the alarm sending method and the content of the target alarm information itself, such as device type, device name, device parameters, etc., after parsing the string containing the alarm parameters, the arrangement rules of the string can be determined through the header information of the string.
[0109] For example, the arrangement rule of the above string indicates that the content format of the alarm information is to display the above fields in the order of device type, device name, device parameter and parameter value. Then, according to the content format, the parsed string will continue to be processed to obtain the parsed alarm information.
[0110] That is to say, within the virtualization system, through the pre-defined method of sending and receiving alarm information, the alarm details can be accurately and quickly parsed on the basis of ensuring the complete and accurate sending of alarm information, thereby improving the efficiency of intranet debugging.
[0111] In another optional embodiment, after sending the alarm information, at the receiving end, it can be but not limited to Figure 5 The flowchart shown receives alarm information.
[0112] S502, prepare alarm information content;
[0113] For example, the alarm information sent by the sending end is encapsulated. The specific encapsulation method can refer to the description in the above embodiment.
[0114] S504, sending alarm information using an alarm sending method;
[0115] For example, sending warning information via SMS, enterprise WeChat, DingTalk, etc.
[0116] S506, parsing the title of the alarm information content;
[0117] The title of the alarm information content contains some key fields. The key fields are used to indicate the specific method of sending the alarm information. For example, if it contains Figure 5 If the "msgtype" field shown in the example above meets requirement 1, then it is determined that the sending method pre-configured by the user includes sending to the DingTalk client; if it contains Figure 5 The "title" field shown determines the sending method pre-configured by the user, including sending to Teams, etc.
[0118] S508, parsing the http protocol template;
[0119] Since different sending modes correspond to different interfaces and protocols, there are multiple protocol templates corresponding to different sending modes in the embodiment of the present application.
[0120] By parsing the protocol template, a character string containing SMS alarm parameters is obtained, and the sending method is determined to be SMS sending, that is, step S510-1 is executed; if the parsed content contains "msgtype":"text", "at":{"atall":"true"}, step S510-2 is executed; if the parsed content contains "msgtype":"text", step S510-3 is executed; if the parsed content contains "title", step S510-4 is executed; if the parsed content is other, step S510-5 is executed.
[0121] S510-1: Send warning information via SMS;
[0122] S510-2, sending the alarm information to the DingTalk client;
[0123] S510-3; send the alarm information to the enterprise WeChat;
[0124] S510-4; Send the warning information to Teams;
[0125] S510-5; send the alarm information to the webhook;
[0126] S512: Receive warning information according to the simulated SMS;
[0127] In a specific embodiment, the specific process of receiving the alarm information via SMS is as follows:
[0128] Server current time:2022-06-24 16:36:22
[0129] GET: Send a message to the custom SMS platform via HTTP (Content-Type: application / json; charset = GBK)
[0130] userName:admin
[0131] passWord:Cloud@s1
[0132] target:18500000001
[0133] content:The following alarms that occurred recently in the iCenter00000000 environment with iCenter IP 100.18.25.249 have been repaired and transferred to historical alarms. Please be aware: Repair time: 2022-06-24 16:37:25, event: The memory usage of host 100.18.25.142 exceeds the important alarm threshold (20%), and the occurrence time is: 2022-06-24 10:38:22.
[0134] S514, simulating receiving alarm information according to the Webhook address.
[0135] In an optional embodiment, the specific process of receiving the alarm information through Webhook is as follows:
[0136] Server current time:2022-06-24 16:36:21
[0137] POST: Send a message to the Webhook:
[0138] {"msgtype":"text","text":{"content":"The following alarms that occurred recently in the iCenter00000000 environment with iCenter IP 100.18.25.249 have been fixed and transferred to historical alarms. Please be informed:\nFixed time: 2022-06-24 16:37:25, event: (Environment iCenter IP: 100.18.25.249, environment ID: iCenter00000000) Host 100.18.25.142 memory usage exceeds the major alarm threshold (20%), occurrence time: 2022-06-24 10:38:22\nFixed time: 2022-06-2416:37:25, event: (Environment iCenter IP: 100.18.25.249, Environment ID: iCenter00000000) Host 100.18.25.141 memory usage exceeds the major alarm threshold (20%), time of occurrence: 2022-06-24 10:38:22"}}
[0139] Among them, the simulated receiving address for receiving SMS messages is as follows:
[0140] http: / / 100.6.2.12:8080 / sendAlarmSms?userName=admin&passWord=Cloud@s1&target={PhoneNumber}&content={AlarmMessage}
[0141] The simulated receiving address for receiving enterprise WeChat is http: / / 100.6.2.12:8080 / webhook. The receiving address is used to obtain the sent string through the http request protocol, and the various fields of the alarm are parsed.
[0142] The simulated receiving address for DingTalk, the simulated receiving address for Microsoft Teams, and the simulated receiving address for webhook are all the same as the simulated receiving address for WeChat for Business, that is, the simulated receiving addresses are all http: / / 100.6.2.12:8080 / webhook.
[0143] It should be noted that SMS, WeChat for Enterprise, DingTalk and other methods all have receiving addresses, and the alarm information field values are similar; these contents cannot be determined whether the functions are correct during the test without Internet access. Therefore, the purpose of setting the relevant receiving addresses is to verify their correctness.
[0144] Among them, in the SMS receiving address, sendAlarmSms is a script; the enterprise WeChat, DingTalk, Teams, and webhook receiving addresses can all be regarded as receiving addresses based on webhook. After configuring the receiving end, click Test Notification to determine whether the sending segment and the receiving end are connected. If connected, it means that information can be received.
[0145] It can be seen that by adopting the above-mentioned method of receiving alarm information, the simulated receiving address can be dynamically selected and the alarm information can be received according to the user's pre-configuration method and in combination with the parsed content of the encapsulated alarm information, thereby meeting the user's personalized needs.
[0146] In an exemplary embodiment, the target comparison result is obtained by comparing the parsed alarm information with the target alarm information, and determining whether the debugging process of the virtualization system meets the expected requirements according to the target comparison result, including:
[0147] Compare the first object identifier of the alarm object in the parsed alarm information with the second object identifier of the alarm object in the target alarm information, and determine that the debugging process of the virtualization system meets the expected requirements when the first object identifier is the same as the second object identifier; or
[0148] Compare the first value of the system parameter in the parsed alarm information with the second value of the system parameter in the target alarm information, and determine that the debugging process of the virtualization system meets the expected requirements when the first value and the second value are the same; or
[0149] Compare the first object identifier of the alarm object in the parsed alarm information with the second object identifier of the alarm object in the target alarm information, and compare the first value of the system parameter in the parsed alarm information with the second value of the system parameter in the target alarm information, and when the first object identifier is the same as the second object identifier, and the first value is the same as the second value, determine that the debugging process of the virtualization system meets the expected requirements; or
[0150] Compare the string length of the first attribute information of the system parameters in the parsed alarm information with the string length of the second attribute information of the target system parameters in the target alarm information, and compare the string type of the first attribute information with the string type of the second attribute information. When the string length of the first attribute information is the same as the string length of the second attribute information, and the string type of the first attribute information is the same as the string type of the second attribute information, determine that the debugging process of the virtualization system meets the expected requirements.
[0151] For example, assuming that the alarm object in the target alarm information is host 1, the system parameter is memory usage, the attribute information of the system parameter, etc., wherein the number of attribute fields of the attribute information of the system parameter is not limited, for example, it can be 1, 2 or other numbers. The attribute fields of the attribute information of the system parameter include but are not limited to field type, format and other identifiers.
[0152] In order to verify whether the functions between the information sender and receiver within the virtualization system meet the expected requirements, manual verification is usually used to compare the information content parsed by the receiver with the alarm information before sending. Among them, part of the content in the alarm information can be selected as the comparison object. For example, only the object identifier of the alarm object in the alarm information is compared to see whether it is consistent and whether they are both host 1. If they are consistent, it is determined that the debugging process of the virtualization system meets the expected requirements.
[0153] For another example, by manually comparing the values of system parameters, for example, the memory usage of host 1 is 80%. If the memory usage of host 1 in the parsed alarm information is 70%, it is determined that the debugging process of the virtualization system does not meet the expected requirements.
[0154] For another example, by simultaneously comparing the object identifier of the alarm object and the value of the system parameter, assuming that the target alarm information is that the memory usage of host 1 is 80%, and the parsed alarm information is that the memory usage of host 1 is 60%, it is determined that the debugging process of the virtualization system does not meet the expected requirements.
[0155] For another example, by comparing the character string length of the attribute information of the system parameter with the character string type of the attribute information at the same time, it is also possible to determine whether the debugging process of the virtualization system meets the expected requirements.
[0156] Through the above-mentioned manual comparison method, the consistency comparison between the alarm information received by the receiver and the original alarm information can be effectively completed, so as to determine whether the data transmission can be carried out accurately during the processing of the alarm information, and verify the accuracy of the function debugging results in the intranet development process.
[0157] The above comparison process is all implemented by manual verification. In order to improve the comparison efficiency and accuracy, an automatic comparison method is also proposed in the embodiment of the present application. The specific steps are as follows:
[0158] S51, configure comparison rules;
[0159] For example, various fields involved in the comparison and the order of arrangement of the fields are preset, and various combinations of the fields, object name and object ID, object name, object ID and system parameters, etc. are set at the same time.
[0160] S52, searching for a first group of fields included in the target alarm information;
[0161] For example, the first set of fields is host 1, memory usage, 80%.
[0162] S53, automatically searching, based on the first group of fields, whether the parsed alarm information contains a second group of fields that matches the first group of fields;
[0163] The condition for determining whether the first group of fields matches the second group of fields may be, but is not limited to, that at least half of the fields in the first group of fields appear in the parsed alarm information.
[0164] For example, the first group of fields is host 1, memory usage, and 80%. First, find out whether the parsed alarm information contains at least two fields of host 1, memory usage, and 80%. If so, they constitute the second group of fields.
[0165] S54, comparing the fields at the same position in the first group of fields and the second group of fields in sequence according to a pre-configured comparison rule;
[0166] If the fields are identical at every position in both sets of fields, then the debugging process is determined to be as expected.
[0167] The automatic comparison method solves the problem of low accuracy of comparison results due to the subjectivity of manual comparison, improves the objectivity of the comparison results, and also improves the comparison efficiency.
[0168] In an exemplary embodiment, the obtaining of target warning information includes:
[0169] Acquire a set of pre-configured alarm items, wherein the alarm items include device parameters of a set of devices required to support the operation process of the virtualization system;
[0170] When the device parameters of a group of devices are greater than or equal to the target threshold, target alarm information is generated.
[0171] For example, assuming that the virtualization system includes 5 hosts and 6 virtual machines, then a set of alarm items are configured for each host and each virtual machine. Specifically, alarm item 1 is the memory usage of host 1, alarm item 2 is parameter 1 of virtual machine 1, alarm item 3 is the motherboard temperature of host 2, etc.
[0172] For each alarm item, a corresponding alarm item threshold (referred to as threshold) is set. During the sending and receiving process of alarm information, whether the alarm item generates alarm information is determined based on whether the alarm item reaches or exceeds the alarm item threshold, thereby realizing real-time monitoring of each device or module in the virtualization system and effectively controlling the conditions for generating alarm information.
[0173] In an exemplary embodiment, the obtaining of target warning information includes:
[0174] After sending the encapsulated alarm information to the virtual receiver in the virtualization system through the target simulation website, the method further includes:
[0175] According to a preset time interval, the current state information of the target alarm item to which the target alarm information belongs is obtained, wherein the current state information is used to indicate whether the target alarm item meets the generation condition of the target alarm information;
[0176] When the current status information indicates that the target alarm item does not meet the generation condition, the alarm cancellation information is sent to the virtual receiver.
[0177] Combined with the description in the above embodiment, it can be known that when it is determined that the alarm shielding function is not turned on, the generated alarm information is distributed according to the preset sending method. After the virtual recipient receives the alarm information, if as the operation process of the virtualization system progresses, if it is detected that the object parameter of the alarm object is less than the preset threshold, the alarm recovery information is generated and distributed, for example, to the virtual recipient.
[0178] The alarm recovery information may include, but is not limited to, indicating a state change from the alarm item generating alarm information to the alarm item canceling the generation of alarm information.
[0179] For example, an exemplary Webhook alarm recovery message is as follows:
[0180] Server current time:2024-06-24 16:36:21
[0181] POST: Send a message to a custom webhook:
[0182] {"id":"e49299798ac19f72018ac50d5fe70636","threId":"62570c1e-4a0a-11ed-a2e8-96b6da1bc6aa",
[0183] "objkey":"1435465a-9e83-4f6e-84b7-149559e17e47",
[0184] "objtype":"HOST",
[0185] "localeObjtype":"Host",
[0186] "ownerName":"100.18.25.142",
[0187] "localeName":"Host memory usage exceeds the major alarm threshold",
[0188] "localeDesc":"(Environment iCenter IP: 100.18.25.249,
[0189] Environmental ID: iCenter00000000)
[0190] Host 100.18.25.142
[0191] Memory usage exceeds the critical warning threshold (20%)",
[0192] "addr":"100.18.25.142",
[0193] "itemKey":"MEM",
[0194] "levels":"CRIT",
[0195] "localeLevels":"Important",
[0196] "createTime":"2024-06-24 10:38:22",
[0197] "deleteTime":"2024-06-24 16:37:25"}
[0198] ","deleteTime":"2024-06-24 16:37:25"}
[0199] By adopting the above method, after completing the sending and receiving of the alarm information, it is still possible to obtain in real time at the preset time interval whether the alarm item currently meets the conditions for generating the alarm information, and generate status change information to adjust the actual status of the alarm item received by the recipient in real time to ensure the validity of the alarm information.
[0200] In the environment of the intranet for research and development, simulation testing can be carried out using the technical solution in the embodiments of the present application. By receiving correct information based on the existing interface, simulation can be performed in a real environment, thereby improving the security and confidentiality of software development in the intranet environment and reducing the risk of exposing intranet data during development and debugging in an external network environment.
[0201] 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. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0202] In this embodiment, a device for processing alarm information is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the modules described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0203] Figure 6 : is a structural block diagram of a device for processing alarm information according to an embodiment of the present application, the device comprising:
[0204] An acquisition unit 602 is used to acquire target alarm information, wherein the target alarm information is information generated in response to a system event in the virtualization system;
[0205] The encapsulation unit 604 is used to encapsulate the target alarm information to obtain the encapsulated alarm information that meets the interface protocol format requirements of the target sending mode;
[0206] The sending unit 606 is used to send the encapsulated alarm information to a virtual recipient in the virtualization system through a target simulated website, wherein the virtual recipient includes a virtual account corresponding to a real account, and the target simulated website is a website generated in the virtualization system;
[0207] The parsing unit 608 is used to parse the encapsulated alarm information to obtain parsed alarm information;
[0208] The first processing unit 610 is used to obtain a target comparison result by comparing the analyzed alarm information with the target alarm information, and determine whether the debugging process of the virtualization system meets the expected requirements according to the target comparison result.
[0209] The above device instructs to encapsulate the target alarm information, and generates a target simulation URL within the virtual system according to the interface protocol of the target sending method, and sends the encapsulated alarm information to the virtual receiver through the target simulation URL, and obtains the parsed alarm information by parsing the encapsulated alarm information received by the virtual receiver, and finally determines whether the adjustment process of the virtual system meets the expected requirements by comparing the parsed alarm information with the target alarm information. In other words, by creating a virtual URL and a virtual receiver within the virtual system, the sending and receiving of alarm information is realized within the virtual system, avoiding connection with the external network, improving the security and confidentiality of the virtual system development in the intranet environment, and achieving the technical effect of improving data security.
[0210] In an exemplary embodiment, the above-mentioned sending unit 606 includes: a first processing module, used to generate a target simulation URL according to the interface protocol of the target sending method, wherein the target sending method is pre-set based on the debugging requirements of the virtualization system; a first sending module, used to send the encapsulated information to the virtual recipient through the target simulation URL when it is determined that the alarm shielding function is not enabled and the virtual recipient has been configured.
[0211] In an exemplary embodiment, the above-mentioned first processing module includes: a first processing sub-module, used to generate a simulation URL template on the operation interface of the virtualization system according to the interface protocol of the target sending method; a second processing sub-module, used to configure the key fields in the simulation URL template according to the account authentication information of the virtual recipient, and obtain the target simulation URL, wherein the account authentication information includes the virtual account and login password of the virtual recipient, and the key fields include the fields in the simulation URL template used to distinguish different virtual recipients.
[0212] In an exemplary embodiment, the above-mentioned parsing unit 608 includes: a parsing module, which is used to parse the encapsulated alarm information to obtain a character string containing alarm parameters; a second processing module, which is used to determine the arrangement rule of the character string according to the header information of the character string, wherein the header information is used to identify the content format of the alarm information; a conversion module, which is used to convert the character string into the parsed alarm information according to the content format.
[0213] In an exemplary embodiment, the first processing unit 610 includes: a third processing module, which is used to compare the first object identifier of the alarm object in the parsed alarm information with the second object identifier of the alarm object in the target alarm information, and when the first object identifier is the same as the second object identifier, determine that the debugging process of the virtualization system meets the expected requirements; or compare the first value of the system parameter in the parsed alarm information with the second value of the system parameter in the target alarm information, and when the first value is the same as the second value, determine that the debugging process of the virtualization system meets the expected requirements; or compare the first object identifier of the alarm object in the parsed alarm information with the second object identifier of the alarm object in the target alarm information, and compare the parsed alarm information. The first value of the system parameter in the target alarm information is compared with the second value of the system parameter in the target alarm information, and when the first object identifier is the same as the second object identifier, and the first value is the same as the second value, it is determined that the debugging process of the virtualization system meets the expected requirements; or the string length of the first attribute information of the system parameter in the parsed alarm information is compared with the string length of the second attribute information of the target system parameter in the target alarm information, and the string type of the first attribute information is compared with the string type of the second attribute information, and when the string length of the first attribute information is the same as the string length of the second attribute information, and the string type of the first attribute information is the same as the string type of the second attribute information, it is determined that the debugging process of the virtualization system meets the expected requirements.
[0214] In an exemplary embodiment, the acquisition unit 602 includes: an acquisition module for acquiring a pre-configured set of alarm items, wherein the alarm items include device parameters of a group of devices required to support the operation process of the virtualization system; and a fourth processing module for generating target alarm information when the device parameters of a group of devices are greater than or equal to a target threshold.
[0215] In an exemplary embodiment, the above-mentioned device also includes: a second processing unit, used to obtain current status information of the target alarm item to which the target alarm information belongs at a preset time interval, wherein the current status information is used to indicate whether the target alarm item meets the generation conditions of the target alarm information; and a third processing unit, used to send cancellation alarm information to the virtual recipient when the current status information indicates that the target alarm item does not meet the generation conditions.
[0216] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0217] 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 method embodiments when running.
[0218] Optionally, in this embodiment, the computer program may be configured to perform the following steps by means of the computer program:
[0219] S1, obtaining target alarm information, wherein the target alarm information is information generated in response to a system event in a virtualization system;
[0220] S2, encapsulating the target alarm information to obtain the encapsulated alarm information that meets the interface protocol format requirements of the target sending mode;
[0221] S3, sending the encapsulated alarm information to a virtual recipient in the virtualization system through a target simulation website, wherein the virtual recipient includes a virtual account corresponding to a real account, and the target simulation website is a website generated in the virtualization system;
[0222] S4, parsing the encapsulated alarm information to obtain parsed alarm information;
[0223] S5, obtaining a target comparison result by comparing the analyzed alarm information with the target alarm information, and determining whether the debugging process of the virtualization system meets the expected requirements according to the target comparison result.
[0224] 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.
[0225] The embodiment of the present application also provides an electronic device, such as Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps in any of the above method embodiments through the computer program.
[0226] Optionally, in this embodiment, the processor 704 may be configured to perform the following steps through a computer program:
[0227] S1, obtaining target alarm information, wherein the target alarm information is information generated in response to a system event in a virtualization system;
[0228] S2, encapsulating the target alarm information to obtain the encapsulated alarm information that meets the interface protocol format requirements of the target sending mode;
[0229] S3, sending the encapsulated alarm information to a virtual recipient in the virtualization system through a target simulation website, wherein the virtual recipient includes a virtual account corresponding to a real account, and the target simulation website is a website generated in the virtualization system;
[0230] S4, parsing the encapsulated alarm information to obtain parsed alarm information;
[0231] S5, obtaining a target comparison result by comparing the analyzed alarm information with the target alarm information, and determining whether the debugging process of the virtualization system meets the expected requirements according to the target comparison result.
[0232] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0233] Alternatively, a person skilled in the art may understand that: Figure 7 The structure shown is for illustration only. Figure 7 The structure of the electronic device is not limited. For example, the electronic device may also include Figure 7 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 7 Different configurations are shown.
[0234] Among them, the memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method for processing alarm information and the blowing device for alarm information in the embodiment of the present application. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, that is, to realize the above-mentioned method for processing alarm information. The memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include a memory remotely arranged relative to the processor 704, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 702 may be specifically, but not limited to, used to store target alarm information, target simulation URLs and other information. As an example, such as Figure 7 As shown, the memory 702 may include, but is not limited to, the acquisition unit 602, the encapsulation unit 604, the sending unit 606, the parsing unit 608, and the first processing unit 610 in the verification device for the soft decoding function. In addition, other module units in the verification device for the soft decoding function may also be included but are not limited to the above, which will not be repeated in this example.
[0235] Optionally, the transmission device 706 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 706 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 706 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0236] In addition, the electronic device further includes: a display 708; and a connection bus 710, which is used to connect various module components in the electronic device.
[0237] In other embodiments, the electronic device may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0238] 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 method embodiments are implemented.
[0239] 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 method embodiments are implemented.
[0240] The embodiments of the present application also provide a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0241] Obviously, it should be clear to those skilled in the art that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0242] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for processing alarm information, characterized in that: include: Acquire target alarm information, wherein the target alarm information is information generated in response to a system event in the virtualization system; Encapsulating the target alarm information to obtain encapsulated alarm information that meets the interface protocol format requirements of the target sending mode; Sending the packaged alarm information to a virtual recipient in the virtualization system via a target simulated URL, wherein the virtual recipient includes a virtual account corresponding to a real account, and the target simulated URL is a URL generated in the virtualization system; Parsing the encapsulated alarm information to obtain parsed alarm information; By comparing the parsed alarm information with the target alarm information, a target comparison result is obtained, and according to the target comparison result, it is determined whether the debugging process of the virtualization system meets the expected requirements.
2. The method according to claim 1, characterized in that The step of sending the encapsulated alarm information to a virtual receiver in the virtualization system through a target simulated website includes: Generating the target simulation URL according to the interface protocol of the target sending mode, wherein the target sending mode is preset based on the debugging requirements of the virtualization system; When it is determined that the alarm shielding function is not enabled and the virtual recipient has been configured, the encapsulated information is sent to the virtual recipient via the target simulated website.
3. The method according to claim 2, characterized in that The step of generating the target simulated website address according to the interface protocol of the target sending mode includes: Generating a simulated URL template on the operation interface of the virtualization system according to the interface protocol of the target sending mode; According to the account authentication information of the virtual recipient, the key fields in the simulation URL template are configured to obtain the target simulation URL, wherein the account authentication information includes the virtual account and login password of the virtual recipient, and the key fields include the fields in the simulation URL template used to distinguish different virtual recipients.
4. The method according to claim 1, characterized in that The step of parsing the encapsulated alarm information to obtain the parsed alarm information includes: Parsing the encapsulated alarm information to obtain a character string containing alarm parameters; Determining an arrangement rule of the character string according to header information of the character string, wherein the header information is used to identify a content format of the alarm information; According to the content format, the character string is converted into the parsed alarm information.
5. The method according to claim 1, characterized in that: The step of obtaining a target comparison result by comparing the parsed alarm information with the target alarm information, and determining whether the debugging process of the virtualization system meets the expected requirements according to the target comparison result includes: Compare the first object identifier of the alarm object in the parsed alarm information with the second object identifier of the alarm object in the target alarm information, and determine that the debugging process of the virtualization system meets the expected requirements when the first object identifier is the same as the second object identifier; or Comparing a first value of the system parameter in the parsed alarm information with a second value of the system parameter in the target alarm information, and determining that the debugging process of the virtualization system meets the expected requirements when the first value is the same as the second value; or Comparing a first object identifier of the alarm object in the parsed alarm information with a second object identifier of the alarm object in the target alarm information, and comparing a first value of a system parameter in the parsed alarm information with a second value of the system parameter in the target alarm information, and determining that the debugging process of the virtualization system meets the expected requirements when the first object identifier is the same as the second object identifier and the first value is the same as the second value; or Compare the string length of the first attribute information of the system parameter in the parsed alarm information with the string length of the second attribute information of the target system parameter in the target alarm information, and compare the string type of the first attribute information with the string type of the second attribute information, and when the string length of the first attribute information is the same as the string length of the second attribute information, and the string type of the first attribute information is the same as the string type of the second attribute information, determine that the debugging process of the virtualization system meets the expected requirements.
6. The method according to claim 1, characterized in that The obtaining of target warning information includes: Acquire a set of pre-configured alarm items, wherein the alarm items include device parameters of a set of devices required to support the operation process of the virtualization system; When the device parameters of the group of devices are greater than or equal to the target threshold, the target alarm information is generated.
7. The method according to any one of claims 1 to 6, characterized in that After sending the encapsulated alarm information to the virtual recipient in the virtualization system through the target simulated website, the method further includes: At a preset time interval, the current status information of the target alarm item to which the target alarm information belongs is obtained, wherein the current status information is used to indicate whether the target alarm item meets the generation condition of the target alarm information; when the current status information indicates that the target alarm item does not meet the generation condition, the cancellation alarm information is sent to the virtual recipient.
8. A device for processing alarm information, characterized in that: include: An acquisition unit, configured to acquire target alarm information, wherein the target alarm information is information generated in response to a system event in the virtualization system; An encapsulation unit, used to encapsulate the target alarm information to obtain the encapsulated alarm information that meets the interface protocol format requirements of the target sending mode; A sending unit, configured to send the encapsulated alarm information to a virtual recipient in the virtualization system through a target simulated website, wherein the virtual recipient includes a virtual account corresponding to a real account, and the target simulated website is a website generated in the virtualization system; A parsing unit, used for parsing the encapsulated alarm information to obtain parsed alarm information; The first processing unit is used to obtain a target comparison result by comparing the parsed alarm information with the target alarm information, and determine whether the debugging process of the virtualization system meets the expected requirements according to the target comparison result.
9. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor. When executed, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
