CN107509119B - Monitoring alarm method and device - Google Patents

Monitoring alarm method and device Download PDF

Info

Publication number
CN107509119B
CN107509119B CN201710561750.XA CN201710561750A CN107509119B CN 107509119 B CN107509119 B CN 107509119B CN 201710561750 A CN201710561750 A CN 201710561750A CN 107509119 B CN107509119 B CN 107509119B
Authority
CN
China
Prior art keywords
message
identifier
consumer
subject
alarm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710561750.XA
Other languages
Chinese (zh)
Other versions
CN107509119A (en
Inventor
张晓鹏
杨武明
张菊元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing longzhixin Technology Co.,Ltd.
Original Assignee
Beijing Panda Mutual Entertainment Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Panda Mutual Entertainment Technology Co Ltd filed Critical Beijing Panda Mutual Entertainment Technology Co Ltd
Priority to CN201710561750.XA priority Critical patent/CN107509119B/en
Publication of CN107509119A publication Critical patent/CN107509119A/en
Application granted granted Critical
Publication of CN107509119B publication Critical patent/CN107509119B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4882Data services, e.g. news ticker for displaying messages, e.g. warnings, reminders
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0603Catalogue ordering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0605Supply or demand aggregation

Landscapes

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

Abstract

The embodiment of the invention provides a monitoring alarm method and device, and relates to the technical field of internet. Wherein the method comprises the following steps: acquiring consumption offset of a message in a partition of a specified message theme consumed by a message consumer; judging whether the messages of the specified message theme are piled or not according to the consumption offset and the total amount of the messages in the subareas; and if the accumulation exists, determining whether to send alarm information to a target object according to the message consumer identification, the specified message subject identification or the combination of the message consumer identification and the specified message subject identification. The embodiment of the invention can realize automatic monitoring of the message consumption condition and improve the timeliness of message blocking alarm.

Description

Monitoring alarm method and device
Technical Field
The invention relates to the technical field of internet, in particular to a monitoring alarm method and a monitoring alarm device.
Background
Generally, a message consumer obtains some type of information from the Kafka cluster for statistics, for example, in the field of live webcast, the message consumer obtains behavior information of gifts given by audience users from the Kafka cluster, and statistical analysis is performed on the behavior information to obtain leader board data of the gifts contributed by the audience users.
Although the message producer sends the message generated in real time to the Kafka cluster for storage, and the message consumer obtains the message from the Kafka cluster in an off-line manner for processing, some special statistical data require updating the data within a certain delay range, and if the message production of the message producer increases suddenly or the equipment of the message consumer fails within a certain period of time, the statistical data cannot be updated in time.
Disclosure of Invention
The invention provides a monitoring alarm method and a monitoring alarm device, which are used for realizing automatic monitoring of message consumption conditions and improving the timeliness of message blocking alarm.
In order to solve the technical problem, the invention provides a monitoring alarm method, which comprises the following steps:
acquiring consumption offset of a message in a partition of a specified message theme consumed by a message consumer;
judging whether the messages of the specified message theme are piled or not according to the consumption offset and the total amount of the messages in the subareas;
and if the accumulation exists, determining whether to send alarm information to a target object according to the message consumer identification, the specified message subject identification or the combination of the message consumer identification and the specified message subject identification.
Optionally, the obtaining a consumption offset of the message in a partition of the specified message topic consumed by the message consumer includes:
sending request information for acquiring message consumption information to a service provider which records the message consumption information of a plurality of message consumers in real time, wherein the request for acquiring carries the message consumer identification, the consumption subject identification and the partition identification;
and acquiring the consumption offset from the received message consumption information.
Optionally, the determining whether there is a pile of the messages of the specified message topic according to the consumption offset and the total amount of the messages in the partition includes:
calculating the difference value between the total message amount and the offset;
acquiring a corresponding threshold according to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier;
and if the difference is larger than the threshold value, judging that the messages of the message subjects are piled up.
Optionally, the obtaining a corresponding threshold according to the message consumer identifier, the message subject identifier, or a combination of the message consumer identifier and the message subject identifier includes:
searching whether an alarm rule item related to the message consumer identification, the message subject identification or the message consumer identification and the message subject combination identification exists in a custom alarm rule;
if yes, obtaining the threshold value from the alarm rule item;
and if not, acquiring the threshold value from the global alarm rule.
Optionally, if there is accumulation, determining whether to send alarm information to a target object according to the message consumer identifier, the specified message topic identifier, or a combination of the message consumer identifier and the specified message topic identifier, including:
and if the accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier exists in the custom alarm rule, acquiring the target object from the alarm rule item and sending alarm information to the target object.
Optionally, if there is accumulation, determining whether to send alarm information to a target object according to the message consumer identifier, the specified message subject identifier, or a combination of the message consumer identifier and the specified message subject identifier, further including:
if accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination does not exist in the custom alarm rule, searching whether the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination exists in a white list;
if yes, not sending alarm information to the target object;
and if not, acquiring the target object from the global alarm rule and sending alarm information to the target object.
In order to solve the above technical problem, the present invention further provides a monitoring alarm device, including:
the acquisition module is used for acquiring the consumption offset of the message in a partition of the specified message theme consumed by the message consumer;
the judging module is used for judging whether the messages of the specified message theme are accumulated or not according to the consumption offset and the total amount of the messages in the subarea;
and the determining module is used for determining whether to send alarm information to a target object according to the message consumer identifier, the specified message subject identifier or the combination of the message consumer identifier and the specified message subject identifier if the accumulation exists.
In the technical scheme provided by the embodiment of the invention, whether the message consumer blocks the message in the message theme when consuming the message in the message theme can be determined according to the consumption offset of the message in a certain partition of the message theme consumed by the message consumer and the total amount of the message in the partition, and if the message in the message theme is blocked, the situation that the message theme is consumed by the consumer is judged to be unnecessary to send alarm information to a responsible person; the automatic monitoring function of the message consumption condition is realized, the alarm information can be sent out in a targeted manner without the need of personnel on duty, and the timeliness of the alarm is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flow chart of a monitoring alarm method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of each partition under a message topic in the Kafka cluster according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a monitoring alarm method according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a monitoring alarm device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX from each other. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a monitoring", depending on the context. Similarly, the phrase "if it is determined" or "if it is monitored (a stated condition or event)" may be interpreted as "when determining" or "in response to determining" or "when monitoring (a stated condition or event)" or "in response to monitoring (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Fig. 1 is a schematic flow chart of a monitoring alarm method according to an embodiment of the present invention. As shown in fig. 1, the method includes:
101. a consumption offset is obtained for a message within a partition of a specified message topic consumed by a message consumer.
102. And judging whether the messages of the specified message subject matter are piled or not according to the consumption offset and the total amount of the messages in the subarea.
103. And if the accumulation exists, determining whether to send alarm information to a target object according to the message consumer identification, the specified message subject identification or the combination of the message consumer identification and the specified message subject.
In practical applications, the messages in the Kafka cluster are sorted and stored by message Topic (Topic). The message data in a message topic is organized according to a plurality of partitions (partitions), the partitions are the minimum units of Kafka message queue organization, and one Partition can be regarded as a FIFO (First Input First Output) queue. For example, each message in each partition under the message topic of the bullet screen is identified as bullet screen information by the message topic, wherein the bullet screen information includes a user ID, an anchor ID, bullet screen content and a timestamp; each message in each partition under the message subject with the message subject identification as the gift is gift sending information, wherein the gift sending information comprises a user ID, a main broadcasting ID, gift sending content and a timestamp, and the gift sending content comprises a gift name, a gift number and unit price.
Each message in each partition is correspondingly stored with an index value, which indicates the position of each message in each partition, for example, the index value of the first message entering the partition is 0, the index value of the second message is 1, the index value of the third message is 2, and so on. FIG. 2 shows the partition structure under one message topic in a Kafka cluster.
When a message consumer consumes a message in a certain partition under a certain message topic from the Kafka cluster, message consumption information of the message consumer is correspondingly recorded in a server (for example, zookeeper), wherein the message consumption information comprises a message consumer identifier, a message topic identifier, a partition identifier and a consumption offset.
In an implementation scheme, for each message to be processed acquired by a message consumer from a partition under a message topic in the Kafka cluster, the consumption offset of zookeeper corresponding to the message consumer identifier, the message topic identifier, and the partition identifier is increased by 1.
In the step 101, the step of obtaining the consumption offset of the message in the partition of the specified message topic consumed by the message consumer can be implemented by one or more of the following ways:
the method I is that the consumption offset of the message in the subarea of the message subject consumed by the message consumer is directly obtained from the server.
The specific implementation mode is as follows: sending request information for acquiring consumption offset to a service provider which records the message consumption information of a plurality of message consumers in real time, wherein the request information carries the message consumer identification, the message subject identification and the partition identification; and receiving the consumption offset returned by the service provider.
And secondly, firstly acquiring the message consumption information of the message in the subarea of the message theme consumed by the message consumption method from the server, and then extracting the consumption offset of the message in the subarea of the message theme consumed by the message consumer from the acquired message consumption information.
The specific implementation mode is as follows: sending request information for acquiring message consumption information to a service provider which records the message consumption information of a plurality of message consumers in real time, wherein the request for acquiring carries the message consumer identification, the consumption subject identification and the partition identification; and acquiring the consumption offset from the received message consumption information of the message consumer.
In the above step 102, it is determined whether the messages of the specified message topic are accumulated, that is, whether a jam occurs when the message consumer consumes the messages of the specified message topic is determined according to the consumption offset and the total amount of the messages in the partition. Determining whether there is accumulation of the messages for formulating the message topic, wherein one of the following methods is adopted to determine:
calculating a difference value between the total message amount and the offset; if the difference value is larger than the threshold value, judging that the messages of the message subjects are piled up; and if the difference is less than or equal to the threshold value, judging that the messages of the message subjects do not exist in accumulation.
Calculating a difference value between the total amount of the messages and the offset, and comparing the ratio of the difference value to the total amount with the threshold value; if the ratio is larger than the threshold value, judging that the messages of the message subjects are piled up; and if the ratio is less than or equal to the threshold value, judging that the messages of the message subjects do not exist in pile.
In practical application, when any message consumer is not blocked when consuming any message with any message theme, the message needs to be processed in time by a background responsible person. For example, statistical data counted by a message consumer is only used for reference in making certain decisions in the future, that is, the statistical data has low requirement on the time delay, so that the alarm information does not need to be sent to the back-end responsible person for corresponding processing in this case. Therefore, in practical applications, a white list without alarm can be set in advance, for example: if the white list records the message theme mark A, the blockage situation occurs when any message consumer consumes the message in the message theme A, and no alarm is needed; if the white list records the message consumer identification B, the message consumer B is indicated to have a blocking condition when consuming the message in any message subject, and no alarm is needed; and if the combination of the message subject identifier C and the message consumer identifier D is recorded in the white list, the blocking condition is indicated when the message consumer D consumes the message in the message subject identifier C, and no alarm is needed.
In step 103, if it is determined in step 102 that there is a situation where the messages of the message subject are accumulated, it is necessary to first determine whether an alarm is required in such a situation, and the determination process is as follows:
and searching whether the message consumer identification, the specified message subject identification or the combination of the message consumer identification and the specified message subject identification exists in the white list, if so, not sending alarm information to a target object, and if not, sending the alarm information to the target object. The target object can be one or a plurality of background responsible persons. The alarm information can be sent in a short message or micro message mode.
In the technical scheme provided by the embodiment of the invention, whether the message consumer blocks the message in the message theme when consuming the message in the message theme can be determined according to the consumption offset of the message in a certain partition of the message theme consumed by the message consumer and the total amount of the message in the partition, and if the message in the message theme is blocked, the situation that the message theme is consumed by the consumer is judged to be unnecessary to send alarm information to a responsible person; the automatic monitoring function of the message consumption condition is realized, the alarm information can be sent out in a targeted manner without the need of personnel on duty, and the timeliness of the alarm is improved.
Fig. 3 is a schematic flow chart of a monitoring alarm method according to another embodiment of the present invention. As shown in fig. 3, the method includes:
201. a consumption offset is obtained for a message within a partition of a specified message topic consumed by a message consumer.
202. And calculating the difference value of the total message amount and the offset.
203. And acquiring a corresponding threshold value according to the message consumer identification, the message subject identification or the combination of the message consumer identification and the message subject identification.
204. And if the difference is larger than the threshold value, judging that the messages of the message subjects are piled up.
205. And if the accumulation exists, determining whether to send alarm information to a target object according to the message consumer identification, the specified message subject identification or the combination of the message consumer identification and the specified message subject identification.
In the step 201, reference may be made to corresponding contents in the above embodiments, which are not described herein again.
In the above step 202, the difference is the amount of messages not consumed by the message consumer in the partition.
It should be noted that the message generator will store the message generated in real time into Kafka, so that the total amount of messages in the partition of the specified message topic in Kafka is dynamically changed.
In step 203, different thresholds may be set in advance according to different message consumers and/or the urgency of the statistical data corresponding to the specified message topic. For example, if statistical data of the gifting information (e.g., a leader board of the gifts' contribution) is required to be presented on the live-air page in real time, i.e., is required to be updated within a small delay time, a small threshold may be set corresponding to the message subject whose subject is identified as the gifts. For another example, if all statistics of message consumer a statistics need to be used in real time, a smaller threshold may be set for the message consumer a. Of course, a threshold may also be set for situations where a particular message consumer consumes a message within a particular message topic.
In this way, the corresponding threshold value can be obtained subsequently according to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier. The method and the device realize differentiated alarm service, improve alarm efficiency and avoid the frequent sending of unnecessary alarm information caused by uniformly setting threshold values.
In an achievable scheme, a configuration interface of a custom alarm rule can be provided for a background person in charge; the background responsible person can set corresponding alarm rule items aiming at the message consumers and/or the message subjects with special requirements through the configuration interface. For example: the alarm rule item 1 includes: the message consumer identifier C and the threshold T1 indicate that when the message consumer C consumes any message theme, the threshold T1 is adopted to judge whether a blocking condition exists; the alarm rule item 2 includes: the combination of the message consumer B and the message topic B, the threshold T2, indicates that the message consumer B adopts the threshold T2 to judge whether there is a jam condition when consuming the message topic B. In addition, a global alarm rule can be uniformly set for message consumers and/or message subjects without special requirements, wherein the global alarm rule corresponds to a uniform threshold value.
Then, according to the message consumer identifier, the message subject identifier, or the combination of the message consumer identifier and the message subject identifier, a corresponding threshold value is obtained, which may be specifically implemented by the following method: searching whether an alarm rule item related to the message consumer identification, the message subject identification or the combination of the message consumer identification and the message subject identification exists in a custom alarm rule; if yes, obtaining the threshold value from the alarm rule item; and if not, acquiring the threshold value from the global alarm rule.
In the step 204, after the corresponding threshold is obtained, comparing the difference with the threshold, and if the difference is greater than the threshold, determining that the messages of the message subject are accumulated; and if the difference is smaller than or equal to the threshold value, judging that the messages of the message subjects are piled up.
The above step 205 can be implemented by referring to the corresponding contents in the above embodiments. Of course, the following method can be adopted:
in practical application, the whole statistical system is correspondingly provided with a plurality of global responsible persons, and each message consumer or each message subject is correspondingly provided with a plurality of special responsible persons. Therefore, the target object of the alarm may be different from case to case. Therefore, different target objects may also be set with reference to the above-described method of setting different thresholds.
In an achievable scheme, a configuration interface of a custom alarm rule can be provided for a background person in charge; the background responsible person can set corresponding alarm rule items aiming at the message consumers and/or the message subjects with special requirements through the configuration interface. For example: the alarm rule item 3 includes: the message consumer identifier C and the target object are a responsible person U1, and when the message consumer identifier C shows that the message consumer C is blocked when consuming any message theme, alarm information is sent to the responsible person U1; the alarm rule item 4 includes: and the target object is a responsible person U2, and the message consumer B sends alarm information to the responsible person U2 when the message consumer B is blocked when consuming the message theme B. In addition, a global alarm rule can be uniformly set for message consumers and/or message subjects without special requirements, and the global alarm rule corresponds to a uniform responsible person.
It should be noted that the threshold and the target object may be set in one custom alarm rule item at the same time. For example: the alarm rule item 5 includes: the message consumer identification C, the threshold T1 and the target object are responsible persons U1.
Thus, the step 205 can be implemented as follows: and if the accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier exists in the custom alarm rule, acquiring the target object from the alarm rule item and sending alarm information to the target object. If accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination does not exist in the custom alarm rule, searching whether the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination exists in a white list; if yes, not sending alarm information to the target object; and if not, acquiring the target object from the global alarm rule and sending alarm information to the target object.
In the technical scheme provided by the embodiment of the invention, whether the message consumer blocks the message in the message theme when consuming the message in the message theme can be determined according to the consumption offset of the message in a certain partition of the message theme consumed by the message consumer and the total amount of the message in the partition, and if the message in the message theme is blocked, the situation that the message theme is consumed by the consumer is judged to be unnecessary to send alarm information to a responsible person; the automatic monitoring function of the message consumption condition is realized, the alarm information can be sent out in a targeted manner without the need of personnel on duty, and the timeliness of the alarm is improved.
Fig. 4 is a schematic structural diagram of a monitoring alarm device according to an embodiment of the present invention. As shown in fig. 4, the apparatus includes: an acquisition module 301, a determination module 302, and a determination module 303.
An obtaining module 301, configured to obtain a consumption offset of a message in a partition of a specified message topic consumed by a message consumer.
A determining module 302, configured to determine whether there is a pile of the messages of the specified message topic according to the consumption offset and the total amount of the messages in the partition.
A determining module 303, configured to determine whether to send alarm information to a target object according to the message consumer identifier, the specified message topic identifier, or a combination of the message consumer identifier and the specified message topic identifier if there is accumulation.
Optionally, the obtaining module 301 includes:
a sending unit, configured to send request information for obtaining message consumption information to a service provider that records message consumption information of multiple message consumers in real time, where the obtained request carries the message consumer identifier, the consumption subject identifier, and the partition identifier; .
And the first acquisition unit is used for acquiring the consumption offset from the received message consumption information.
Optionally, the determining module 302 includes a calculating unit, a second obtaining unit and a determining unit.
And the calculating unit is used for calculating the difference value between the total message amount and the offset.
And the second acquisition unit is used for acquiring a corresponding threshold value according to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier.
And the judging unit is used for judging that the messages of the message subjects are piled if the difference value is larger than the threshold value.
Optionally, the second obtaining unit is specifically configured to:
searching whether an alarm rule item related to the message consumer identification, the message subject or the combination of the message consumer identification and the message subject identification exists in a custom alarm rule;
if yes, obtaining the threshold value from the alarm rule item;
and if not, acquiring the threshold value from the global alarm rule.
Optionally, the determining module 303 is specifically configured to:
and if the accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier exists in the custom alarm rule, acquiring the target object from the alarm rule item and sending alarm information to the target object.
Optionally, the determining module 303 is specifically configured to:
if accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination does not exist in the custom alarm rule, searching whether the message consumer identifier, the message subject or the message consumer identifier and the message subject identifier combination exist in a white list; if yes, not sending alarm information to the target object; and if not, acquiring the target object from the global alarm rule and sending alarm information to the target object.
In the technical scheme provided by the embodiment of the invention, whether the message consumer blocks the message in the message theme when consuming the message in the message theme can be determined according to the consumption offset of the message in a certain partition of the message theme consumed by the message consumer and the total amount of the message in the partition, and if the message in the message theme is blocked, the situation that the message theme is consumed by the consumer is judged to be unnecessary to send alarm information to a responsible person; the automatic monitoring function of the message consumption condition is realized, the alarm information can be sent out in a targeted manner without the need of personnel on duty, and the timeliness of the alarm is improved.
Here, it should be noted that: the monitoring alarm device provided in this embodiment can implement the technical solutions provided in the above monitoring alarm method embodiments, and specific implementation principles can refer to corresponding contents in the above embodiments, which are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A monitoring alarm method is characterized by comprising the following steps:
acquiring consumption offset of a message in a partition of a specified message theme consumed by a message consumer;
judging whether the messages of the specified message theme are piled or not according to the consumption offset and the total amount of the messages in the subareas;
and if the accumulation exists, determining whether to send alarm information to a target object according to the message consumer identification, the specified message subject identification or the combination of the message consumer identification and the specified message subject identification.
2. The method of claim 1, wherein obtaining a consumption offset for a message within a partition for which a message consumer consumes a specified message topic comprises:
sending request information for acquiring message consumption information to a service provider which records the message consumption information of a plurality of message consumers in real time, wherein the request for acquiring carries the message consumer identification, the consumption subject identification and the partition identification;
and acquiring the consumption offset from the received message consumption information.
3. The method of claim 1 or 2, wherein said determining whether there is a pile of messages of the specified message topic based on the consumption offset and the total amount of messages in the partition comprises:
calculating the difference value between the total message amount and the offset;
acquiring a corresponding threshold according to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier;
and if the difference is larger than the threshold value, judging that the messages of the message subjects are piled up.
4. The method of claim 3, wherein obtaining the corresponding threshold according to the message consumer id, the message subject id, or a combination of the message consumer id and the message subject id comprises:
searching whether an alarm rule item related to the message consumer identification, the message subject identification or the combination of the message consumer identification and the message subject identification exists in a custom alarm rule;
if yes, obtaining the threshold value from the alarm rule item;
and if not, acquiring the threshold value from the global alarm rule.
5. The method of claim 4, wherein if there is a pile-up, determining whether to send alarm information to a target object according to the message consumer identifier, the specified message subject identifier, or a combination of the message consumer identifier and the specified message subject identifier comprises:
and if the accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier exists in the custom alarm rule, acquiring the target object from the alarm rule item and sending alarm information to the target object.
6. The method of claim 4, wherein if there is a pile-up, determining whether to send alert information to a target object according to the message consumer identifier, the specified message topic identifier, or a combination of the message consumer identifier and the specified message topic identifier, further comprising:
if accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination does not exist in the custom alarm rule, searching whether the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination exists in a white list;
if yes, not sending alarm information to the target object;
and if not, acquiring the target object from the global alarm rule and sending alarm information to the target object.
7. A monitoring alarm device, comprising:
the acquisition module is used for acquiring the consumption offset of the message in a partition of the specified message theme consumed by the message consumer;
the judging module is used for judging whether the messages of the specified message theme are accumulated or not according to the consumption offset and the total amount of the messages in the subarea;
and the determining module is used for determining whether to send alarm information to a target object according to the message consumer identifier, the specified message subject identifier or the combination of the message consumer identifier and the specified message subject identifier if the accumulation exists.
8. The apparatus of claim 7, wherein the obtaining module comprises:
a sending unit, configured to send request information for obtaining message consumption information to a service provider that records message consumption information of multiple message consumers in real time, where the obtained request carries the message consumer identifier, the consumption subject identifier, and the partition identifier;
and the first acquisition unit is used for acquiring the consumption offset from the received message consumption information.
9. The apparatus of claim 7 or 8, wherein the determining module comprises:
a calculating unit, configured to calculate a difference between the total message amount and the offset;
a second obtaining unit, configured to obtain a corresponding threshold according to the message consumer identifier, the message subject identifier, or a combination of the message consumer identifier and the message subject identifier;
and the judging unit is used for judging that the messages of the message subjects are piled if the difference value is larger than the threshold value.
10. The apparatus according to claim 9, wherein the second obtaining unit is specifically configured to:
searching whether an alarm rule item related to the message consumer identification, the message subject or the combination of the message consumer identification and the message subject identification exists in a custom alarm rule;
if yes, obtaining the threshold value from the alarm rule item;
and if not, acquiring the threshold value from the global alarm rule.
11. The apparatus of claim 10, wherein the determining module is specifically configured to:
and if the accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the combination of the message consumer identifier and the message subject identifier exists in the custom alarm rule, acquiring the target object from the alarm rule item and sending alarm information to the target object.
12. The apparatus of claim 10, wherein the determining module is specifically configured to:
if accumulation exists and an alarm rule item related to the message consumer identifier, the message subject identifier or the message consumer identifier and the message subject identifier combination does not exist in the custom alarm rule, searching whether the message consumer identifier, the message subject or the message consumer identifier and the message subject identifier combination exist in a white list;
if yes, not sending alarm information to the target object;
and if not, acquiring the target object from the global alarm rule and sending alarm information to the target object.
CN201710561750.XA 2017-07-11 2017-07-11 Monitoring alarm method and device Active CN107509119B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710561750.XA CN107509119B (en) 2017-07-11 2017-07-11 Monitoring alarm method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710561750.XA CN107509119B (en) 2017-07-11 2017-07-11 Monitoring alarm method and device

Publications (2)

Publication Number Publication Date
CN107509119A CN107509119A (en) 2017-12-22
CN107509119B true CN107509119B (en) 2020-02-21

Family

ID=60678894

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710561750.XA Active CN107509119B (en) 2017-07-11 2017-07-11 Monitoring alarm method and device

Country Status (1)

Country Link
CN (1) CN107509119B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110825533B (en) * 2018-08-10 2022-12-20 网宿科技股份有限公司 Data transmitting method and device
CN109190025B (en) * 2018-08-21 2021-09-14 北京京东尚科信息技术有限公司 Information monitoring method, device, system and computer readable storage medium
CN110502402B (en) * 2019-08-28 2023-03-21 中国联合网络通信集团有限公司 Message processing method and device and terminal device
CN111723070A (en) * 2020-06-18 2020-09-29 中国银行股份有限公司 Method and system for detecting data loss
CN112395103B (en) * 2020-11-02 2022-09-13 天津五八到家货运服务有限公司 Method and device for sending delay message and storage medium
CN115174346B (en) * 2022-09-02 2023-03-28 平安银行股份有限公司 Message queue-based delay alarm method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486134A (en) * 2014-12-30 2015-04-01 北京奇虎科技有限公司 Method and device for monitoring file transmission backlog
CN106371968A (en) * 2016-08-23 2017-02-01 北京奇虎科技有限公司 Method and apparatus for monitoring real-time computation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10108480B2 (en) * 2015-11-06 2018-10-23 HomeAway.com, Inc. Data stream processor and method to counteract anomalies in data streams transiting a distributed computing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486134A (en) * 2014-12-30 2015-04-01 北京奇虎科技有限公司 Method and device for monitoring file transmission backlog
CN106371968A (en) * 2016-08-23 2017-02-01 北京奇虎科技有限公司 Method and apparatus for monitoring real-time computation

Also Published As

Publication number Publication date
CN107509119A (en) 2017-12-22

Similar Documents

Publication Publication Date Title
CN107509119B (en) Monitoring alarm method and device
CN106548402B (en) Resource transfer monitoring method and device
CN103220173B (en) A kind of alarm monitoring method and supervisory control system
CN110784355B (en) Fault identification method and device
CN104579912B (en) Data pushing method and device
CN109152061B (en) Channel allocation method, device, server and storage medium
CN109377401B (en) Data processing method, device, system, server and storage medium
US20190334785A1 (en) Forecasting underutilization of a computing resource
CN111538563A (en) Event analysis method and device for Kubernetes
CN111371672A (en) Message pushing method and device
US20210058811A1 (en) Method and apparatus for detecting time series data
CN110706030A (en) Advertisement putting method, device, system and storage medium
CN103888919A (en) Short message monitoring method and device thereof
CN111338888A (en) Data statistical method and device, electronic equipment and storage medium
CN110569509A (en) risk group identification method and device
CN112396432B (en) Interview task generation system, interview task generation method, interview task generation equipment and interview task generation medium
CN112733010A (en) Message pushing method and device, electronic equipment and computer readable storage medium
CN110009273B (en) Information processing method and device, storage medium, and electronic device
CN111582796A (en) Express monitoring system and method based on image recognition
CN116545740A (en) Threat behavior analysis method and server based on big data
CN109218062B (en) Internet service alarm method and device based on confidence interval
CN116055401A (en) Message processing method, device, equipment and storage medium
CN110766102B (en) Method, device, equipment and storage medium for determining residence time
EP3975598A1 (en) Method, apparatus, and device for subscribing resources in field of internet of things, and storage medium
CN113835905A (en) Message queue load balancing method and device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210311

Address after: 101300 309, 3rd floor, 60 Fuqian 1st Street, Tianzhu District, Shunyi District, Beijing

Patentee after: Beijing longzhixin Technology Co.,Ltd.

Address before: 100041 room 120, 4th floor, building 17, yard 30, Shixing street, Shijingshan District, Beijing

Patentee before: BEIJING PANDA MUTUAL ENTERTAINMENT TECHNOLOGY Co.,Ltd.