Help Center/ Distributed Message Service for Kafka/ Best Practices/ Configuring Message Accumulation Monitoring
Updated on 2024-11-27 GMT+08:00

Configuring Message Accumulation Monitoring

Overview

Unprocessed messages accumulate if the client's consumption is slower than the server's sending. Accumulated messages cannot be consumed in time.

Configure alarm rules so that you will be notified when the number of accumulated messages in a consumer group exceeds the threshold. The procedure described in this section can also be applied to setting alarm rules for other metrics.

Prerequisites

You have purchased a Kafka instance, created a topic, and there are available messages.

Procedure

  1. Log in to the console of DMS for Kafka. Click the instance to be configured with an alarm rule.
  2. In the left navigation pane, choose Monitoring And Alarm > Details.
  3. On the By Consumer Group tab page, select the consumer group for which you want to create an alarm rule.

    Figure 1 Selecting a consumer group

  4. Hover the mouse pointer over Consumer Available Messages and click .

    Figure 2 Consumer available messages chart

  5. On the Create Alarm Rule page, enter Name. The alarm name can contain only letters, digits, underscores (_), and hyphens (-).

    Figure 3 Configuring the basic information of the alarm rule

  6. On the Create Alarm Rule page, configure Monitoring Scope. Retain the current settings.
  7. On the Create Alarm Rule page, configure Alarm Policy.

    Figure 4 Configuring the alarm policy

    Alarm policy: A major alarm is generated if the number of raw data records is greater than or equal to 10,000 for one consecutive time. The alarm is notified once a day.

  8. On the Create Alarm Rule page, click Create Notification Policy.
  9. Set the notification policy and click OK.

    Figure 5 Creating a notification policy
    Table 1 Notification policy parameters

    Parameter

    Description

    Language

    Select a language for the notification policy.

    Name

    Set the name of the notification policy.

    Alarm Severity

    Select Major.

    Notification Cause

    Select Alarm triggered which indicates that a notification is sent when an alarm is triggered.

    Recipients

    Select Topic subscription and click Create an SMN topic. On the SMN console, create a topic and add a subscription. After the alarm notification topic is created, go back to the Create Alarm Rule page, click to make the created topic available for selection.

    NOTE:

    After the subscription is added, the corresponding subscription endpoint will receive a subscription notification. You need to confirm the subscription so that the endpoint can receive alarm notifications.

    Days

    Retain the default settings. That is, if an alarm is triggered, a notification is sent every day.

    Notification Window

    Cloud Eye sends notifications only within the validity period specified in the alarm rule. Retain the default settings.

    Notification Templates

    Select Default.

  10. After the notification policy is created, the Create Alarm Rule page is displayed.
  11. Click next to Notification Policies and select the new policy from the drop-down list box.

    Figure 6 Setting a notification policy

  12. Click Create.

    After the alarm rule is created, you can view it on the Alarm Management > Alarm Rules page.

    Figure 7 Viewing the new alarm rule