CN113794597B - Alarm information processing method, system, electronic equipment and storage medium - Google Patents

Alarm information processing method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113794597B
CN113794597B CN202111081841.6A CN202111081841A CN113794597B CN 113794597 B CN113794597 B CN 113794597B CN 202111081841 A CN202111081841 A CN 202111081841A CN 113794597 B CN113794597 B CN 113794597B
Authority
CN
China
Prior art keywords
subscription
alarm
service
micro
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111081841.6A
Other languages
Chinese (zh)
Other versions
CN113794597A (en
Inventor
朱宏
王瑜
赵越
兰婷
袁伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111081841.6A priority Critical patent/CN113794597B/en
Publication of CN113794597A publication Critical patent/CN113794597A/en
Application granted granted Critical
Publication of CN113794597B publication Critical patent/CN113794597B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0604Management of faults, events, alarms or notifications using filtering, e.g. reduction of information by using priority, element types, position or time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The method realizes automatic deployment of the alarm subscription service after receiving the subscription request, and automatic removal of the relevant alarm subscription service after receiving the subscription cancellation request, namely, dynamic expansion and contraction of the alarm subscription service are realized, and through storing all alarm information into the kafka module and storing the subscription information into the zookeer module, when the system fails, the subscription information and the alarm information are not lost, after the system fails, the alarm subscription service can be restored according to the subscription information, the security of the alarm information and the subscription information under the condition of the system failure is ensured, and the reliability of the system is improved.

Description

Alarm information processing method, system, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method, a system, an electronic device, and a storage medium for processing alarm information.
Background
When the communication network fails, the failure cause is found out quickly, which is an important ring for solving the failure of the communication network, and the failure cause can be obtained quickly and the positioning of the failure can be quickened by subscribing the failure information of the service equipment from the server through the alarm subscription client.
At present, the configuration of the subscription of the alarm information and the pushing of the alarm information can be automatically completed by an alarm system, and the operations of subscribing, screening, pushing, unsubscribing and the like of the alarm information are not required to be manually configured.
Although an alarm subscription system capable of automatically running exists at present, the current alarm subscription system lacks guarantee measures, so that the safety of subscription information cannot be effectively protected when the alarm subscription system fails, and the subscription information is easy to lose.
Disclosure of Invention
The application provides an alarm information processing method, an alarm information processing system, electronic equipment and a storage medium, which are used for solving the problem that when an alarm subscription system fails, the alarm information and subscription information are easy to lose.
In a first aspect, the present application provides an alarm information processing method, where the method is applied to an alarm information processing system, and the alarm information processing system includes: kubernetes module, zookeeper module, and kafka module; the Kubernetes module comprises an alarm subscription management micro-service module, an alarm subscription distribution micro-service module and a Kubernetes management module; the method comprises the following steps:
The method comprises the steps that an alarm subscription management micro-service module receives a subscription request sent by an alarm subscription client, wherein the subscription request comprises alarm filtering conditions; the alarm subscription management micro-service module generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module; the alarm subscription management micro-service module sends creation topic information to the kafka module, and the kafka module creates a subscription kafka topic corresponding to a subscription identifier according to the creation topic information; the method comprises the steps that an alarm subscription management micro-service module sends a request for creating an alarm subscription distribution micro-service to a Kubernetes management module, and the Kubernetes management module creates an alarm subscription distribution micro-service module according to the request for creating the alarm subscription distribution micro-service; the alarm subscription management micro-service module sends the address and the topic name of the subscription kafka topic to an alarm subscription client; the alarm subscription distribution micro-service module acquires the whole alarm information and acquires subscription information from the zookeeper module; screening the total alarm information according to the alarm filtering conditions in the subscription information to obtain target alarm information meeting the alarm filtering conditions; the alarm subscription distribution micro-service module stores the target alarm information into the subscription kafka theme; the alarm subscription client acquires target alarm information from the subscription kafka topic according to the address and topic name of the subscription kafka topic.
In one possible implementation, the alert subscription management micro-service module includes an alert subscription management micro-service node, the alert subscription management micro-service node includes an alert subscription management micro-service master node and an alert subscription management micro-service slave node; after the alert subscription management micro-service module receives the subscription request sent by the alert subscription client, the method further comprises:
the alarm subscription management micro-service module creates a new alarm subscription management micro-service node; the new alarm subscription management micro-service node broadcasts new node joining information to other alarm subscription management micro-service nodes; when other alarm subscription management micro-service nodes receive new node joining information, all alarm subscription management micro-service nodes vote, and elect an alarm subscription management micro-service master node and an alarm subscription management micro-service slave node;
correspondingly, the alert subscription management micro-service module generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alert filtering condition as subscription information to the zookeeper module, which comprises the following steps:
the alarm subscription management micro-service main node generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module;
Accordingly, the alert subscription management micro-service module sends creation topic information to the kafka module, and the kafka module creates a subscription kafka topic corresponding to a subscription identifier according to the creation topic information, including:
the alarm subscription management micro-service master node sends creation topic information to a kafka module, and the kafka module creates a subscription kafka topic corresponding to a subscription identifier according to the creation topic information;
accordingly, the alert subscription management micro-service module sends a request for creating alert subscription distribution micro-service to the Kubernetes management module, and the Kubernetes management module creates an alert subscription distribution micro-service module according to the request for creating alert subscription distribution micro-service, including:
the method comprises the steps that an alarm subscription management micro-service master node sends an alarm subscription distribution micro-service request to a Kubernetes management module, and the Kubernetes management module creates an alarm subscription distribution micro-service module according to the alarm subscription distribution micro-service request;
accordingly, the alert subscription management micro-service module sends the address and the topic name of the subscription kafka topic to the corresponding alert subscription client, including:
the alarm subscription micro-service master node sends the address and the topic name of the subscription kafka topic to the alarm subscription micro-service slave node, and the alarm subscription micro-service slave node sends the address and the topic name of the subscription kafka topic to the alarm subscription client.
In one possible implementation, all alert subscription management micro-service nodes vote to elect an alert subscription management micro-service master node and an alert subscription management micro-service slave node, including:
each alarm subscription management micro-service node sends node information to other alarm subscription management micro-service nodes and receives the node information sent by the other alarm subscription management micro-service nodes, wherein the node information comprises node characteristics; each alarm subscription management micro-service node projects the vote to the alarm subscription management micro-service node with the largest capacity by comparing the capacities; the alarm subscription micro-service module sets the alarm subscription micro-service node with the most votes as an alarm subscription management micro-service master node, and other alarm subscription management micro-service nodes as alarm subscription management micro-service slave nodes.
In one possible implementation, the alert subscription distribution microservice module obtains the full alert information, including: the kafka module monitors the generation of alarm information and stores each piece of detected alarm information into the full alarm kafka theme; the alert subscription distribution micro-service module obtains all alert information from the full alert kafka topic. In one possible implementation, after electing the alert subscription management micro service master node and the alert subscription management micro service slave node, the method further includes: the alarm subscription management micro-service main node receives a subscription cancellation request, sends a subscription termination instruction to the Kubernetes module according to the subscription cancellation request, sends a subscription information deletion instruction to the zookeeper module, and sends a theme deletion instruction to the kafka module; the Kubernetes module terminates the alarm subscription distribution micro-service corresponding to the subscription identification according to the subscription termination instruction; the zookeeper module deletes the subscription information corresponding to the subscription identification according to the subscription information deleting instruction; the kafka module deletes the subscription kafka topic corresponding to the subscription identification according to the topic deletion instruction; the subscription management micro-service module returns logout success information to the alarm subscription client.
In one possible implementation manner, before the alarm subscription management micro-service master node receives the subscription cancellation request, sends a subscription cancellation instruction to the Kubernetes module according to the subscription cancellation request, sends a subscription information deletion instruction to the zookeeper module, and sends a topic deletion instruction to the kafka module, the method further comprises: the subscription management micro-service slave node detects the state of an alarm subscription client; when the state of the alarm subscription client is abnormal or the subscription management micro-service slave node receives a subscription cancellation request sent by the alarm subscription client, the subscription management micro-service slave node sends the subscription cancellation request to the alarm subscription management micro-service master node.
In a second aspect, the present application provides an alarm information processing system, including: kubernetes module, zookeeper module, and kafka module; the Kubernetes module comprises an alarm subscription management micro-service module, an alarm subscription distribution micro-service module and a Kubernetes management module;
the alarm subscription management micro-service module is used for receiving a subscription request sent by an alarm subscription client, wherein the subscription request comprises alarm filtering conditions;
the alarm subscription management micro-service module is also used for generating a subscription identifier according to the subscription request and storing the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module;
The alarm subscription management micro-service module is also used for sending the creation topic information to the kafka module, and the kafka module creates a subscription kafka topic corresponding to the subscription identification according to the creation topic information;
the alarm subscription management micro-service module is also used for sending a request for creating alarm subscription distribution micro-service to the Kubernetes management module;
the system comprises a Kubernetes management module, a user interface module and a user interface module, wherein the Kubernetes management module is used for creating an alarm subscription distribution micro-service module according to an alarm subscription distribution micro-service request;
the alarm subscription management micro-service module is also used for sending the address and the topic name of the subscription kafka topic to the alarm subscription client;
the alarm subscription distribution micro-service module is also used for acquiring the total alarm information and acquiring subscription information from the zookeeper module; screening the total alarm information according to the alarm filtering conditions in the subscription information to obtain target alarm information meeting the alarm filtering conditions;
the alarm subscription distribution micro-service module is used for storing target alarm information into a subscription kafka theme;
and the alarm subscription client is used for acquiring target alarm information from the subscription kafka theme according to the address and the theme name of the subscription kafka theme.
In one possible implementation, the alert subscription management micro-service module includes an alert subscription management micro-service node, the alert subscription management micro-service node includes an alert subscription management micro-service master node and an alert subscription management micro-service slave node; after receiving the subscription request sent by the alert subscription client, the alert subscription management micro-service module:
The alarm subscription management micro-service module is also used for creating a new alarm subscription management micro-service node;
the new alarm subscription management micro-service node broadcasts new node joining information to other alarm subscription management micro-service nodes;
when other alarm subscription management micro-service nodes receive new node joining information, all alarm subscription management micro-service nodes vote, and elect an alarm subscription management micro-service master node and an alarm subscription management micro-service slave node;
correspondingly, the alert subscription management micro-service module is further configured to generate a subscription identifier according to the subscription request, and store the subscription identifier and the alert filtering condition as subscription information to the zookeeper module, where the alert subscription management micro-service module includes:
the alarm subscription management micro-service main node is used for generating a subscription identifier according to a subscription request and storing the subscription identifier and an alarm filtering condition as subscription information to the zookeeper module;
accordingly, the alert subscription management micro-service module is configured to send creation topic information to the kafka module, where the kafka module creates a subscription kafka topic corresponding to a subscription identifier according to the creation topic information, and includes:
the alarm subscription management micro-service master node is also used for sending the creation topic information to a kafka module, and the kafka module creates a subscription kafka topic corresponding to a subscription identifier according to the creation topic information;
Correspondingly, the alarm subscription management micro-service module is also used for sending a request for creating alarm subscription distribution micro-service to the Kubernetes management module;
the Kubernetes management module is further configured to create an alert subscription distribution micro-service module according to an alert subscription distribution micro-service request, including:
the alarm subscription management micro-service main node is also used for sending a request for creating alarm subscription distribution micro-service to the Kubernetes management module;
the Kubernetes management module is also used for creating an alarm subscription distribution micro-service module according to the alarm subscription distribution micro-service request;
accordingly, the alert subscription management micro-service module is further configured to send an address and a topic name of a subscription kafka topic to a corresponding alert subscription client, including:
the alarm subscription micro-service master node is further used for sending the address and the topic name of the subscription kafka topic to the alarm subscription micro-service slave node, and the alarm subscription micro-service slave node sends the address and the topic name of the subscription kafka topic to the alarm subscription client.
In a third aspect, the present application provides an alert information processing electronic device, including: a processor and a memory;
the memory stores computer-executable instructions;
The processor executes computer-executable instructions stored in the memory, causing the processor to perform the alert information processing method according to any one of the first aspects.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the alert information processing method as in the first aspect when executed by a processor.
According to the alarm information processing method, the system, the electronic equipment and the storage medium, after the alarm subscription management micro-service module receives the subscription request sent by the alarm subscription client, the alarm subscription management micro-service module can store subscription information to the zookeeper module according to the alarm subscription request, when the system fails, the subscription information cannot be lost, and after the system is recovered, the subscription management micro-service module and/or the subscription distribution micro-service module can be recovered according to the subscription information stored in the zookeeper, so that the reconstruction of alarm subscription service is realized, and the reliability of the system is improved. The alarm subscription management micro-service module also sends a request for creating alarm subscription distribution micro-service to the Kubernetes management module, and the Kubernetes management module can create an alarm subscription distribution micro-service module corresponding to the alarm subscription client according to the request for creating alarm subscription distribution micro-service, so that automatic deployment of the alarm subscription distribution micro-service module is realized. The number of the alarm subscription clients corresponding to each alarm subscription distribution micro-service can be reduced by deploying a plurality of alarm subscription distribution micro-service modules, so that the service interruption possibility caused by the fault of the alarm subscription distribution micro-service modules is reduced. Meanwhile, the alarm subscription management micro-service module can also send creation topic information to the kafka module, the kafka module can create a subscription kafka topic corresponding to the alarm subscription client according to the creation topic information, and the alarm subscription management micro-service module can also send an address and topic name of the subscription kafka topic to the corresponding alarm subscription client so as to achieve the effect that the alarm subscription client can acquire fault information from the alarm information processing system. In addition, the kafka module stores all detected alarm information into the full alarm kafka theme, so that all alarm information can be prevented from being lost when the system fails, and the system stability is improved. Finally, the alarm subscription distribution micro-service module can extract all alarm information from the full alarm kafka theme, screen according to the subscription information to obtain target alarm information, and store the target alarm information into the subscription kafka theme, so that the alarm subscription client can obtain the wanted alarm information.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture of an alarm information processing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for processing alarm information according to an embodiment of the present disclosure;
FIG. 3 is a second flowchart of an alarm information processing method according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a subscription de-subscription process according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a subscription management micro-service module according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Communication networks play an increasingly important role in current social life, when a communication network fails, a failure cause needs to be found quickly, and then, alarm information sent by service equipment needs to be collected and appropriate alarm information is sent to technicians, so that a set of alarm information collection and distribution system is needed to improve the positioning efficiency of failure cause notification.
At present, the alarm containerization service can realize automatic management of the system, but specific realization processes of the alarm information subscription and the alarm information distribution need to be further explained, and when the system fails, the alarm subscription information and the alarm information are easy to lose, and the alarm service is difficult to recover after the system is recovered.
In view of the above problems, the present application proposes an alert information processing method, in which, by using a Kubernetes module to containerize a subscription management micro-service module and an alert subscription distribution micro-service module, the alert subscription request is received and the alert information is distributed to an alert subscription client. And after receiving the alarm subscription request, the alarm information processing system also generates a subscription identifier, and stores the subscription identifier and subscription information into the zookeeper module, so that the subscription information is not lost when the alarm information processing system fails. In addition, the alarm information processing system can store the target alarm information into the subscription kafka theme before sending the target alarm information to the alarm subscription client, so that the target alarm information is not lost when the alarm information processing system fails.
The alarm information processing method, the alarm information processing system, the electronic equipment and the storage medium can be applied to the scene of alarm information subscription and distribution. The alarm subscription information may be alarm information sent to the alarm information processing system after the network service equipment fails, the subscription of the alarm information may be that the alarm subscription client subscribes to a certain type of alarm information, and the distribution of the alarm information is that the alarm information processing system screens out target alarm information selected by the alarm subscription client and sends the target alarm information to the alarm subscription client.
Fig. 1 is a schematic diagram of a system architecture of an alarm information processing method according to an embodiment of the present application, as shown in fig. 1, a service device is shown on the left side, where the service device may include a switch 101, a server 102, and the like, and when the switch 101, the server 102) fails, alarm information is sent to the alarm information processing system 103, and each piece of alarm information may be stored by the alarm information processing system 103. The alarm information processing system 103 may also receive a subscription request sent by an alarm subscription client, where the alarm subscription client may be a mobile phone 104, a computer 105, and the like, and screen the full alarm according to an alarm filtering condition in the subscription request, and send target alarm information obtained by screening to the alarm subscription client.
In the alert information processing system, an alert subscription management micro service module 106, an alert subscription distribution micro service module 107, a zookeeper module 108, a kafka module (not shown in the figure), a full-volume alert kafka module 109, a subscription kafka topic module 110, and a kubernetes management module 111 are integrated.
For example, the alert subscription management micro-service module 106 may receive a subscription request sent by an alert subscription client, generate a subscription identifier according to the subscription request, store the subscription identifier and an alert filtering condition in the subscription request to the zookeeper module 108, and send creation topic information to the kafka module, which creates a subscription kafka topic module 110 according to the creation topic information.
Illustratively, when the alert subscription management micro-service module 106 receives a subscription request sent by an alert subscription client, it is further configured to send a request for creating an alert subscription distribution micro-service module to the kubernetes management module 111.
Illustratively, the kubernetes management module 111 is used to create the alert subscription distribution micro-service module 107.
Illustratively, the full alert kafka module 109 is used to detect and save alert information sent by a malfunctioning service device.
Illustratively, the alert subscription distribution micro-service module 107 is configured to extract all alert information from the full alert kafka module 109, obtain alert filtering conditions from the zookeeper module 108, screen all alert information according to the alert filtering conditions, and store alert information passing the screening into the subscription kafka topic module 110.
Illustratively, the alert subscription management micro-service module 106 is further configured to send the address and the topic name corresponding to the subscription kafka topic module 110 to the corresponding alert subscription client.
Exemplary, alert subscription clients are used to obtain targeted alert information from subscribing to kafka topics
It should be understood that the number of service devices that fail in the example environment is merely exemplary, and that a greater or lesser number is within the scope of the present application. Also, in the example operational scenario described above, the service device may be a facility in a base station, a server, a switch, or any other device for providing network services, and the alert subscription client may be a server, a personal computer, a server, a tablet, a cell phone, a palmtop (Personal Digital Assistant, PDA), a notebook, or any other computing device having networking capabilities. The alarm information processing system may be implemented with a server or a server group. While the network used to transfer data between the alert information processing system and the alert subscription client or malfunctioning service device may include various types of wired and wireless networks such as, but not limited to: internet, local area network, wireless fidelity (Wireless Fidelity, WIFI), wireless local area network (Wireless Local Area Networks, WLAN), cellular communication network (general packet radio service technology (General Packet Radio Service, GPRS), code division multiple access (Code Division Multiple Access, CDMA), 2G/3G/4G/5G cellular network), satellite communication network, and the like.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of an alarm information processing method according to an embodiment of the present application, where the method may be executed by any device that executes the method, and the device may be implemented by software and/or hardware. In this embodiment, the apparatus may be integrated in an alarm information processing system as shown in fig. 1. As shown in fig. 2, the information processing method provided in the embodiment of the present application includes the following steps:
s201: the alarm subscription management micro-service module receives a subscription request sent by an alarm subscription client, wherein the subscription request comprises alarm filtering conditions.
In this step, the subscription request may further include information about subscription such as a message type, a subscription time, URL (Uniform Resource Locator ) of health check, whether or not it is a permanent registration, and the like. The message type is a subscription request or a logout request, the subscription time comprises the time for sending the subscription request and the duration for subscribing the alarm information, and the URL for health check is an interface for detecting the state of the alarm subscription client by the subsequent alarm information processing system. The duration of subscribing to the alarm information specifically includes: one year or two years. The alarm filtering condition may be a limitation on the type of alarm information, such as a service equipment shutdown, a service equipment network failure, etc.; also, the source of the alarm information may be defined, for example: the alarm information originates from the base station, the alarm information originates from the exchange, etc.
S202: and the alarm subscription management micro-service module generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module.
In this step, the subscription identifier corresponds to the alert subscription client that sends the subscription request one by one, and the subscription identifier may include a string of numbers, a string of letters, a combination of a string of letters, and so on.
After receiving the subscription request, the alarm subscription management micro-service module extracts the alarm filtering condition in the subscription request, generates a subscription identifier uniquely corresponding to the client sending the subscription request according to the subscription request, and finally stores the subscription identifier and the alarm filtering condition together into the zookeeper module, wherein the subscription identifier and the alarm filtering condition are corresponding.
S203: the alert subscription management micro-service module sends the creation topic information to the kafka module, and the kafka module creates a subscription kafka topic corresponding to the subscription identification according to the creation topic information.
In this step, creating topic information can include subscribing to the identity and creating a topic request. Subscription kafka topics may store subscription identities and other information.
S204: the alarm subscription management micro-service module sends a request for creating an alarm subscription distribution micro-service to the Kubernetes management module, and the Kubernetes management module creates an alarm subscription distribution micro-service module according to the request for creating the alarm subscription distribution micro-service.
In this step, the alert subscription distribution micro-service module may correspond to a client that sends a subscription request, and the alert subscription distribution micro-service module serves a specific alert subscription client. That is, the Kubernetes management module creates an alert subscription distribution micro-service module corresponding to the subscription client according to the create alert subscription distribution micro-service request.
In one possible implementation, the Kubernetes management module creates an alert subscription distribution microservice module according to the create alert subscription distribution microservice request, or may configure an existing alert subscription distribution microservice module to add services to a new alert subscription client.
S205: the alert subscription management micro-service module sends the address and topic name of the subscription kafka topic to the alert subscription client.
In this step, the subscription kafka topics have unique addresses and topic names, and each subscription kafka topic is also in one-to-one correspondence with an alert subscription client. The alert subscription management micro-service module may extract an address and a topic name of a subscription kafka topic corresponding to the alert subscription client and send the address and topic name of the subscription kafka topic to the alert subscription client that sent the subscription request.
S206: the alarm subscription distribution micro-service module acquires the whole alarm information and acquires subscription information from the zookeeper module; and screening the total alarm information according to the alarm filtering conditions in the subscription information to obtain target alarm information meeting the alarm filtering conditions.
In this step, the full alarm information is the full alarm information of the fault device, and the full alarm information can be detected by the kafka module.
In one possible implementation, the alert subscription distribution microservice module obtains the full alert information, which may be: the kafka module monitors the generation of alarm information and stores each piece of detected alarm information into the full alarm kafka theme; the alert subscription distribution micro-service module obtains all alert information from the full alert kafka topic.
Specifically, the kafka module detects the alarm information generated by the service device and stores the alarm information generated by the service device in the full alarm kafka theme, and at this time, the full alarm kafka theme stores all the alarm information. And the alert subscription distribution micro-service module may extract all alert information from the full alert kafka topic.
By storing all the obtained alarm information into the full alarm kafka theme, the system is ensured not to lose all the obtained alarm information when the system fails, and the convenience can be provided for the extraction of the alarm information in the subsequent process.
The subscription distribution micro-service module can also acquire subscription information from the zookeeper module, and then screen all acquired alarm information according to alarm filtering conditions in the subscription information to acquire alarm information which is selected by an alarm subscription client and needs to be acquired.
S207: the alarm subscription distribution micro-service module stores the target alarm information into the subscription kafka theme;
in this step, the target alarm information is the alarm information obtained by screening all alarm information according to the alarm filtering condition.
The alert subscription distribution micro-service stores the target alert information into the subscription kafka theme corresponding to the subscription identification according to the subscription information.
S208: the alarm subscription client acquires target alarm information from the subscription kafka topic according to the address and topic name of the subscription kafka topic.
In this step, since the alert subscription client has obtained the address and the topic name of the subscription kafka topic corresponding to itself, it is possible to connect with the subscription kafka topic according to the address and the topic name of the subscription kafka topic and acquire the target subscription information.
In this embodiment, after the alert subscription management micro-service module receives the subscription request sent by the alert subscription client, the alert subscription management micro-service module may store subscription information to the zookeeper module according to the alert subscription request, when the system fails, the subscription information may not be lost, and after the system recovers, the subscription management micro-service module and/or the subscription distribution micro-service module may be recovered according to the subscription information stored in the zookeeper, so as to implement reconstruction of the alert subscription service, and ensure security of the subscription information. The alarm subscription management micro-service module also sends a request for creating alarm subscription distribution micro-service to the Kubernetes management module, and the Kubernetes management module can create an alarm subscription distribution micro-service module corresponding to the alarm subscription client according to the request for creating alarm subscription distribution micro-service, so that automatic deployment of the alarm subscription distribution micro-service module is realized. The number of the alarm subscription clients corresponding to each alarm subscription distribution micro-service can be reduced by deploying a plurality of alarm subscription distribution micro-service modules, so that the service interruption possibility caused by the fault of the alarm subscription distribution micro-service modules is reduced. Meanwhile, the alarm subscription management micro-service module can also send creation topic information to the kafka module, the kafka module can create a subscription kafka topic corresponding to the alarm subscription client according to the creation topic information, and the alarm subscription management micro-service module can also send an address and topic name of the subscription kafka topic to the corresponding alarm subscription client so as to achieve the effect that the alarm subscription client can acquire fault information from the alarm information processing system. In addition, the kafka module stores all detected alarm information into the full alarm kafka theme, so that all alarm information can be prevented from being lost when the system fails, and the system stability is improved. Finally, the alarm subscription distribution micro-service module can extract all alarm information from the full alarm kafka theme, screen according to the subscription information to obtain target alarm information, and store the target alarm information into the subscription kafka theme, so that the alarm subscription client can obtain the wanted alarm information.
Fig. 3 is a schematic flow chart of an alarm information processing method according to an embodiment of the present application. In this embodiment, on the basis of the embodiment provided in fig. 2, the alert subscription management micro-service module includes an alert subscription management micro-service node, where the alert subscription management micro-service node includes an alert subscription management micro-service master node and an alert subscription management micro-service slave node. The process of electing an alert subscription management microservice master node is also described after step S201 above, as detailed below:
s301: the alert subscription management micro-service module creates a new alert subscription management micro-service node.
In this step, the alert subscription management micro-service node may be regarded as an instance lifted by the alert subscription management micro-service module, where the instance is an independent computing unit. The new alert subscription management microservice node is not necessarily the master node or the slave node.
S302: the new alert subscription management micro-service node broadcasts new node joining information to other alert subscription management micro-service nodes.
In this step, the node joining information includes notification of new node joining and voting preparation information.
S303: and after the other alarm subscription management micro-service nodes receive the new node joining information, all the alarm subscription management micro-service nodes vote to elect an alarm subscription management micro-service master node and an alarm subscription management micro-service slave node.
In one possible implementation manner, all the alert subscription management micro-service nodes vote, and elect an alert subscription management micro-service master node and an alert subscription management micro-service slave node, which may be that each alert subscription management micro-service node sends node information to other alert subscription management micro-service nodes and receives node information sent by other alert subscription management micro-service nodes, where the node information includes node characteristics; each alarm subscription management micro-service node projects the vote to the alarm subscription management micro-service node with the largest capacity by comparing the capacities; the alarm subscription micro-service module sets the alarm subscription micro-service node with the most votes as an alarm subscription management micro-service master node, and other alarm subscription management micro-service nodes as alarm subscription management micro-service slave nodes.
In this step, voting may include sending the selected node identification to the alert subscription management micro-service module, or may include sending the selected node identification to any module that may perform voting data statistics, such as a zookeeper module. The election process may include the alert subscription management micro-service module selecting the node with the highest number of votes as the alert subscription management micro-service master node, and other alert subscription management micro-service nodes as slave nodes, and correspondingly, other modules selecting the node with the highest number of votes as the master node and setting the alert subscription management micro-service module. The node characteristics include capacity, node mark, timestamp and other information, and the mode of sending the node information to other alarm subscription management micro-service nodes by each alarm subscription management micro-service node may include directly sending the node information to other nodes, or may be sent to the alarm subscription management micro-service module or the zookeeper module first, and then forwarded to other alarm subscription management micro-service nodes by the alarm subscription management micro-service module or the zookeeper module.
The size of all the alarm subscription management micro-service nodes can be compared in a voting mode of all the alarm subscription management micro-service nodes, so that the alarm subscription management micro-service node with the largest capacity is selected as an alarm subscription management micro-service master node, and the alarm subscription management micro-service master node can have enough memory processing information to ensure smooth operation of a system.
S304: and the alarm subscription management micro-service master node generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module.
S305: the alert subscription management micro-service master node sends the creation topic information to a kafka module, and the kafka module creates a subscription kafka topic corresponding to the subscription identification according to the creation topic information.
S306: the alarm subscription management micro-service master node sends an alarm subscription distribution micro-service request to the Kubernetes management module, and the Kubernetes management module creates an alarm subscription distribution micro-service module according to the alarm subscription distribution micro-service request.
S307: the alarm subscription micro-service master node sends the address and the topic name of the subscription kafka topic to the alarm subscription micro-service slave node, and the alarm subscription micro-service slave node sends the address and the topic name of the subscription kafka topic to the alarm subscription client.
In this embodiment, by electing the alert subscription management micro-service master node, the alert subscription management micro-service node with the largest capacity may be selected as the master node, other alert subscription management micro-service nodes may be used as slave nodes, and the alert subscription management micro-service master node may be responsible for receiving information of the alert subscription management micro-service slave node and transmitting the information to the Kubernetes module, the zookeeper module, and the kafka module. The alarm subscription management micro-service slave node can monitor the state of the alarm subscription client and timely feed back the state to the alarm subscription management micro-service master node, so that the workload of a single node is reduced, meanwhile, paralysis of the whole system caused by faults of the single node is prevented, and when the alarm subscription management micro-service slave node is disconnected, the alarm subscription management micro-service slave node can be selected again, and the stability of the system is maintained.
In one possible implementation, the alert subscription management microservice master node election may also be performed when the alert subscription management microservice master node fails.
Specifically, when the main node of the alarm subscription management micro-service fails, an election process of performing an election of the main node of the alarm subscription management micro-service may be: when the alarm subscription micro-service slave nodes cannot be connected with the alarm subscription micro-service master node, broadcasting voting requests to other alarm subscription micro-service slave nodes by one alarm subscription micro-service slave node, and then voting by all alarm subscription management micro-service nodes to elect a new alarm subscription management micro-service master node. The election process is similar to when a new alert subscription management micro-service node is created and will not be described in detail here. In this embodiment, by selecting a new alert subscription management micro-service master node, the alert subscription service can be prevented from being stopped due to the failure of the alert subscription management micro-service master node, and the reliability of the alert subscription service is improved.
Fig. 4 is a schematic diagram of a subscription de-subscription process according to an embodiment of the present application. As shown in fig. 4, this embodiment mainly describes a process of detecting the status of an alert subscription and de-subscribing, and after selecting the alert subscription management micro-service master node and the alert subscription management micro-service slave node in step S303, the method further includes:
s401: the subscription management micro-service slave node may detect an alert subscription client state.
In this step, the subscription management micro-service slave node may detect the alert subscription client state by means of heartbeat detection. The heartbeat detection is that the subscription management micro-service slave node sends a data feedback request to the alarm subscription client every other preset time, receives the data returned by the alarm subscription client, and if the data returned by the alarm subscription client can be received in a plurality of preset times, the alarm subscription client and the subscription management micro-service slave node are indicated to be normally communicated, otherwise, the communication between the alarm subscription client and the subscription management micro-service slave node is indicated to be disconnected; the heartbeat detection can be uniformly distributed by each alarm subscription management micro-service slave node, and can be realized by detecting a plurality of alarm subscription clients by one alarm subscription management micro-service slave node or one-to-one correspondence. Wherein the predetermined time may be several seconds or several minutes.
S402: when the state of the alarm subscription client is abnormal or the subscription management micro-service slave node receives a subscription cancellation request sent by the alarm subscription client, the subscription management micro-service slave node sends the subscription cancellation request to the alarm subscription management micro-service master node.
In this step, the alarm subscription client state anomaly includes that the communication between the alarm subscription client and the subscription management micro-service slave node has been disconnected, and the alarm subscription client data feedback anomaly.
S403: the alarm subscription management micro-service main node receives the subscription cancellation request, sends a subscription termination instruction to the Kubernetes module, sends a subscription information deletion instruction to the zookeeper module and sends a theme deletion instruction to the kafka module according to the subscription cancellation request.
In this step, the alert subscription management micro-service master node may generate a termination subscription instruction, a subscription information deletion instruction, and a topic deletion instruction corresponding to the subscription identifier by logging off the subscription request.
S404: the Kubernetes module terminates the alert subscription distribution microservices corresponding to the subscription identification according to the termination subscription instruction.
In this step, the terminating the alert subscription distribution micro-service may be stopping the operation of the alert subscription distribution micro-service module corresponding to the subscription identifier or removing the alert subscription distribution micro-service module corresponding to the subscription identifier.
S405: and the zookeeper module deletes the subscription information corresponding to the subscription identification according to the subscription information deleting instruction.
In this step, deleting the subscription information corresponding to the subscription identification may include erasing the subscription information corresponding to the subscription identification from the memory.
S406: the kafka module deletes the subscription kafka topic corresponding to the subscription identification according to the topic deletion instruction.
In this step, deleting the subscription kafka topic corresponding to the subscription identification may include deleting or stopping the subscription kafka topic corresponding to the subscription identification.
S407: the subscription management micro-service module returns logout success information to the alarm subscription client.
In this step, the return of the logout success information to the alert subscription client may be: the subscription management micro-service master node sends cancellation success information to the corresponding alarm subscription management micro-service slave node, and the alarm subscription management micro-service slave node forwards the cancellation success information to the corresponding alarm subscription client; it may also be: the alarm subscription management micro-service slave node directly transmits log-off success information to the corresponding alarm subscription client.
In one possible implementation manner, after the subscription management micro-service module returns the logout success information to the alert subscription client, if the alert subscription management micro-service slave node corresponding to the logout information only serves the alert subscription client, the alert subscription management micro-service slave node may be deleted, and if the alert subscription management micro-service slave node corresponding to the logout information serves a plurality of alert subscription clients, the alert subscription management micro-service slave node is reserved.
In this embodiment, by detecting the state of the alert subscription client or receiving a logout subscription request of the alert subscription client, it can be known whether the alert subscription client needs to continue subscribing at present, and whether the alert subscription distribution micro-service module needs to process the corresponding alert information.
Related resource release can be realized by terminating the alarm subscription distribution micro-service corresponding to the subscription identification, deleting the subscription information corresponding to the subscription identification, deleting the subscription kafka theme corresponding to the subscription identification and deleting the alarm subscription management micro-service slave node corresponding to the alarm subscription client, so that the contraction of processing capacity is completed, and the coordination and unification among all modules of the system can be ensured by the alarm subscription management micro-service master node for processing the cancellation subscription request.
With continued reference to fig. 1, as shown in fig. 1, the alarm information processing system 103 provided in the embodiment of the present application includes a Kubernetes module (not shown in the figure), a zookeeper module 108, and a kafka module (not shown in the figure); the Kubernetes modules include an alert subscription management micro-service module 106, an alert subscription distribution micro-service module 107, and a Kubernetes management module 111.
The alert subscription management micro-service module 106 is configured to receive a subscription request sent by an alert subscription client, where the subscription request includes an alert filtering condition.
The alert subscription management micro-service module 106 is further configured to generate a subscription identifier according to the subscription request, and store the subscription identifier and the alert filtering condition as subscription information to the zookeeper module 108.
The alert subscription management micro service module 106 is also used to send the creation topic information to the kafka module.
And the kafka module is used for creating a subscription kafka topic 110 corresponding to the subscription identification according to the topic creation information.
The alert subscription management micro-service module 106 is further configured to send a create alert subscription distribution micro-service request to the Kubernetes management module 111.
The Kubernetes management module 111 is configured to create an alert subscription distribution microservice module 107 according to the create alert subscription distribution microservice request.
The alert subscription management micro-service module 106 is further configured to send the address and topic name of the subscription kafka topic 110 to the alert subscription client.
An alert subscription distribution micro-service module 107, configured to obtain the full alert information, and obtain subscription information from a zookeeper module 108; and screening the total alarm information according to the alarm filtering conditions in the subscription information to obtain target alarm information meeting the alarm filtering conditions.
The alert subscription distribution micro-service module 107 is also used to store targeted alert information in the subscription kafka topic 110.
And the alarm subscription client is used for acquiring target alarm information from the subscription kafka topic 110 according to the address and the topic name of the subscription kafka topic.
FIG. 5 is a schematic diagram of a subscription management micro-service module provided in the present application, where, as shown in FIG. 5, the alert subscription management micro-service module 106 includes an alert subscription management micro-service node 1061, and the alert subscription management micro-service node 1061 includes an alert subscription management micro-service master node 1062 and an alert subscription management micro-service slave node 1063; after the alert subscription management micro-service module receives the subscription request sent by the alert subscription client, the alert subscription management micro-service module 106 is further configured to create a new alert subscription management micro-service node.
The new alert subscription management micro-service node broadcasts new node joining information to other alert subscription management micro-service nodes.
When the other alert subscription management micro-service nodes receive the new node joining information, all alert subscription management micro-service nodes vote to elect an alert subscription management micro-service master node 1062 and an alert subscription management micro-service slave node 1063.
The alert subscription management micro service master node 1062 is configured to generate a subscription identifier according to the subscription request, and store the subscription identifier and the alert filtering condition as subscription information to the zookeeper module 108.
The alert subscription management micro service master node 1062 is further configured to send the created topic information to a kafka module, where the kafka module creates a subscription kafka topic 110 corresponding to a subscription identifier according to the created topic information.
The alert subscription management micro service master node 1062 is further configured to send a create alert subscription distribution micro service request to the Kubernetes management module 111; the Kubernetes management module 111 is configured to create an alert subscription distribution microservice module according to the alert subscription distribution microservice request.
The alert subscription micro-service master node is further configured to send the address and the topic name of the subscription kafka topic 110 to the alert subscription micro-service slave node.
The alert subscription micro-service slave node is further configured to send the address and topic name of the subscription kafka topic 110 to the alert subscription client.
Fig. 6 is a schematic structural diagram of an electronic device 600 provided in the present application. For example, referring to fig. 6, the electronic device may include a processor 601 and a memory 602.
Memory 602 for storing computer-executable instructions.
The processor 601 is configured to execute computer-executable instructions stored in the memory 602, so that the processor executes the technical solution of the alarm information processing method in any of the foregoing embodiments.
Alternatively, the memory 602 may be separate or integrated with the processor 601. When the memory 602 is a device separate from the processor 601, the server may further include: a bus for connecting the memory 602 and the processor 601.
Optionally, the present embodiment further includes: the receiver and transmitter, and the receiver 603 and transmitter 604 are connected to the server. Processor 601 may control the receiver and the transmitter to enable sending and receiving information to and from a terminal device.
The present application further provides a computer readable storage medium, in which computer executing instructions are stored, and when a processor executes the computer instructions, the technical scheme of the alarm information processing method in any of the foregoing embodiments is implemented, and the implementation principle and beneficial effects of the alarm information processing method are similar to those of the alarm information processing method, and may be referred to the implementation principle and beneficial effects of the alarm information processing method, which are not described herein again.
The embodiment of the application also provides a computer program product, which comprises a computer program, and when the computer program is executed by a processor, the alarm information processing method is realized.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, e.g., the division of modules is merely a logical function division, and there may be additional divisions of actual implementation, e.g., multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated in one processing unit, or each module may exist alone physically, or two or more modules may be integrated in one unit. The units formed by the modules can be realized in a form of hardware or a form of hardware and software functional units.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or processor to perform some steps of the methods of the various embodiments of the present application.
It should be understood that the above processor may be a central processing unit (Central Processing Unit, abbreviated as CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, abbreviated as DSP), application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). It is also possible that the processor and the storage medium reside as discrete components in an electronic device or a master device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. An alarm information processing method, wherein the method is applied to an alarm information processing system, the alarm information processing system comprising: kubernetes module, zookeeper module, and kafka module; the Kubernetes module comprises an alarm subscription management micro-service module, an alarm subscription distribution micro-service module and a Kubernetes management module; the method comprises the following steps:
The alarm subscription management micro-service module receives a subscription request sent by an alarm subscription client, wherein the subscription request comprises alarm filtering conditions;
the alarm subscription management micro-service module generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module;
the alarm subscription management micro-service module sends creation topic information to the kafka module, and the kafka module creates a subscription kafka topic corresponding to the subscription identifier according to the creation topic information;
the alarm subscription management micro-service module sends a request for creating alarm subscription distribution micro-service to the Kubernetes management module, and the Kubernetes management module creates an alarm subscription distribution micro-service module according to the request for creating alarm subscription distribution micro-service;
the alarm subscription management micro-service module sends the address and the topic name of the subscription kafka topic to the alarm subscription client;
the alarm subscription distribution micro-service module acquires full alarm information and acquires the subscription information from the zookeeper module; screening the total alarm information according to the alarm filtering conditions in the subscription information to obtain target alarm information meeting the alarm filtering conditions;
The alarm subscription distribution micro-service module stores the target alarm information into the subscription kafka theme;
the alarm subscription client acquires the target alarm information from the subscription kafka topic according to the address and topic name of the subscription kafka topic.
2. The method of claim 1, wherein the alert subscription management micro-service module comprises an alert subscription management micro-service node comprising an alert subscription management micro-service master node and an alert subscription management micro-service slave node; after the alert subscription management micro-service module receives the subscription request sent by the alert subscription client, the method further comprises:
the alarm subscription management micro-service module creates a new alarm subscription management micro-service node;
the new alarm subscription management micro-service node broadcasts new node joining information to other alarm subscription management micro-service nodes;
when the other alarm subscription management micro-service nodes receive the new node joining information, all alarm subscription management micro-service nodes vote, and elect the alarm subscription management micro-service master node and the alarm subscription management micro-service slave node;
Correspondingly, the alert subscription management micro-service module generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alert filtering condition as subscription information to the zookeeper module, including:
the alarm subscription management micro-service main node generates a subscription identifier according to the subscription request, and stores the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module;
accordingly, the alert subscription management micro-service module sends creation topic information to the kafka module, and the kafka module creates a subscription kafka topic corresponding to the subscription identifier according to the creation topic information, including:
the alarm subscription management micro-service master node sends creation topic information to the kafka module, and the kafka module creates a subscription kafka topic corresponding to the subscription identifier according to the creation topic information;
correspondingly, the alarm subscription management micro-service module sends a request for creating an alarm subscription distribution micro-service to the Kubernetes management module, and the Kubernetes management module creates an alarm subscription distribution micro-service module according to the request for creating the alarm subscription distribution micro-service, comprising:
The alarm subscription management micro-service master node sends a request for creating an alarm subscription distribution micro-service to the Kubernetes management module, and the Kubernetes management module creates an alarm subscription distribution micro-service module according to the request for creating the alarm subscription distribution micro-service;
accordingly, the alert subscription management micro-service module sends the address and the topic name of the subscription kafka topic to the corresponding alert subscription client, including:
the alarm subscription micro-service master node sends the address and the topic name of the subscription kafka topic to the alarm subscription micro-service slave node, and the alarm subscription micro-service slave node sends the address and the topic name of the subscription kafka topic to the alarm subscription client.
3. The method of claim 2, wherein the voting by all alert subscription management micro-service nodes includes the steps of:
each alarm subscription management micro-service node sends node information to other alarm subscription management micro-service nodes and receives the node information sent by other alarm subscription management micro-service nodes, wherein the node information comprises node characteristics;
Each alarm subscription management micro-service node projects a vote to the alarm subscription management micro-service node with the largest capacity by comparing the capacities;
the alarm subscription micro-service module sets the alarm subscription micro-service node with the most votes as the alarm subscription management micro-service master node, and other alarm subscription management micro-service nodes as alarm subscription management micro-service slave nodes.
4. A method according to any one of claims 1 to 3, wherein the alert subscription distribution micro-service module obtains full alert information, comprising:
the kafka module monitors the generation of alarm information and stores each piece of detected alarm information into the full alarm kafka theme;
the alarm subscription distribution micro-service module acquires all the alarm information from the full alarm kafka theme.
5. The method of claim 2, wherein after the electing the alert subscription management micro service master node and the alert subscription management micro service slave node, the method further comprises:
the alarm subscription management micro-service main node receives a subscription cancellation request, sends a subscription termination instruction to the Kubernetes module according to the subscription cancellation request, sends a subscription information deletion instruction to the zookeeper module, and sends a theme deletion instruction to the kafka module;
The Kubernetes module terminates the alarm subscription distribution micro-service corresponding to the subscription identification according to the subscription termination instruction;
the zookeeper module deletes the subscription information corresponding to the subscription identification according to the subscription information deleting instruction;
the kafka module deletes the subscription kafka topic corresponding to the subscription identification according to the topic deletion instruction;
and the subscription management micro-service module returns logout success information to the alarm subscription client.
6. The method of claim 5, wherein before the alert subscription management micro-service master node receives a unsubscribe request, and sends a terminate subscription instruction to the Kubernetes module, a subscribe information deletion instruction to the zookeeper module, and a topic deletion instruction to the kafka module according to the unsubscribe request, further comprising:
the subscription management micro-service slave node detects the state of the alarm subscription client;
when the state of the alarm subscription client is abnormal or the subscription management micro-service slave node receives a subscription cancellation request sent by the alarm subscription client, the subscription management micro-service slave node sends the subscription cancellation request to the alarm subscription management micro-service master node.
7. An alert information processing system, comprising: kubernetes module, zookeeper module, and kafka module; the Kubernetes module comprises an alarm subscription management micro-service module, an alarm subscription distribution micro-service module and a Kubernetes management module;
the alarm subscription management micro-service module is used for receiving a subscription request sent by an alarm subscription client, wherein the subscription request comprises alarm filtering conditions;
the alarm subscription management micro-service module is further used for generating a subscription identifier according to the subscription request and storing the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module;
the alarm subscription management micro-service module is further used for sending creation topic information to the kafka module;
the kafka module is used for creating a subscription kafka theme corresponding to the subscription identifier according to the theme creating information;
the alarm subscription management micro-service module is further used for sending a request for creating alarm subscription distribution micro-service to the Kubernetes management module;
the Kubernetes management module is used for creating an alarm subscription distribution micro-service module according to the alarm subscription distribution micro-service request;
The alert subscription management micro-service module is further configured to send an address and a topic name of the subscription kafka topic to the alert subscription client;
the alarm subscription distribution micro-service module is used for acquiring the total alarm information and acquiring the subscription information from the zookeeper module; screening the total alarm information according to the alarm filtering conditions in the subscription information to obtain target alarm information meeting the alarm filtering conditions;
the alarm subscription distribution micro-service module is further used for storing the target alarm information into the subscription kafka theme;
the alarm subscription client is used for acquiring the target alarm information from the subscription kafka theme according to the address and the theme name of the subscription kafka theme.
8. The system of claim 7, wherein the alert subscription management micro-service module comprises an alert subscription management micro-service node comprising an alert subscription management micro-service master node and an alert subscription management micro-service slave node; after the alert subscription management micro-service module receives the subscription request sent by the alert subscription client,
The alarm subscription management micro-service module is also used for creating a new alarm subscription management micro-service node;
the new alarm subscription management micro-service node broadcasts new node joining information to other alarm subscription management micro-service nodes;
when the other alarm subscription management micro-service nodes receive the new node joining information, all alarm subscription management micro-service nodes vote, and elect an alarm subscription management micro-service master node and an alarm subscription management micro-service slave node;
correspondingly, the alert subscription management micro-service module is further configured to generate a subscription identifier according to the subscription request, and store the subscription identifier and the alert filtering condition as subscription information to the zookeeper module, where the method includes:
the alarm subscription management micro-service main node is used for generating a subscription identifier according to the subscription request and storing the subscription identifier and the alarm filtering condition as subscription information to the zookeeper module;
correspondingly, the alarm subscription management micro-service module is further used for sending creation topic information to the kafka module;
the kafka module is configured to create a subscription kafka topic corresponding to the subscription identifier according to the creation topic information, and includes:
The alarm subscription management micro-service master node sends creation topic information to the kafka module;
the kafka module is used for creating a subscription kafka theme corresponding to the subscription identifier according to the theme creating information;
correspondingly, the alarm subscription management micro-service module is further used for sending a request for creating alarm subscription distribution micro-service to the Kubernetes management module;
the Kubernetes management module is configured to create an alert subscription distribution micro-service module according to the alert subscription distribution micro-service request, and includes:
the alarm subscription management micro-service main node is further used for sending a request for creating alarm subscription distribution micro-service to the Kubernetes management module;
the Kubernetes management module is used for creating an alarm subscription distribution micro-service module according to the alarm subscription distribution micro-service request;
correspondingly, the alert subscription management micro-service module is further configured to send an address and a topic name of the subscription kafka topic to the corresponding alert subscription client, and includes:
the alarm subscription micro-service master node is further configured to send an address and a topic name of the subscription kafka topic to the alarm subscription micro-service slave node, and the alarm subscription micro-service slave node sends the address and the topic name of the subscription kafka topic to the alarm subscription client.
9. An electronic device, comprising: a processor and a memory;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory, causing the processor to perform the alarm information processing method according to any one of claims 1 to 6.
10. A computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, which when executed by a processor, are configured to implement the alarm information processing method according to any one of claims 1 to 6.
CN202111081841.6A 2021-09-15 2021-09-15 Alarm information processing method, system, electronic equipment and storage medium Active CN113794597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111081841.6A CN113794597B (en) 2021-09-15 2021-09-15 Alarm information processing method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111081841.6A CN113794597B (en) 2021-09-15 2021-09-15 Alarm information processing method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113794597A CN113794597A (en) 2021-12-14
CN113794597B true CN113794597B (en) 2023-05-30

Family

ID=78878552

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111081841.6A Active CN113794597B (en) 2021-09-15 2021-09-15 Alarm information processing method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113794597B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114253807B (en) * 2021-12-20 2023-04-07 深圳前海微众银行股份有限公司 Alarm information notification method and device
CN115022318B (en) * 2022-05-30 2023-08-29 在线途游(北京)科技有限公司 Message publishing method and system based on micro-service architecture

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707528A (en) * 2008-06-12 2010-05-12 广东高新兴通信股份有限公司 Method for transmitting alarm data of centralized monitoring system
CN107832200A (en) * 2017-10-24 2018-03-23 平安科技(深圳)有限公司 Alert processing method, device, computer equipment and storage medium
CN109255091A (en) * 2018-08-23 2019-01-22 北京城市网邻信息技术有限公司 Method, apparatus, equipment and the computer readable storage medium of shared theme message
CN110008286A (en) * 2019-03-26 2019-07-12 华南理工大学 A kind of injection molding equipment big data acquisition and storage system and method
CN112039977A (en) * 2020-08-27 2020-12-04 上海振华重工(集团)股份有限公司 Cloud-native industrial data collection and fault alarm system and operation method
CN112055061A (en) * 2020-08-21 2020-12-08 烽火通信科技股份有限公司 Distributed message processing method and device
CN113132434A (en) * 2019-12-31 2021-07-16 湖北亿咖通科技有限公司 Distributed service processing method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0228941D0 (en) * 2002-12-12 2003-01-15 Ibm Methods, apparatus and computer programs for processing alerts and auditing in a publish/subscribe system
US10645181B2 (en) * 2016-12-12 2020-05-05 Sap Se Meta broker for publish-subscribe-based messaging

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101707528A (en) * 2008-06-12 2010-05-12 广东高新兴通信股份有限公司 Method for transmitting alarm data of centralized monitoring system
CN107832200A (en) * 2017-10-24 2018-03-23 平安科技(深圳)有限公司 Alert processing method, device, computer equipment and storage medium
CN109255091A (en) * 2018-08-23 2019-01-22 北京城市网邻信息技术有限公司 Method, apparatus, equipment and the computer readable storage medium of shared theme message
CN110008286A (en) * 2019-03-26 2019-07-12 华南理工大学 A kind of injection molding equipment big data acquisition and storage system and method
CN113132434A (en) * 2019-12-31 2021-07-16 湖北亿咖通科技有限公司 Distributed service processing method, device, equipment and storage medium
CN112055061A (en) * 2020-08-21 2020-12-08 烽火通信科技股份有限公司 Distributed message processing method and device
CN112039977A (en) * 2020-08-27 2020-12-04 上海振华重工(集团)股份有限公司 Cloud-native industrial data collection and fault alarm system and operation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于Kafka和Kubernetes的云平台监控告警系统";郝海鹏等;《计算机系统应用》;第29卷(第8期);全文 *
"柔性微服务监控框架";刘一田等;《计算机系统应用》(第10期);全文 *

