このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring a Kafka Alarm Rule

Updated on 2025-02-14 GMT+08:00

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:

Table 1 Alarm policies and handling of Kafka instances

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_cpu_core_load

Average Load per CPU Core

Broker

Alarm threshold: original value > 2

Number of consecutive periods: 3

Alarm severity: major

Average load of each CPU core 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.

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.

Configuring Kafka Alarm Rules

The following section describes how to configure alarm rules for a specified Kafka instance.

  1. Log in to the console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
  4. In the navigation pane, choose Kafka Instances.
  5. 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 and Alarms > Monitoring Details in the navigation pane.

  6. Hover the mouse pointer over a metric and click to create an alarm rule for the metric. The Create Alarm Rule page is displayed.
  7. Specify the alarm details.

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

    1. Set the alarm name and description.
    2. Set the alarm policy.

      As shown in the following figure, if the original disk capacity usage is equal to or higher than 80% for consecutive once, an alarm is generated. If the alarm is not handled on time, an alarm notification is sent.

      Figure 1 Setting the alarm policy
    3. Set the alarm notification configurations.

      If you enable Alarm Notification, specify Notification Recipient and Notification Policies.

    4. Click Create.

Enabling One-Click Monitoring

The following section describes how to enable alarm rules for key metrics of all Kafka instances in a region.

  1. Log in to the console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Click and choose Middleware > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
  4. In the navigation pane, choose Kafka Instances.
  5. Click the desired Kafka instance to go to the instance details page.
  6. In the navigation pane, choose Monitoring and Alarms > Alarms. The One-Click Monitoring tab page is displayed.
  7. By default, the alarm rules are in the Disable state. Click Config and the One-Click Monitoring page is displayed on the Cloud Eye console.

    Figure 2 One-click monitoring

  8. Left-click the search box, select Resource Type, select Distributed Message Service from the drop-down list, and click OK.
  9. In the row containing Distributed Message Service, click . The Enable Alarm Rule dialog box is displayed.
  10. A Kafka instance has two preset alarm rules. See Table 2. Enable the alarm rules as required and click OK.

    Figure 3 Enabling alarm rules
    Table 2 Alarm rules

    Alarm Rule

    Dimension

    Policy

    alarm-dms-kafka_broker-metric-defaulth

    Instance

    • A major alarm is generated once a day when the raw number of partitions is greater than or equal to 750 for three consecutive periods.
    • A major alarm is generated once a day when the raw number of topics is greater than or equal to 200 for three consecutive periods.
    • A major alarm is generated once a day when the raw number of stacked messages is greater than or equal to 100,000,000 for three consecutive periods.

    alarm-dms-kafka_instance_id-metric-default

    Broker

    • A critical alarm is generated every 10 minutes when the raw average duration per disk write is greater than 5,000 ms for three consecutive periods.
    • A critical alarm is generated every 10 minutes when the raw average duration per disk read is greater than 5,000 ms for three consecutive periods.
    • A major alarm is generated every hour when the raw average duration for processing consumption requests is greater than 60,000 ms for three consecutive periods.
    • A critical alarm is generated every 10 minutes when the raw JVM heap memory usage is greater than 85% for three consecutive periods.
    • A critical alarm is generated every 10 minutes when the raw disk usage is greater than 85% for three consecutive periods.
    • A critical alarm is generated every 10 minutes when the raw CPU usage is greater than 85% for three consecutive periods.
    • A critical alarm is generated every 10 minutes when the raw active status of a broker is less than 1 for three consecutive periods.
    • A critical alarm is generated every 10 minutes when the raw memory usage is greater than 85% for three consecutive periods.

    Alarm policies can be modified after one-click monitoring is enabled. For details, see One-Click Monitoring.

  11. Go back to the One-Click Monitoring page, click . The alarm rule is in the Enable state.

    If other Kafka instances are available in this region, their alarm rules are enabled, too.

Viewing Alarm Rules of a Kafka Instance

The following procedure describes how to query all alarm rules of a specified Kafka instance.

  1. Log in to the console.
  2. Click in the upper left corner to select the region where your instance is located.
  3. Click in the upper left corner of the console, choose Management & Governance > Cloud Eye.
  4. In the navigation pane, choose Cloud Service Monitoring.
  5. Search for "Distributed Message Service" and press Enter.
  6. Click Distributed Message Service DMS. The Details page is displayed.
  7. 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback