ALM-38001 Insufficient Kafka Disk Capacity

Description

The system checks the Kafka disk usage every 60 seconds and compares the actual disk usage with the threshold. The disk usage has a default threshold. This alarm is generated when the disk usage is greater than the threshold.

You can change the threshold in O&M > Alarm > Thresholds. Under the service list, choose Kafka > Disk > Broker Disk Usage (Broker) and change the threshold.

When the Trigger Count is 1, this alarm is cleared when the Kafka disk usage is less than or equal to the threshold. When the Trigger Count is greater than 1, this alarm is cleared when the Kafka disk usage is less than or equal to 90% of the threshold.

Attribute

Alarm ID

Alarm Severity

Automatically Cleared

38001

Major

Yes

Parameters

Name

Meaning

Source

Specifies the cluster for which the alarm is generated.

ServiceName

Specifies the service for which the alarm is generated.

RoleName

Specifies the role for which the alarm is generated.

HostName

Specifies the host for which the alarm is generated.

PartitionName

Specifies the disk partition where the alarm is generated.

Trigger Condition

Specifies the threshold triggering the alarm. If the current indicator value exceeds this threshold, the alarm is generated.

Impact on the System

Kafka data write operations are affected.

Possible Causes

  • The configuration (such as number and size) of the disks for storing Kafka data cannot meet the requirement of the current service traffic, due to which the disk usage reaches the upper limit.

  • Data retention time is too long, due to which the data disk usage reaches the upper limit.

  • The service plan does not distribute data evenly, due to which the usage of some disks reaches the upper limit.

Procedure

Check the disk configuration of Kafka data.

  1. On the FusionInsight Manager portal and click O&M > Alarm > Alarms.

  2. In the alarm list, locate the alarm and obtain HostName from Location.

  3. Click Cluster > Name of the desired cluster > Hosts.

  4. In the host list, click the host name obtained in 2.

  5. Check whether the Disk area contains the partition name in the alarm.

    • If yes, go to 6.

    • If no, manually clear the alarm and no further operation is required.

  6. Check whether the disk partition usage contained in the alarm reaches 100% in the Disk area.

Check the Kafka data storage duration.

  1. Choose Cluster > Name of the desired cluster > Services > Kafka > Configurations.

  2. Check whether the value of parameter disk.adapter.enable is set to true.

    • If yes, go to 10.

    • If no, go to 9.

  3. Set the value of disk.adapter.enable to true. Check whether the value of adapter.topic.min.retention.hours is properly set.

    • If yes, go to 10.

    • If no, adjust the data retention period based on service requirements.

    Important

    If the disk auto-adaptation function is enabled, some historical data of specified topics is deleted. If the retention period of some topics cannot be adjusted, click All Configurations and add the topics to the value of the disk.adapter.topic.blacklist parameter.

  4. Wait 10 minutes and check whether the usage of faulty disks reduces.

    • If yes, wait until the alarm is cleared.

    • If no, go to 11.

Check the Kafka data plan.

  1. In the Instance area, click Broker. In the Real Time area of Broker, Click the drop-down menu in the Chart area and choose Customize to customize monitoring items.

  2. In the dialog box, select Disk > Broker Disk Usage and click OK.

    The Kafka disk usage information is displayed.

  3. View the information in 12 to check whether there is only the disk parathion for which the alarm is generated in 2.

    • If yes, go to 14.

    • If no, go to 15.

  4. Perform disk planning and mount a new disk again. Go to the Instance Configurations page of the node for which the alarm is generated, modify log.dirs, add other disk directories, and restart the Kafka instance.

  5. Determine whether to shorten the data retention time configured on Kafka based on service requirements and service traffic.

    • If yes, go to 16.

    • If no, go to 17.

  6. Log in to FusionInsight Manager, select Cluster > Name of the desired cluster > Services > Kafka > Configurations, and click All Configurations. In the search box on the right, enter log.retention.hours. The value of the parameter indicates the default data retention time of the topic. You can change the value to a smaller one.

    Note

    • For a topic whose data retention time is configured alone, the modification of the data retention time on the Kafka Service Configuration page does not take effect.

    • To modify the data retention time for a topic, use the Kafka client command-line interface (CLI) to configure the topic.

      Example: kafka-topics.sh --zookeeper "ZooKeeper IP address:2181/kafka" --alter --topic "Topic bane" --config retention.ms= "retention time"

  7. Check whether the usage of some disks reaches the upper limit due to unreasonable configuration of the partitions of some topics. For example, the number of partitions configured for a topic with large data volume is smaller than the number of disks. In this case, the data is not evenly allocated to disks.

    Note

    If you do not know which topic has large data volume, you can log in to an instance node based on the host node information obtained in 2, and go to the data directory (directory specified by log.dirs before the modification in 14) to check whether there is topic with partition that use large disk space.

    • If yes, go to 18.

    • If no, go to 19.

  8. In the Kafka client CLI, run the following command to perform partition capacity expansion for the topic:

    kafka-topics.sh --zookeeper "ZooKeeper IP address:2181/kafka" --alter --topic "Topic name" --partitions="New number of partitions"

    Note

    • You are advised to set the new number of partitions to a multiple of the number of Kafka data disks.

    • The step may not quickly clear the alarm, and you need to modify the data retention time in 11 to gradually balance data allocation.

  9. Determine whether to perform capacity expansion.

    Note

    You are advised to perform capacity expansion for Kafka when the current disk usage exceeds 80%.

    • If yes, go to 20.

    • If no, go to 21.

  10. Expand the disk capacity and check whether the alarm is cleared after capacity expansion.

    • If yes, no further action is required.

    • If no, go to 22.

  11. Check whether the alarm is cleared.

    • If yes, no further action is required.

    • If no, go to 22.

Collect fault information.

  1. On the FusionInsight Manager portal, choose O&M > Log > Download.

  2. Select Kafka in the required cluster from the Service drop-down list.

  3. Click image1 in the upper right corner, and set Start Date and End Date for log collection to 10 minutes ahead of and after the alarm generation time, respectively. Then, click Download.

  4. Contact the O&M personnel and send the collected logs.

Alarm Clearing

After the fault is rectified, the system automatically clears this alarm.