CN115225458A - Alarm notification method, alarm notification device, electronic equipment and storage medium - Google Patents

Alarm notification method, alarm notification device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115225458A
CN115225458A CN202210822525.8A CN202210822525A CN115225458A CN 115225458 A CN115225458 A CN 115225458A CN 202210822525 A CN202210822525 A CN 202210822525A CN 115225458 A CN115225458 A CN 115225458A
Authority
CN
China
Prior art keywords
alarm
interface
initial
mode
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210822525.8A
Other languages
Chinese (zh)
Inventor
***
邓羿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202210822525.8A priority Critical patent/CN115225458A/en
Publication of CN115225458A publication Critical patent/CN115225458A/en
Pending legal-status Critical Current

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/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • 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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • 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/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Alarm Systems (AREA)

Abstract

The invention relates to a cloud transmission technology, and discloses an alarm notification method, which comprises the following steps: inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm mode to obtain an initial alarm template and an initial alarm address corresponding to the alarm mode; combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode; updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address; and calling an updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode. The invention also relates to a block chain technology, and the alarm information can be stored in the block chain link points. The invention also provides an alarm notification device, equipment and a medium. The invention can improve the flexibility of the alarm notification.

Description

Alarm notification method, alarm notification device, electronic equipment and storage medium
Technical Field
The present invention relates to cloud transmission technologies, and in particular, to an alarm notification method and apparatus, an electronic device, and a storage medium.
Background
Prometheus is an open source monitoring system, and is used by many companies and organizations. The community of developers and users of the project is very active, with more and more developers and users participating in the project.
However, the existing Prometheus monitoring system needs to reconfigure the configuration file of the alarm notification every time a new alarm exists, which results in poor flexibility of the alarm notification.
Disclosure of Invention
The invention provides an alarm notification method, an alarm notification device, electronic equipment and a storage medium, and mainly aims to improve the flexibility of alarm notification.
Acquiring a configuration file containing an interface address of a preset alarm interface;
when receiving alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes, inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm modes to obtain an initial alarm template and an initial alarm address corresponding to the alarm modes;
combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address;
and calling an updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode.
Optionally, the querying, by using the alarm mode, an alarm template and an alarm notification address in a preset alarm database to obtain an initial alarm template and an initial alarm address corresponding to the alarm mode includes:
constructing a query statement by using the alarm mode as a query condition;
and querying all alarm templates and all alarm notification addresses in the alarm database by using the query statement to obtain the corresponding initial alarm templates and the initial alarm addresses.
Optionally, the combining the alarm information with the initial alarm template corresponding to the alarm mode to obtain the target alarm information corresponding to the alarm mode includes:
acquiring the severity level of the alarm information;
constructing a query statement by taking the severity grade and the alarm mode as query conditions;
and querying all alarm templates and all alarm notification addresses in the alarm database by using the query statement to obtain the corresponding initial alarm templates and the initial alarm addresses.
Optionally, the combining the alarm information with the initial alarm template corresponding to the alarm mode to obtain the target alarm information corresponding to the alarm mode includes:
replacing preset placeholders in the alarm template with the alarm information to obtain initial alarm information;
and converting the alarm information into a JSON character string form to obtain the target alarm information.
Optionally, the updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address includes:
acquiring the number of the alarm modes in the alarm mode set to obtain the number of notification channels;
constructing blank interface methods with the same number in the alarm interfaces according to the number of the notification channels;
and filling parameters of each blank interface method in the alarm interface according to the target alarm information and the initial alarm address to obtain an updated alarm interface.
Optionally, the parameter filling is performed on each blank interface method in the alarm interface according to the target alarm information and the initial alarm address to obtain an updated alarm interface, including:
associating one blank interface method for each alarm mode in sequence, wherein the alarm modes and the associated blank interface methods are in one-to-one correspondence;
and filling the target alarm information and the initial alarm address corresponding to each alarm mode as interface parameters into the associated interface method corresponding to the alarm mode until all the blank interface methods in the alarm interface are filled, and obtaining the updated alarm interface.
Optionally, the invoking an updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm manner to an initial alarm address corresponding to the alarm manner includes:
judging whether the file format of the configuration file is a preset file format or not;
and when the file format of the configuration file is a preset file format, accessing an interface address in the configuration file to call the updated alarm interface for use so as to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode.
In order to solve the above problem, the present invention also provides an alarm notification apparatus, including:
the alarm information processing module is used for acquiring a configuration file containing an interface address of a preset alarm interface; when receiving alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes, inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm modes to obtain an initial alarm template and an initial alarm address corresponding to the alarm modes; combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
the alarm interface updating module is used for updating the interface parameters of the alarm interface by using the target alarm information and the initial alarm address;
and the alarm notification module is used for calling the updated alarm interface based on the configuration file so as to send the target alarm information corresponding to each alarm mode to the initial alarm address corresponding to the alarm mode.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one computer program; and
and a processor executing the computer program stored in the memory to implement the alarm notification method described above.
In order to solve the above problem, the present invention also provides a computer-readable storage medium having at least one computer program stored therein, the at least one computer program being executed by a processor in an electronic device to implement the alarm notification method described above.
The method comprises the steps of obtaining a configuration file containing an interface address of a preset alarm interface; updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address; the updated alarm interface is called based on the configuration file to send the target alarm information corresponding to each alarm mode to the initial alarm address corresponding to the alarm mode, the interface is called through the interface address in the configuration file to carry out alarm notification, the configuration file is not required to be changed every time a new alarm exists, the alarm notification can be realized only by dynamically updating the parameters of the interface, and the alarm notification has stronger flexibility.
Drawings
Fig. 1 is a schematic flowchart of an alarm notification method according to an embodiment of the present invention;
FIG. 2 is a block diagram of an alarm notification device according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an internal structure of an electronic device implementing an alarm notification method according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides an alarm notification method. The execution subject of the alarm notification method includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiments of the present application. In other words, the alarm notification method may be performed by software or hardware installed in the terminal device or the server device, and the software may be a blockchain platform. The server includes but is not limited to: the system comprises a single server, a server cluster, a cloud server or a cloud server cluster, and the like, wherein the server can be an independent server, and can also be a cloud server for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content Delivery Network (CDN), big data, an artificial intelligence platform and the like.
Referring to fig. 1, a flow diagram of an alarm notification method according to an embodiment of the present invention is shown, where in the embodiment of the present invention, the alarm notification method includes:
s1, acquiring a configuration file containing an interface address of a preset alarm interface;
optionally, in the embodiment of the present invention, the alarm interface is a webhook interface configured with an alarm information parameter and an alarm address parameter, and when the alarm interface is called, the alarm information in the alarm interface may be sent to a corresponding alarm address, so as to implement an alarm notification; the configuration file is an alarm notification configuration file of a Prometous monitoring system, the interface address is the address of the alarm interface, and when the configuration file is analyzed, the interface address in the configuration file is utilized to realize the calling of the alarm interface.
S2, when alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes are received, an alarm template and an alarm notification address are inquired in a preset alarm database by using the alarm modes, and an initial alarm template and an initial alarm address corresponding to the alarm modes are obtained.
In the embodiment of the present invention, the alarm information is alarm information of a preset monitoring index in a Prometheus monitoring system, for example: monitoring the CPU utilization rate as a monitoring index, and giving an alarm when the CPU utilization rate exceeds 80% according to a preset alarm rule; then according to a preset alarm rule, the alarm information can be that the CPU utilization rate exceeds 80%; the alarm mode may be a mode in which any one of the alarm notification addresses in the Prometheus monitoring system is an alarm notification, including but not limited to: e-mail, short message, nail, etc., and the scope of the alarm mode is not limited in the embodiment of the invention.
Further, in the embodiment of the present invention, the alarm database includes an alarm template and an alarm notification address corresponding to the alarm mode, where the alarm notification address is an address to which the alarm information needs to be sent, for example: a mobile phone number, an email address, and the like, and the alarm mode is not particularly limited in the embodiments of the present invention. Because the alarm template and the alarm notification address corresponding to each alarm mode are different, such as: if the alarm mode is a short message, the corresponding alarm notification address is a mobile phone number, if the alarm mode is a mail, the corresponding alarm notification address is an email address, and therefore the alarm template and the alarm notification address need to be inquired in a preset alarm database according to the alarm mode.
Further, in the embodiment of the present invention, querying an alarm template and an alarm notification address in a preset alarm database by using the alarm mode to obtain an initial alarm template and an initial alarm address corresponding to the alarm mode includes:
constructing a query statement by using the alarm mode as a query condition;
and querying all alarm templates and all alarm notification addresses in the alarm database by using the query statement to obtain the corresponding initial alarm templates and the initial alarm addresses.
In another embodiment of the present invention, the method for querying an alarm template and an alarm notification address in a preset alarm database by using the alarm mode to obtain an initial alarm template and an initial alarm address corresponding to the alarm mode includes:
acquiring the severity level of the alarm information;
in the embodiment of the present invention, since the alarm information of the same alarm manner also has different severity, in order to classify and transmit the alarm information of different severity, the severity level of the alarm information needs to be obtained, where the severity level is an identifier that identifies the alarm severity of the alarm information, such as: severe, general, warning or primary, secondary, tertiary; the embodiment of the present invention is not limited to the specific expression of the severity level.
Constructing a query statement by taking the severity grade and the alarm mode as query conditions;
and querying all alarm templates and all alarm notification addresses in the alarm database by using the query statement to obtain the corresponding initial alarm templates and the initial alarm addresses.
In another embodiment of the invention, the alarm information can be stored in the block chain node, and the data access efficiency is improved by using the characteristic of high throughput of the block chain node.
S3, combining the alarm information with the initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
in detail, in the embodiment of the present invention, combining the alarm information with the initial alarm template corresponding to the alarm mode to obtain the target alarm information corresponding to the alarm mode includes:
replacing a preset placeholder in the alarm template with the alarm information to obtain initial alarm information;
for example: the place-occupying symbol is "", the alarm template is "your system has alarm and please check in time", the alarm information is "the CPU utilization rate exceeds 80%", and then the initial alarm information is "your system has CPU utilization rate exceeds 80% alarm and please check in time".
And converting the alarm information into a JSON character string form to obtain the target alarm information.
And S4, updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address.
In detail, in the embodiment of the present invention, the updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address includes:
acquiring the number of the alarm modes in the alarm mode set to obtain the number of notification channels;
constructing blank interface methods with the same number in the alarm interfaces according to the number of the notification channels;
optionally, the blank interface method in the embodiment of the present invention is a request method template without interface parameter padding.
For example: if the number of the notification channels is 2, 2 blank interface methods are constructed in the alarm interface.
And filling parameters of each blank interface method in the alarm interface according to the target alarm information and the initial alarm address to obtain an updated alarm interface.
Optionally, in the embodiment of the present invention, before the same number of blank interface methods are constructed in the alarm interface according to the number of the notification channels, all interface methods in the alarm interface are deleted, so as to remove an influence of an interface method of an alarm mode corresponding to historical alarm information in the alarm interface.
Further, in the embodiment of the present invention, parameter filling is performed on each blank interface method in the alarm interface according to the target alarm information and the initial alarm address, so as to obtain an updated alarm interface, where the method includes:
associating one blank interface method for each alarm mode in sequence, wherein the alarm modes and the associated blank interface methods are in one-to-one correspondence;
for example: the method comprises the steps that two alarm modes are short message alarm and mail alarm respectively, two blank interface methods are an interface method 1 and an interface method 2, the alarm modes correspond to the associated blank interface methods one by one, if the short message alarm is associated with the interface method 1, the mail alarm can only be associated with the interface method 2, and if the short message alarm is associated with the interface method 2, the mail alarm can only be associated with the interface method 1.
And filling the target alarm information and the initial alarm address corresponding to each alarm mode as interface parameters into the associated interface method corresponding to the alarm mode until all the blank interface methods in the alarm interface are filled, and obtaining the updated alarm interface.
Further, in the embodiment of the present invention, before filling the target alarm information and the initial alarm address corresponding to each alarm mode as interface parameters into the associated interface method corresponding to the alarm mode, the initial alarm address needs to be converted into a JSON character string.
In another embodiment of the present invention, when the alarm interface is called, the interface methods in the alarm interface are sequentially executed, and in order to prevent the execution failure of some interface methods from affecting the interface methods that are not executed subsequently, it is further necessary to perform asynchronous processing identification on each interface method in the updated alarm interface so that all interface methods in the updated alarm interface can be asynchronously executed without affecting each other
The updating of the alarm interface in the embodiment of the invention does not influence the address of the alarm interface, and the interface address of the alarm interface is invariable.
And S5, calling the updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm mode to the initial alarm address corresponding to the alarm mode.
In the embodiment of the present invention, invoking an updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode includes:
judging whether the file format of the configuration file is a preset file format or not;
optionally, in the embodiment of the present invention, the preset file format is a yaml file, and in order to ensure that the content in the configuration file can be normally utilized, the file format of the configuration file needs to be yaml file to be normally identified and used by an alarm component, such as an alert component (alert manager component), of the promemeus monitoring system.
And when the file format of the configuration file is a preset file format, accessing an interface address in the configuration file to call the updated alarm interface for use so as to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode.
And when the file format of the configuration file is not the preset file format, sending configuration file error information to a preset terminal device of the early warning monitoring personnel.
Optionally, the terminal device in the embodiment of the present invention may be an intelligent terminal such as a mobile phone, a computer, a tablet, and the like.
Fig. 2 is a functional block diagram of the alarm notification apparatus according to the present invention.
The alarm notification device 100 of the present invention may be installed in an electronic apparatus. According to the implemented functions, the alarm notification device may include an alarm information processing module 101, an alarm interface updating module 102, and an alarm notification module 103, which may also be referred to as a unit, and refers to a series of computer program segments that can be executed by a processor of the electronic device and can perform fixed functions, and are stored in a memory of the electronic device.
In the present embodiment, the functions of the respective modules/units are as follows:
the alarm information processing module 101 is configured to obtain a configuration file including an interface address of a preset alarm interface; when receiving alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes, inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm modes to obtain an initial alarm template and an initial alarm address corresponding to the alarm modes; combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
the alarm interface updating module 102 is configured to update interface parameters of the alarm interface by using the target alarm information and the initial alarm address;
the alarm notification module 103 is configured to call an updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm manner to an initial alarm address corresponding to the alarm manner.
In detail, when the modules in the alarm notification apparatus 100 according to the embodiment of the present invention are used, the same technical means as the alarm notification method described in fig. 1 above are used, and the same technical effects can be produced, which is not described herein again.
Fig. 3 is a schematic structural diagram of an electronic device implementing the alarm notification method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an alert notification program, stored in the memory 11 and operable on the processor 10.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of an alarm notification program, etc., but also to temporarily store data that has been output or will be output.
The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the whole electronic device by using various interfaces and lines, executes various functions of the electronic device and processes data by running or executing programs or modules (e.g., an alarm notification program, etc.) stored in the memory 11, and calling data stored in the memory 11.
The communication bus 12 may be a PerIPheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
Fig. 3 shows only an electronic device having components, and those skilled in the art will appreciate that the structure shown in fig. 3 does not constitute a limitation of the electronic device, and may include fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management and the like are realized through the power management device. The power source may also include any component of one or more dc or ac power sources, recharging devices, power failure classification circuits, power converters or inverters, power status indicators, and the like. The electronic device may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Optionally, the communication interface 13 may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used to establish a communication connection between the electronic device and other electronic devices.
Optionally, the communication interface 13 may further include a user interface, which may be a Display (Display), an input unit (such as a Keyboard (Keyboard)), and optionally, a standard wired interface, or a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The alert notification program stored in the memory 11 of the electronic device is a combination of computer programs that, when executed in the processor 10, enable:
acquiring a configuration file containing an interface address of a preset alarm interface;
when receiving alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes, inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm modes to obtain an initial alarm template and an initial alarm address corresponding to the alarm modes;
combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address;
and calling an updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode.
Specifically, the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the computer program, which is not described herein again.
Further, the electronic device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. The computer readable medium may be non-volatile or volatile. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
Embodiments of the present invention may also provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:
acquiring a configuration file containing an interface address of a preset alarm interface;
when receiving alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes, inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm modes to obtain an initial alarm template and an initial alarm address corresponding to the alarm modes;
combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address;
and calling the updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode.
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. An alert notification method, the method comprising:
acquiring a configuration file containing an interface address of a preset alarm interface;
when receiving alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes, inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm modes to obtain an initial alarm template and an initial alarm address corresponding to the alarm modes;
combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
updating interface parameters of the alarm interface by using the target alarm information and the initial alarm address;
and calling the updated alarm interface based on the configuration file to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode.
2. The method for notifying an alarm according to claim 1, wherein the step of querying an alarm template and an alarm notification address in a preset alarm database by using the alarm mode to obtain an initial alarm template and an initial alarm address corresponding to the alarm mode comprises:
constructing a query statement by using the alarm mode as a query condition;
and querying all alarm templates and all alarm notification addresses in the alarm database by using the query statement to obtain the corresponding initial alarm templates and the initial alarm addresses.
3. The method for notifying an alarm according to claim 1, wherein the combining the alarm information with the initial alarm template corresponding to the alarm mode to obtain the target alarm information corresponding to the alarm mode comprises:
acquiring the severity level of the alarm information;
constructing a query statement by taking the severity grade and the alarm mode as query conditions;
and querying all alarm templates and all alarm notification addresses in the alarm database by using the query statement to obtain the corresponding initial alarm templates and the initial alarm addresses.
4. The method for notifying an alarm according to claim 1, wherein the combining the alarm information with the initial alarm template corresponding to the alarm mode to obtain the target alarm information corresponding to the alarm mode comprises:
replacing a preset placeholder in the alarm template with the alarm information to obtain initial alarm information;
and converting the alarm information into a JSON character string form to obtain the target alarm information.
5. The alarm notification method according to claim 1, wherein said updating interface parameters of said alarm interface using said target alarm information and said initial alarm address comprises:
acquiring the number of the alarm modes in the alarm mode set to obtain the number of notification channels;
constructing blank interface methods with the same quantity in the alarm interfaces according to the quantity of the notification channels;
and filling parameters of each blank interface method in the alarm interface according to the target alarm information and the initial alarm address to obtain an updated alarm interface.
6. The alarm notification method of claim 5, wherein the parameter filling of each of the blank interface methods in the alarm interface according to the target alarm information and the initial alarm address to obtain an updated alarm interface comprises:
associating one blank interface method for each alarm mode in sequence, wherein the alarm modes and the associated blank interface methods are in one-to-one correspondence;
and filling the target alarm information and the initial alarm address corresponding to each alarm mode as interface parameters into the associated interface method corresponding to the alarm mode until all the blank interface methods in the alarm interface are filled, and obtaining the updated alarm interface.
7. The alarm notification method according to any one of claims 1 to 6, wherein the invoking an updated alarm interface based on the configuration file to send the target alarm information corresponding to each of the alarm modes to an initial alarm address corresponding to the alarm mode includes:
judging whether the file format of the configuration file is a preset file format or not;
and when the file format of the configuration file is a preset file format, accessing an interface address in the configuration file to call the updated alarm interface for use so as to send the target alarm information corresponding to each alarm mode to an initial alarm address corresponding to the alarm mode.
8. An alert notification apparatus, comprising:
the alarm information processing module is used for acquiring a configuration file containing an interface address of a preset alarm interface; when receiving alarm information of a preset monitoring index and a corresponding alarm mode set containing one or more alarm modes, inquiring an alarm template and an alarm notification address in a preset alarm database by using the alarm modes to obtain an initial alarm template and an initial alarm address corresponding to the alarm modes; combining the alarm information with an initial alarm template corresponding to the alarm mode to obtain target alarm information corresponding to the alarm mode;
the alarm interface updating module is used for updating the interface parameters of the alarm interface by using the target alarm information and the initial alarm address;
and the alarm notification module is used for calling the updated alarm interface based on the configuration file so as to send the target alarm information corresponding to each alarm mode to the initial alarm address corresponding to the alarm mode.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the alert notification method as claimed in any of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the alert notification method of any of claims 1 to 7.
CN202210822525.8A 2022-07-12 2022-07-12 Alarm notification method, alarm notification device, electronic equipment and storage medium Pending CN115225458A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210822525.8A CN115225458A (en) 2022-07-12 2022-07-12 Alarm notification method, alarm notification device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210822525.8A CN115225458A (en) 2022-07-12 2022-07-12 Alarm notification method, alarm notification device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115225458A true CN115225458A (en) 2022-10-21

