Updated on 2023-11-03 GMT+08:00

Step 5: Configure Alarm Rules

This section describes the alarm policies of some metrics and how to configure them. In actual services, you are advised to configure alarm rules for metrics based on the following alarm policies.

Approach Upper Limit in the following table indicates whether the threshold is close to the upper limit of the performance supported by current resources. If the threshold is close to the upper limit and usage continues to rise, services may be abnormal.

Table 1 RocketMQ instance metrics to configure alarm rules for

Metric Name

Normal Range

Alarm Policy

Approach Upper Limit

Metric Description and Alarm Handling Suggestions

Disk Capacity Usage

0–100

Alarm threshold: Raw data > 85

Number of consecutive periods: 3

Alarm severity: Critical

Yes

Metric description: disk usage of the RocketMQ VM. Unit: %

Handling suggestion: If an alarm is generated for this metric, the current instance specifications are insufficient to carry services. The storage space needs to be expanded. For details, see Modifying Specifications.

Average Load per CPU Core

0–2

Alarm threshold: Raw data > 1.5

Number of consecutive periods: 3

Alarm severity: Major

Yes

Metric description: average load of each CPU core of the RocketMQ VM.

Handling suggestion: If an alarm is generated for this metric, perform the following operations:

  1. Add brokers. For details, see Modifying Specifications.
  2. Redeploy existing topics to the new brokers. For details, see Modifying Topic Parameters.

Memory Usage

0–100

Alarm threshold: Raw data > 85

Number of consecutive periods: 3

Alarm severity: Critical

Yes

Metric description: memory usage of the RocketMQ VM. Unit: %

Handling suggestion: If an alarm is generated for this metric, perform the following operations:

  1. Add brokers. For details, see Modifying Specifications.
  2. Redeploy existing topics to the new brokers. For details, see Modifying Topic Parameters.

Procedure

  1. Log in to the console.
  2. Click in the upper left corner to select a region.

    Select the same region as your application service.

  3. Click and choose Application > Distributed Message Service (for RocketMQ) to open the console of DMS for RocketMQ.
  4. Click View Metric next to the RocketMQ instance name to go to the instance monitoring page of the Cloud Eye console.
  5. Hover the mouse pointer over a metric and click to create an alarm rule for the metric.

    The Create Alarm Rule page is displayed.

  6. Specify the alarm rule details.

    For more information about creating alarm rules, see Creating an Alarm Rule.

    1. Enter the alarm name and description.
    2. Specify the alarm policy and alarm severity.

      As shown in the following figure, if the original disk capacity usage exceeds 85% for three consecutive periods, an alarm is generated. If the alarm is not handled on time, an alarm notification is sent.

      Figure 1 Setting the alarm policy and alarm severity
    3. Set the alarm notification configurations. If you enable Alarm Notification, set the validity period, notification object, and trigger condition.
    4. Click Create.