Configuring a Kafka Alarm Rule
This section describes the alarm rules 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:
Metric ID |
Metric |
Monitored Object |
Alarm Policy |
Description |
Handling Suggestion |
---|---|---|---|---|---|
broker_disk_usage |
Disk Capacity Usage |
Broker |
Alarm threshold: original value > 80% Number of consecutive periods: 1 Alarm severity: critical |
Disk usage of the Kafka VM |
Modify the instance storage space. For details, see Modifying Instance Specifications. |
broker_memory_usage |
Memory Usage |
Broker |
Alarm threshold: original value > 90% Number of consecutive periods: 3 Alarm severity: critical |
Memory usage of the Kafka VM. |
Modify the instance bandwidth or the number of brokers. For details, see Modifying Instance Specifications. |
current_partitions |
Partitions |
Instance |
Alarm threshold: original value > 90% of the maximum allowed number of partitions. The partition limit varies depending on instance specifications. For details, see Specifications. Number of consecutive periods: 1 Alarm severity: major |
Number of used partitions in the instance. |
If new topics are required, modify the instance bandwidth or the number of brokers, or split the service to multiple instances. For details about how to modify the instance bandwidth or the number of brokers, see Modifying Instance Specifications. |
broker_cpu_usage |
CPU Usage |
Broker |
Alarm threshold: original value > 90% Number of consecutive periods: 3 Alarm severity: major |
CPU usage of the Kafka VM. |
Check whether the metric has been approaching or exceeding the alarm threshold for a long time. If yes, modify the instance bandwidth or the number of brokers. For details, see Modifying Instance Specifications. |
group_msgs |
Accumulated Messages |
Instance |
Alarm threshold: original value > 90% of the upper limit. The upper limit is customized. Number of consecutive periods: 1 Alarm severity: major |
Total number of accumulated messages in all consumer groups of the instance |
Delete idle consumer groups, if any. You can also accelerate message retrieval, for example, by increasing the number of consumers. |
topic_messages_remained |
Topic Available Messages |
Consumer group |
Alarm threshold: original value > 90% of the upper limit. The upper limit is customized. Number of consecutive periods: 1 Alarm severity: major |
Number of remaining messages that can be retrieved from the specified topic in the consumer group. |
Check whether the consumer code logic is correct, for example, by checking whether the consumer stops consuming messages due to an exception. You can also accelerate message retrieval, for example, by adding topic consumers. Ensure that the number of partitions is greater than or equal to the number of consumers. |
task_status |
Task Status |
Smart Connect task |
Alarm threshold: Raw value < 1 Number of consecutive periods: 3 Alarm severity: major |
Whether Smart Connect tasks are in the normal state. |
Pause the Smart Connect task, then restart it, and check whether the task status is recovered. If the fault persists, contact customer service. |
Configuring Kafka Alarm Rules
The following section describes how to configure alarm rules for a specified Kafka instance.
- Log in to the Kafka console.
- Click
in the upper left corner to select the region where your instance is located.
- Go to the monitoring page in either of the following ways:
- Click View Metric in the row containing the desired Kafka instance.
- Click the desired Kafka instance to go to the instance details page. Choose Monitoring > Monitoring Details in the navigation pane.
- Hover the mouse pointer over a metric and click
to create an alarm rule for the metric. The Create Alarm Rule page is displayed.
- Specify the alarm details.
For more information about creating alarm rules, see Creating an Alarm Rule.
- Set the alarm name and description.
- Set the alarm policy.
As shown in the following figure, if the original disk capacity usage is equal to or higher than 80% once, an alarm is generated. If the alarm is not handled on time, an alarm notification is sent.
Figure 1 Setting the alarm policy - Set the alarm notification configurations.
If you enable Alarm Notification, specify Notification Recipient and Notification Policies.
- Click Create.
Viewing Alarm Rules of a Kafka Instance
The following procedure describes how to query all alarm rules of a specified Kafka instance.
- Log in to the Kafka console.
- Click
in the upper left corner to select the region where your instance is located.
- Click
in the upper left corner of the console, choose Management & Governance > Cloud Eye.
- In the navigation pane, choose Cloud Service Monitoring.
- Search for "Distributed Message Service" and press Enter.
- Click Distributed Message Service DMS. The Details page is displayed.
- In the row containing the desired Kafka instance, choose More > View Alarm Rule. All alarm rules of this Kafka instance are displayed in the View Alarm Rule dialog box.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot