A method and apparatus for monitoring an alarm
By decoupling the distributed computing framework and task server design, the problem of tight coupling between alarm rules and time settings is solved, enabling flexible, efficient and reliable alarm push, improving user experience and monitoring and alarm efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN WORKEC TECH
- Filing Date
- 2023-01-05
- Publication Date
- 2026-05-19
AI Technical Summary
In existing monitoring and alarm systems, alarm time settings and alarm rule conditions are tightly coupled, resulting in high user complexity, low efficiency, and insufficient alarm reliability and flexibility.
The alarm rules are parsed by the distributed computing framework components, decoupling alarm triggering time and data calculation. The task server assembles alarm messages and pushes them according to the rules of the custom or initialization code, thus achieving decoupling between alarm triggering and data calculation.
It enables flexible, efficient, and reliable alarm push, improving user experience and monitoring efficiency, and meeting users' needs for customized alarm rules and time settings.
Smart Images

Figure CN116185766B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology, and in particular relates to a method, apparatus, computer device, and computer-readable storage medium for monitoring and alarming. Background Technology
[0002] Monitoring and alarming are among the most important aspects of the entire operation and maintenance system, and even the most automated computer system. In order to better and more effectively manage the stable operation of business operations after they go online, a stable and continuous monitoring and alarming mechanism is necessary for hardware devices, notification efficiency, interfaces, processes, services, etc. It is also necessary to statistically analyze various business data at the minute, hour, day, month, and quarter levels, so as to detect relevant data of business operations in a timely manner.
[0003] Generally, during the monitoring and alerting of business operations, if an anomaly is detected, the server will automatically send an alert email or alert message to a specific alert mailbox. However, in traditional monitoring processes, the anomaly standard is usually set using a fixed value, resulting in a single alert rule that cannot meet all actual business scenarios. Triggering times are inflexible, and alert configuration is too cumbersome. Data calculation and alerting are coupled, leading to low efficiency. Too many alerts at the same time point may cause alert delays, compromising alert reliability. Alert times are triggered by cron (e.g., the frequency is a Cron expression, suitable for periodic execution, daily maintenance, and single tasks that need to be completed at a specific time). A single pause or anomaly terminates the entire alert process, compromising reliability. The tight coupling between alert time settings and alert rule conditions increases user complexity and impacts the overall operation and maintenance work. Summary of the Invention
[0004] This invention provides a method for monitoring alarms, aiming to solve the problem of increased user complexity caused by the tight coupling of alarm time settings and alarm rule conditions.
[0005] This invention is implemented as follows: a method for monitoring and alarming, the method comprising:
[0006] The distributed computing framework component receives the first alarm rule, parses, calculates, and detects it, obtains the alarm trigger time and alarm data, triggers the alarm trigger time and the alarm data, and pushes them.
[0007] The task server receives the decoupled alarm trigger time and alarm data pushed by the distributed computing framework component, assembles the decoupled alarm trigger time and alarm data to obtain an alarm message, calculates alarm members and alarm content according to the first alarm rule and the alarm message, and sends and stores the data formed by the alarm members and alarm content for monitoring and alarming.
[0008] Furthermore, before the distributed computing framework group receives the first alarm rule and parses, calculates, and detects it, the method includes:
[0009] The system receives the first alarm rule and the alarm trigger time added by the user client. A Java server providing an API interface parses the first alarm rule and sends it to the distributed processing platform. The Java server then persists the parsed first alarm rule to a relational database management system; or
[0010] Based on the first alarm rule added according to part or all of the data in the initialization code and the alarm trigger time, the first alarm rule is parsed by part or all of the data in the initialization code and sent to the distributed processing platform. The parsed first alarm rule is then implemented in the relational database management system by part or all of the data in the initialization code.
[0011] Furthermore, in acquiring the alarm trigger time and alarm data, triggering the alarm trigger time and the alarm data, and pushing the alarm, the method includes:
[0012] After the distributed computing framework component listens to the first alarm rule of the distributed processing platform, it sets the trigger time, including the alarm trigger time and the data calculation time, according to the alarm conditions, alarm indicators and alarm thresholds of the first alarm rule.
[0013] When the alarm trigger time is reached, the distributed computing framework component triggers the first alarm rule, the alarm trigger time, and the alarm data and pushes them to the distributed processing platform. The distributed processing platform decouples the alarm trigger time and the alarm data in an asynchronous manner.
[0014] Furthermore, in obtaining the alarm message after assembling the decoupled alarm trigger time and alarm data, the method includes:
[0015] The task server parses the alarm metrics and the alarm thresholds;
[0016] The task server queries the indicator data of the alarm member;
[0017] The task server determines whether the indicator data of the alarm member meets the first alarm rule based on the alarm threshold.
[0018] When the indicator data meets the first alarm rule, the task server collects the alarm members and their member indicators, assembles the decoupled alarm trigger time and the alarm data, and then obtains the alarm message.
[0019] The task server calculates the receiving end that needs to push the alarm message, wherein the receiving end receives the alarm message in a triggered timely message mode and / or a triggered message mode;
[0020] The task server determines and parses whether the conditions for sending the alarm message meet the preset conditions. If not, the alarm message is pushed to a non-relational database.
[0021] When the conditions for sending the alarm message meet the preset conditions, the task server calculates the content of the assembled alarm message;
[0022] The task server writes the content of the alarm message into the distributed processing platform.
[0023] Furthermore, after the task server queries the indicator data of the alarm member, the method includes:
[0024] The task server filters the indicator data of the alarm members according to the first alarm rule.
[0025] Furthermore, after the task server writes the content of the alarm message into the distributed processing platform, the method includes:
[0026] After the distributed computing framework component detects the alarm message that triggers the distributed processing platform, it pushes the alarm message to the real-time distributed memory message queue and stores the data of the alarm message in the relational database management system and / or the non-relational database.
[0027] Furthermore, the method for persisting the alarm message data to the relational database management system and / or non-relational database includes:
[0028] The distributed computing framework component determines whether to write the alarm rule into the distributed processing platform and add it to the next loop queue. If yes, the distributed computing framework component receives the second alarm rule, parses, calculates, and detects it, triggers the alarm trigger time and the alarm data, and pushes it. If no, the process ends.
[0029] This invention also provides a monitoring and alarm device, the device comprising:
[0030] The triggering module controls the distributed computing framework components to receive the first alarm rule, parse, calculate and detect it, obtain the alarm trigger time and alarm data, trigger the alarm trigger time and the alarm data and push them;
[0031] The monitoring module and task server receive the decoupled alarm trigger time and alarm data pushed by the distributed computing framework component, assemble the decoupled alarm trigger time and alarm data to obtain alarm messages, calculate alarm members and alarm content according to the first alarm rule and the alarm message, and send and log the data formed by the alarm members and alarm content to perform monitoring and alarming.
[0032] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0033] This invention also provides a computer-readable storage medium storing a computer program for the above-described method.
[0034] The beneficial effects of this invention embodiment compared to the prior art are as follows: In this invention embodiment, the task server receives the decoupled alarm trigger time and alarm data pushed by the distributed computing framework components, assembles them to obtain alarm messages, calculates alarm members and alarm content according to the first alarm rule and the alarm message, and sends and stores the data formed by the alarm members and the alarm content for monitoring and alarming. Through the above scheme, alarm rules and alarm times can be set to push alarms according to user-defined (based on specific business) or initialization code definitions, decoupling alarm triggering and data calculation, making it more flexible, efficient, and reliable, and improving the user experience for monitoring and alarming. Attached Figure Description
[0035] Figure 1 This is a schematic flowchart of a monitoring and alarm method provided in an embodiment of the present invention.
[0036] Figure 2 This is another illustrative flowchart of a monitoring and alarm method provided in an embodiment of the present invention.
[0037] Figure 3 This is an architecture diagram of a monitoring and alarm method provided in an embodiment of the present invention.
[0038] Figure 4 This is a data flow timing interaction diagram of a monitoring and alarm method provided in an embodiment of the present invention.
[0039] Figure 5 This is a schematic diagram of a monitoring and alarm device provided in an embodiment of the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0041] This invention calculates alarm members and alarm content based on alarm rules and alarm messages, sends and stores the data formed by the alarm members and the alarm content for monitoring and alarming. Alarm rules and alarm times are set by user-defined or initialization code for alarm push, decoupling alarm triggering and data calculation to improve computational efficiency. This makes the solution of this invention flexible, efficient, convenient and reliable, effectively improving the user experience of monitoring and alarming.
[0042] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a monitoring and alarm method provided in an embodiment of the present invention. A monitoring and alarm method, the method comprising:
[0043] S110. The distributed computing framework component receives the first alarm rule, parses, calculates, and detects it, obtains the alarm trigger time and alarm data, triggers the alarm trigger time and the alarm data, and pushes them.
[0044] The distributed computing framework component (Flink) is a distributed system that requires computing resources to execute applications. Flink integrates with all common centralized resource managers (such as Hadoop, YARN, Mesos, and Kubernetes), but can also be configured to run as a standalone cluster. In this invention, the distributed computing framework component mainly performs rule parsing, alarm time detection, and alarm push, for streaming data processing and batch data processing. This technology is mainly used for alarm time-triggered calculations and alarm triggering. The members here mainly refer to the employees selected to participate in the data calculation for the alarm settings.
[0045] For example, after the distributed computing framework component receives the first alarm rule set by the user, it first needs to parse the expression into code logic language. The distributed computing framework component will set the next trigger time (if today is December 15th, then the next trigger time is 18:00 on December 15th). When the trigger time is reached, a notification will be sent to the task server to query and calculate the indicator data, and determine whether each person's phone calls are greater than 500 and the number of customers who have made a purchase is greater than 50. If the first alarm rule is met (for example: Zhang San's phone calls are 503 and the number of customers who have made a purchase is 58, then Zhang San meets the rule), the employee's information will be packaged into a push message and pushed to the designated person (such as company executives, executive secretaries, accountants, or cashiers). At the same time, the calculation continues and the next trigger time is set (for example, 18:00:00 on December 16th). When (18:00:00 on December 16th) arrives, the calculation will be triggered again, and so on, effectively increasing the automated alarm function of the monitoring and alarm method.
[0046] S120. The task server receives the decoupled alarm trigger time and alarm data pushed by the distributed computing framework component, assembles the decoupled alarm trigger time and alarm data to obtain an alarm message, calculates alarm members and alarm content according to the first alarm rule and the alarm message, and sends and stores the data formed by the alarm members and alarm content to perform monitoring alarms.
[0047] A task server can be viewed as a system responsible for recording regularly checked tasks (such as inspections or periodic event reports), requiring regular information aggregation, or extending to daily, monthly, or quarterly reports, and then notifying users via email or instant messaging. Additionally, the task server can be used for user-side health records (e.g., heart rate and blood pressure recording; when a client's vital signs are outside the normal range, timely remote notifications to emergency contacts or medical personnel are provided, improving user experience). In this invention, the task server is used for data calculation, alarm message assembly, and calculating alarm members and content based on alarm rules and alarm data, while simultaneously storing the data for real-time monitoring and alarming, increasing the timeliness of monitoring and alarming. Furthermore, alarm data is used to set or calculate alarm conditions, alarm indicators, and alarm indicator thresholds for the first alarm rule (e.g., calculating employees who meet the criteria of more than 500 phone calls and more than 50 transactions), calculate alarm members that meet the alarm criteria, and send and store the data formed by alarm members and alarm content for monitoring and alarming. Alarm logging refers to the process of calculating alarm members, sending the alarm members, their specific data, and the alarm notification message content to distributed computing framework components for real-time, offline, bounded stream (with start and end) or unbounded stream (without start and end) data computation.
[0048] Please also refer to Figure 1 , Figure 2 , Figure 3 and Figure 4 , Figure 2 This is another illustrative flowchart of a monitoring and alarm method provided in an embodiment of the present invention. Figure 3 This is an architecture diagram of a monitoring and alarm method provided in an embodiment of the present invention. Figure 4 This is a data flow timing interaction diagram of a monitoring and alarm method provided in an embodiment of the present invention.
[0049] Before S110, when the distributed computing framework group receives the first alarm rule and parses, calculates, and detects it, the method includes:
[0050] S101. Receive the first alarm rule and the alarm trigger time added by the user client. A Java server providing the API interface parses the first alarm rule and sends it to the distributed processing platform. The Java server then persists the parsed first alarm rule to the relational database management system; or
[0051] Based on the first alarm rule added according to part or all of the data in the initialization code and the alarm trigger time, the first alarm rule is parsed by part or all of the data in the initialization code and sent to the distributed processing platform. The parsed first alarm rule is then implemented in the relational database management system by part or all of the data in the initialization code.
[0052] User interface (UI), also known as user interface, refers to the design of computers, electrical appliances, machines, mobile communication devices, software or applications, and websites under the guidance of user experience and interaction. The UI design process must find a balance between technical functionality and visual elements to ensure the system is usable, easy to use, and adaptable to user needs. In this invention, the user interface can be used to configure alarm trigger times and set first alarm rules. For example, monitoring alarms can be used to monitor business indicators to further reflect the completion status of employee work tasks. When the data of one (or more) indicators is greater than / equal to / less than a certain threshold, an alarm notification can be sent to a designated person (such as a company employee or a patient with a chronic illness).
[0053] For example, the settings defined in the first alarm rule:
[0054]
[0055] The meaning of the first alarm rule mentioned above is as follows: If Zhang San (123), Li Si (124), and Wang Wu (125) make more than 500 phone calls and have more than 50 successful transactions between December 1st and December 15th, an alarm notification will be sent to the boss (who can be considered a senior executive) and the boss's assistant (who can be considered a senior executive's secretary) at 6 PM every day. Alarm notifications can be used by leaders to assign tasks to employees and monitor the completion status of those tasks. They can also provide real-time and quick information on task progress and can be used for employee performance evaluation based on task completion rates. Employees who complete the evaluation will have their performance displayed on a large digital screen in real time, thereby motivating employees or alerting those who fail to meet standards. The monitoring alarm method can also be used to monitor the health status of applications, effectively increasing applicability.
[0056] In step S110, the method for obtaining the alarm trigger time and alarm data, triggering the alarm trigger time and the alarm data, and pushing the data includes:
[0057] S102. After the distributed computing framework component detects the first alarm rule of the distributed processing platform, it sets the trigger time, including the alarm trigger time and the data calculation time, according to the alarm conditions, alarm indicators, and alarm thresholds of the first alarm rule.
[0058] For example, the alarm indicator and / or alarm threshold can be 500 phone calls and more than 50 customers who have made a purchase. In other embodiments, the alarm indicator and / or alarm threshold can also be that the user's blood pressure is higher than the level 2 hypertension value for more than six hours.
[0059] S103. When the alarm trigger time is reached, the distributed computing framework component triggers the first alarm rule, the alarm trigger time, and the alarm data and pushes them to the distributed processing platform. The distributed processing platform decouples the alarm trigger time and the alarm data in an asynchronous manner.
[0060] A distributed processing platform (Kafka) can be viewed as a high-throughput distributed publish-subscribe messaging system used to process all action stream data from users on a website (e.g., web browsing, searching, and other user actions). This action stream data is typically handled through log processing and log aggregation due to throughput requirements. In this invention, the distributed processing platform can be viewed as a message channel and alarm configuration sending / receiving mechanism, primarily to decouple triggering time and data computation in an asynchronous manner. The distributed processing platform can be implemented using RabbitMQ (e.g., an open-source message queue service software, programmable in a high-performance, robust, and scalable manner), persisting messages from memory to disk and then loading them from disk into memory.
[0061] The specific execution process of decoupling in a distributed processing platform (Kafka) can be such that the trigger time and the actual data calculation time range are not synchronized. For example, if an alarm is triggered at 6 PM every day to calculate yesterday's call data, and 6 PM today is later than yesterday's time, but yesterday's data will not be sent or changed by early this morning, then data calculation (calculating the number of users and clients that meet the first alarm rule) can be performed in early this morning, and the alarm notification can be pushed at 6 PM. Because the two steps of calculating data in the early morning and pushing notification at 6 PM can not be performed at the same time, they are decoupled asynchronously. Of course, some scenarios do not support decoupling (such as pushing the day's data at 6 PM every day) to increase data processing stability.
[0062] The distributed processing platform is primarily used for data transmission and decoupling of alarm rules. (For example, if the alarm rule is set to trigger calculations at 6 PM daily, and employees who made more than 100 calls yesterday are included, then a message is sent to the boss for these employees. By 6 PM that day, yesterday's data will have already been generated and will not have changed. Therefore, data calculations can be performed in the early morning of the same day to filter out employees who meet the rule, and then the message is pushed out at 6 PM.) In this case, data calculation and actual alarm message sending are decoupled. The benefit of decoupling is that it prevents significant alarm delays, because data calculation often takes a considerable amount of time, while message sending is instantaneous. If a large number of alarms need to be triggered at the same time, delays may occur without decoupling, effectively improving the user experience of data processing.
[0063] In step S120, after assembling the decoupled alarm trigger time and alarm data to obtain the alarm message, the method includes:
[0064] S121. The task server parses the alarm indicators and the alarm thresholds;
[0065] The task server queries the indicator data of the alarm member.
[0066] After the task server listens to the alarm message from the decoupled data computation of the distributed processing platform (Kafka), it parses and queries the alarm data and simultaneously calculates the alarm members for the push alarm rules.
[0067] S122. The task server filters the indicator data of the alarm members according to the first alarm rule. This effectively increases the accuracy of data processing.
[0068] S123. The task server determines whether the indicator data of the alarm member meets the first alarm rule based on the alarm threshold.
[0069] When the indicator data meets the first alarm rule, the task server collects the alarm members and their indicators, assembles the decoupled alarm trigger time and alarm data, and then obtains the alarm message.
[0070] In steps S124 and S125, the task server calculates the receiving end (e.g., an employee or a patient with a chronic disease) that needs to receive the alarm message, wherein the receiving end receives the alarm message in a triggered instant messaging mode (S124) and / or a triggered message mode (S125). The instant messaging (IM) application can send and receive different types of messages and send and receive data information in different ways.
[0071] S126. The task server determines and parses whether the conditions for sending the alarm message meet the preset conditions. If not, the alarm message is pushed to a non-relational database.
[0072] Alarm messages can be sent via timely messages and / or triggered messages, and through specific channels. HBase, a non-relational database, is a distributed, column-oriented, open-source database suitable for storing unstructured data.
[0073] S127. When the conditions for sending the alarm message meet the preset conditions, the task server calculates the content of the assembled alarm message.
[0074] The content of an alarm message includes, but is not limited to, the alarm text, the sender, and specific indicator data. For example, the task server calculates and assembles the alarm message, which includes the alarm text, the sender, and specific indicator data, and sends it via SMS to medical patients, employees, the boss, or the boss's assistant.
[0075] S128. The task server writes the content of the alarm message into the distributed processing platform.
[0076] The task server pushes the alarm message content and writes it to a non-relational database, while simultaneously writing the first alarm rule to the distributed processing platform that triggered the alarm.
[0077] After the task server writes the content of the alarm message to the distributed processing platform in S128, the method includes:
[0078] S130. The distributed computing framework component (after listening to the alarm message that triggers the distributed processing platform, pushes the alarm message to the real-time distributed memory message queue, and stores the data of the alarm message in the relational database management system and / or non-relational database).
[0079] Relational database management systems (MySQL) store data in different tables, rather than storing all data in a single large repository, thus increasing speed and flexibility. MySQL software employs a dual-licensing policy, offering both community and commercial versions. Due to its small size, high speed, low total cost of ownership, and especially its open-source nature, MySQL is the preferred database for most small to large websites. The open-source, real-time distributed in-memory message queue (NSQ) supports horizontal scaling, increasing data processing capabilities. NSQ can also be implemented using MSG, primarily for message pushing. Furthermore, the storage functions of HBase and MySQL can be implemented using Redis (in-memory data area) for data persistence, storing alarm rules, alarm records, etc. This invention does not restrict the data storage method. Figure 3 In this context, the database (DB) is used to store data such as alarm rules or alarm records.
[0080] In step S130, the alarm message data is persisted to the relational database management system and / or the non-relational database, the method comprising:
[0081] The distributed computing framework component (Flink) determines whether to write the alarm rule into the distributed processing platform (Kafka) and add it to the next cycle queue (so that the alarm can be triggered in the next cycle). If yes, return to S110, where the distributed computing framework component (Flink) receives the second alarm rule, parses, calculates, and detects it, triggers the alarm trigger time and the alarm data, and pushes it. If no, end.
[0082] For example, writing alarm rules into the distributed processing platform (Kafka) and adding them to the next cycle queue is to enable alarm triggering in the next cycle. This adds an automatic cycle mode function for monitoring alarms, replacing the previous first alarm rule with the second alarm rule, and then having the distributed computing framework component calculate the rule data content for triggering alarms in the next cycle.
[0083] In this embodiment of the invention, alarm messages are obtained by assembling the decoupled alarm trigger time and alarm data. Alarm members and alarm content are calculated according to alarm rules and alarm messages. The data formed by alarm members and alarm content is sent and stored for monitoring and alarming. This can realize the ability to push alarms by allowing users to customize alarm rules and alarm times, decoupling alarm triggering and data calculation, making it more flexible, efficient and reliable. Moreover, users can easily and conveniently modify the rule content as needed.
[0084] Please see Figure 5 , Figure 5This is a schematic diagram of a monitoring and alarm device provided in an embodiment of the present invention. The present invention proposes a monitoring and alarm device, the device 500 comprising:
[0085] Trigger module 510 controls the distributed computing framework component to receive the first alarm rule and parse, calculate and detect it, obtain the alarm trigger time and alarm data, trigger the alarm trigger time and the alarm data and push them;
[0086] The monitoring module 520 and the task server receive the decoupled alarm trigger time and alarm data pushed by the distributed computing framework component. After assembling the decoupled alarm trigger time and alarm data, the task server obtains an alarm message, calculates alarm members and alarm content according to the first alarm rule and the alarm message, and sends and stores the data formed by the alarm members and alarm content to perform monitoring and alarming.
[0087] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.
[0088] This invention also provides a computer-readable storage medium storing a computer program for performing the above-described methods. Those skilled in the art will understand that embodiments of this invention can be provided as methods, apparatus, or computer program products. Therefore, this invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this invention can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0089] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (which may also be systems or devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0090] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0091] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0092] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for monitoring and alarming, characterized in that, The method includes: The distributed computing framework component receives the first alarm rule, parses, calculates, and detects it, obtains the alarm trigger time and alarm data, triggers the alarm trigger time and the alarm data, and pushes them. The task server receives the decoupled alarm trigger time and alarm data pushed by the distributed computing framework component, assembles the decoupled alarm trigger time and alarm data to obtain an alarm message, calculates alarm members and alarm content according to the first alarm rule and the alarm message, and sends and stores the data formed by the alarm members and alarm content to perform monitoring and alarming. The method for acquiring alarm trigger time and alarm data, triggering the alarm trigger time and alarm data, and pushing the data includes: After the distributed computing framework component listens to the first alarm rule of the distributed processing platform, it sets the trigger time, including the alarm trigger time and the data calculation time, according to the alarm conditions, alarm indicators and alarm thresholds of the first alarm rule. When the alarm trigger time is reached, the distributed computing framework component triggers the first alarm rule, the alarm trigger time, and the alarm data and pushes them to the distributed processing platform. The distributed processing platform decouples the alarm trigger time and the alarm data in an asynchronous manner. The distributed processing platform is regarded as a message channel and is used for alarm configuration sending and receiving, as well as for data transmission and decoupling of alarm rules. The specific execution process of decoupling is that the alarm trigger time and the actual alarm data calculation time range are not synchronized.
2. The method as described in claim 1, characterized in that, Before the distributed computing framework components receive the first alarm rule and parse, calculate, and detect it, the method includes: The system receives the first alarm rule and the alarm trigger time added by the user client. A Java server providing an API interface parses the first alarm rule and sends it to the distributed processing platform. The Java server then persists the parsed first alarm rule to a relational database management system; or Based on the first alarm rule added according to part or all of the data in the initialization code and the alarm trigger time, the first alarm rule is parsed by part or all of the data in the initialization code and sent to the distributed processing platform. The parsed first alarm rule is then implemented in the relational database management system by part or all of the data in the initialization code.
3. The method as described in claim 2, characterized in that, In obtaining the alarm message after assembling the decoupled alarm trigger time and alarm data, the method includes: The task server parses the alarm metrics and the alarm thresholds; The task server queries the indicator data of the alarm member; The task server determines whether the indicator data of the alarm member meets the first alarm rule based on the alarm threshold. When the indicator data meets the first alarm rule, the task server collects the alarm members and their member indicators, assembles the decoupled alarm trigger time and the alarm data, and then obtains the alarm message. The task server calculates the receiving end that needs to push the alarm message, wherein the receiving end receives the alarm message in a triggered timely message mode and / or a triggered message mode; The task server determines and parses whether the conditions for sending the alarm message meet the preset conditions. If not, the alarm message is pushed to a non-relational database. When the conditions for sending the alarm message meet the preset conditions, the task server calculates the content of the assembled alarm message; The task server writes the content of the alarm message into the distributed processing platform.
4. The method as described in claim 3, characterized in that, After the task server queries the metric data of the alarm member, the method includes: The task server filters the indicator data of the alarm members according to the first alarm rule.
5. The method as described in claim 3, characterized in that, After the task server writes the content of the alarm message into the distributed processing platform, the method includes: After the distributed computing framework component detects the alarm message that triggers the distributed processing platform, it pushes the alarm message to the real-time distributed memory message queue and stores the data of the alarm message in the relational database management system and / or the non-relational database.
6. The method as described in claim 5, characterized in that, The method for persisting the alarm message data to the relational database management system and / or non-relational database includes: The distributed computing framework component determines whether to write the alarm rule into the distributed processing platform and add it to the next loop queue. If yes, the distributed computing framework component receives the second alarm rule, parses, calculates, and detects it, triggers the alarm trigger time and the alarm data, and pushes it. If no, the process ends.
7. A monitoring and alarm device, characterized in that, The device includes: The triggering module controls the distributed computing framework components to receive the first alarm rule, parse, calculate and detect it, obtain the alarm trigger time and alarm data, trigger the alarm trigger time and the alarm data and push them; The monitoring module and the task server receive the decoupled alarm trigger time and alarm data pushed by the distributed computing framework component, assemble the decoupled alarm trigger time and alarm data to obtain alarm messages, calculate alarm members and alarm content according to the first alarm rule and the alarm message, and send and drop the data formed by the alarm members and alarm content to perform monitoring and alarming. The triggering module is specifically used for: After the distributed computing framework component listens to the first alarm rule of the distributed processing platform, it sets the trigger time, including the alarm trigger time and the data calculation time, according to the alarm conditions, alarm indicators and alarm thresholds of the first alarm rule. When the alarm trigger time is reached, the distributed computing framework component triggers the first alarm rule, the alarm trigger time, and the alarm data and pushes them to the distributed processing platform. The distributed processing platform decouples the alarm trigger time and the alarm data in an asynchronous manner. The distributed processing platform is regarded as a message channel and is used for alarm configuration sending and receiving, as well as for data transmission and decoupling of alarm rules. The specific execution process of decoupling is that the alarm trigger time and the actual alarm data calculation time range are not synchronized.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that performs the method of any one of claims 1 to 6.