Help Center> Distributed Message Service for Kafka> Best Practices> Configuring an Alarm Rule for Accumulated Messages
Updated on 2023-09-15 GMT+08:00

Configuring an Alarm Rule for Accumulated Messages

Scenario

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.
  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
    • Consumer Group: Select the consumer group for which you want to create an alarm rule.
    • Topic: Select All topics.

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

    Figure 2 Consumer available messages chart

  5. On the Create Alarm Rule page, configure the basic information of the alarm rule.

    Figure 3 Configuring the basic information of the alarm rule
    • Name: name of the alarm rule
    • (Optional) Description: description of the alarm rule

  6. Configure the alarm policy.

    Figure 4 Configuring the alarm policy
    • Method: Select Configure manually.
    • Alarm Policy: Specify the conditions for triggering an alarm. An alarm will be triggered if the metric data in the specified number of consecutive periods reaches the specified threshold.
    • Alarm Severity: Select an alarm severity as required.

  7. Configure the alarm notification.

    Figure 5 Configuring the alarm notification
    • Alarm Notification: Enable this option.
    • Notification Recipient: Select Topic subscription.
    • Notification Object: Select a cloud account contact or a created alarm notification topic. An alarm notification topic contains the mobile number or email address receiving the notification.

      If no alarm notification topics are available, 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.

      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.

      Figure 6 Creating an alarm notification topic
      Figure 7 Adding a subscription
    • Validity Period: Cloud Eye sends notifications only within the validity period specified in the alarm rule.
    • Trigger Condition: condition for triggering an alarm notification.

  8. Configure the enterprise project and tag.

    Figure 8 Configuring the enterprise project and tag.
    • Enterprise Project: enterprise project with which the alarm rule is associated. Only users who have the permissions of the enterprise project can view and manage the alarm rule.
    • Tag: tags are used to identify cloud resources. When you have many cloud resources of the same type, you can use tags to classify cloud resources by dimension (for example, usage, owner, or environment).

  9. Click Create.

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

    Figure 9 Viewing the new alarm rule