Family

ID=83612232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210822525.8A Pending CN115225458A (en) 2022-07-12 2022-07-12 Alarm notification method, alarm notification device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115225458A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19740718A1 (en) * 1997-09-16 1999-09-23 Siemens Ag Network management realignment
CN109743218A (en) * 2019-03-14 2019-05-10 深圳市同行者科技有限公司 A kind of service monitoring method, storage medium and terminal
CN110413975A (en) * 2019-07-29 2019-11-05 北京百度网讯科技有限公司 A kind of alarm rendering method and device based on template
CN111385148A (en) * 2020-03-06 2020-07-07 深圳鼎盛电脑科技有限公司 Service alarm method, device, computer equipment and storage medium
CN112311593A (en) * 2020-09-29 2021-02-02 苏州浪潮智能科技有限公司 Cloud platform based webhook notification method, device, equipment and storage medium
CN113672475A (en) * 2021-10-21 2021-11-19 深圳高灯计算机科技有限公司 Alarm processing method and device, computer equipment and storage medium
CN114189423A (en) * 2021-12-08 2022-03-15 兴业银行股份有限公司 Intelligent inquiry alarm system, method and medium with comprehensive compatibility and expansion

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19740718A1 (en) * 1997-09-16 1999-09-23 Siemens Ag Network management realignment
CN109743218A (en) * 2019-03-14 2019-05-10 深圳市同行者科技有限公司 A kind of service monitoring method, storage medium and terminal
CN110413975A (en) * 2019-07-29 2019-11-05 北京百度网讯科技有限公司 A kind of alarm rendering method and device based on template
CN111385148A (en) * 2020-03-06 2020-07-07 深圳鼎盛电脑科技有限公司 Service alarm method, device, computer equipment and storage medium
CN112311593A (en) * 2020-09-29 2021-02-02 苏州浪潮智能科技有限公司 Cloud platform based webhook notification method, device, equipment and storage medium
CN113672475A (en) * 2021-10-21 2021-11-19 深圳高灯计算机科技有限公司 Alarm processing method and device, computer equipment and storage medium
CN114189423A (en) * 2021-12-08 2022-03-15 兴业银行股份有限公司 Intelligent inquiry alarm system, method and medium with comprehensive compatibility and expansion