Also Published As

Publication number Publication date
CN113794597A (en) 2021-12-14

Similar Documents

Publication Publication Date Title
CN113794597B (en) Alarm information processing method, system, electronic equipment and storage medium
CN108712501B (en) Information sending method and device, computing equipment and storage medium
CN105991412B (en) Information push method and device
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN111182531B (en) Associated information backfilling method, device, equipment and storage medium
CN112422684B (en) Target message processing method and device, storage medium and electronic device
CN102651883A (en) Method and apparatus for detecting connection loss of terminal
CN107682169A (en) A kind of method and apparatus using Kafka collection pocket transmission message
CN104065921A (en) Security and protection wide area network embedded type monitoring device and control method thereof
CN111614953A (en) Restarting control method and system for fault IP camera
US10721135B1 (en) Edge computing system for monitoring and maintaining data center operations
US20070294255A1 (en) Method and System for Distributing Data Processing Units in a Communication Network
US10140169B2 (en) Fault tracking in a telecommunications system
CN112099990A (en) Disaster recovery backup method, device, equipment and machine readable storage medium
CN106534758B (en) Conference backup method and device
US9565583B2 (en) Monitoring device and monitoring system
CN103916894A (en) Signal tracing system and method and related device based on alarm triggering
US11812487B2 (en) Method, device, extender, and computer medium for automatically restoring connection
WO2021063251A1 (en) Site management method applied to communication system and related device
WO2021196697A1 (en) Disaster tolerance processing method and apparatus
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
CN111935296B (en) System for high-availability infinite MQTT message service capacity expansion
CN114301763A (en) Distributed cluster fault processing method and system, electronic device and storage medium
US20200296607A1 (en) Channel establishment method and base station
CN103036744B (en) A kind of method and device monitoring multiple machine distributing copy block equipment

Legal Events

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