Similar Documents

Publication Publication Date Title
CN112015815B (en) Data synchronization method, device and computer readable storage medium
CN111897831A (en) Service message generation method and device, electronic equipment and storage medium
CN111787171A (en) Automatic outbound method, device, electronic equipment and computer readable storage medium
CN112115145A (en) Data acquisition method and device, electronic equipment and storage medium
CN113868528A (en) Information recommendation method and device, electronic equipment and readable storage medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN111880948A (en) Data refreshing method and device, electronic equipment and computer readable storage medium
CN114491047A (en) Multi-label text classification method and device, electronic equipment and storage medium
CN114185895A (en) Data import and export method and device, electronic equipment and storage medium
CN112506559A (en) Gray scale publishing method and device based on gateway, electronic equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN112256783A (en) Data export method and device, electronic equipment and storage medium
CN115081016A (en) Log desensitization method and device, electronic equipment and storage medium
CN113722533A (en) Information pushing method and device, electronic equipment and readable storage medium
CN115033605A (en) Data query method and device, electronic equipment and storage medium
CN115687384A (en) UUID (user identifier) identification generation method, device, equipment and storage medium
CN114547011A (en) Data extraction method and device, electronic equipment and storage medium
CN115174555A (en) File transmission method and device, electronic equipment and storage medium
CN114820132A (en) Order distribution method and device, electronic equipment and storage medium
CN112540839B (en) Information changing method, device, electronic equipment and storage medium
CN115225458A (en) Alarm notification method, alarm notification device, electronic equipment and storage medium
CN115022171A (en) Optimization method and device for updating interface, electronic equipment and readable storage medium
CN114625712A (en) Data synchronization method and device, electronic equipment and storage medium
CN114185588A (en) Incremental package generation method, device, equipment and storage medium
CN113918305A (en) Node scheduling method and device, electronic equipment and readable storage medium

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