Method for realizing cloud platform disk life monitoring based on disk SMART attribute

CN121597513APending Publication Date: 2026-03-03SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511666854.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

云平台存储运维需要监控磁盘寿命,现有人工检测无法应对大量磁盘管理;同时不同厂商不同类型的磁盘SMART属性存在差异,没有统一的管理方式实现集中化监控

Benefits of technology

[0022]基于磁盘SMART属性实现云平台磁盘寿命监控,针对云平台的运维人员对于磁盘寿命管理需求,通过自定义脚本获取不同维度的不同类型的磁盘寿命,对接kubernetes管理平台prometheus监控体系实现不同厂商的不同类型的磁盘寿命统一监控和自动告警,通过该发明可以确保提前预知磁盘可能出现的问题,从而采取相应措施避免数据丢失或服务中断,进而保证云平台存储层面的物理磁盘整体稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597513A_ABST
    Figure CN121597513A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing cloud platform disk life monitoring based on disk SMART attributes, and relates to the technical field of disk management. Comprising the steps that 1, system direct connection disks used by nodes are obtained through different disk management clients by means of self-defined scripts, disk types including nvme, ssd and hdd are recognized according to system flag bits, metadata of the disks are recorded, SMART attributes of different types of disks of different manufacturers are analyzed, and the SMART attributes of the different types of disks of different manufacturers are analyzed; the method comprises the following steps: step 1, mapping disk life of different dimensions through different monitoring indexes, and step 2, using a kubernetes management platform prometheus monitoring system to be in butt joint with a custom script, setting different alarm rules according to disk life monitoring indexes of different dimensions, and uniformly realizing life monitoring and expiration alarm of all disks of all nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses a method for monitoring the lifespan of a cloud platform disk based on the disk's SMART attribute, which relates to the field of disk management technology. Background Technology

[0002] Monitoring disk lifespan is crucial for cloud platform operations and maintenance, preventing data loss and system failures. Cloud platform storage operations and maintenance require monitoring disk lifespan, but existing manual inspection methods are insufficient to manage the large volume of disks; furthermore, different vendors and types of disks have varying SMART attributes, lacking a unified management approach for centralized monitoring. Summary of the Invention

[0003] This invention addresses the problems of existing technologies by providing a method for monitoring the lifespan of cloud platform disks based on disk SMART attributes. By enabling unified monitoring of the lifespan of different disks based on disk SMART attributes, cloud platform operation and maintenance personnel can anticipate potential disk problems and take corresponding measures to avoid data loss or service interruption.

[0004] The specific solution proposed in this invention is as follows:

[0005] This invention also provides a method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, comprising:

[0006] Step 1: Using custom scripts on different disk management clients, obtain the system passthrough disks used by the nodes. Identify the disk type based on system flags (NVMe, SSD, and HDD). Record disk metadata, analyze the SMART attributes of different types of disks from different manufacturers, and map different dimensions of disk lifespan through various monitoring metrics.

[0007] Step 2: Use the Kubernetes management platform Prometheus monitoring system to connect to custom scripts, set different alarm rules according to different dimensions of disk lifespan monitoring indicators, and uniformly realize lifespan monitoring and expiration alarms for all disks on all nodes.

[0008] Furthermore, in step 2 of the method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, the Prometheus monitoring system is used for management via pods. The Telegraf component is run using the daemonset method to provide monitoring and collection for all nodes on the cloud platform. An exec-type collection plugin is configured, a custom script is mounted and configured with executable permissions, so as to realize the timely invocation of the script to obtain real-time monitoring data of disk lifespan; a Prometheus-type output plugin is configured and node names are allowed to be output.

[0009] Furthermore, in step 1 of the method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, a custom script is written. The main function includes two loops. The first loop uses the `nvme list` command to obtain the NVMe type disks of the node and reads the name of each disk for subsequent processing. The second loop uses the `smartctl --scan` command to obtain all types of disks of the node. First, it matches NVMe and bus according to the name regular expression to filter NVMe type and non-passthrough disks. Then, it uses the `udevadminfo` command to obtain the `ID_PATH_TAG` attribute to filter remote disks connected through the network, ensuring that the remaining disks are system passthrough disks. Finally, it reads the name of each disk for subsequent processing.

[0010] Furthermore, in step 1 of the method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, after the main function performs the first loop to read each disk name, it first records the disk type value (type is nvme) and the disk name value (device). It then calls the `smartctl -a` command to obtain the disk SMART attribute information and extracts metadata including the model name, vendor name, and serial number (sn). Next, it calls the `nvme smart-log` command to extract the lifespan attribute value and calculates a 100-value as the remaining lifespan value. Finally, it outputs the monitoring data according to the Telegraf standard format, with the metric name `disk_life_residue_time`, metric labels including `type`, `device`, `model`, `vendor`, and `sn`, and the metric value being the remaining lifespan value.

[0011] Furthermore, in step 1 of the method for monitoring the lifespan of a cloud platform disk based on the disk SMART attribute, after reading each disk name in the second loop of the main function, the disk name value device is recorded first, and then the operating system flag file value corresponding to the disk is read. If the value is 0, the recorded disk type value type is ssd, and corresponding subsequent processing is performed; otherwise, the recorded disk type value type is hdd, and corresponding subsequent processing is performed.

[0012] Furthermore, in step 1 of the method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, when the disk type value is ssd, the smartctl -a command is first called to obtain the disk SMART attribute information based on the input disk name, and the metadata is extracted, including the model name, vendor name, and serial number sn; then the value of the SSD disk wear degree attribute is extracted, and the valid value is extracted as the remaining lifespan value; finally, the monitoring data is output according to the Telegraf standard format, the indicator name is disk_life_residue_time, the indicator labels include type, device, model, vendor, sn, and the indicator value is the remaining lifespan value.

[0013] Furthermore, in step 1 of the method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, when the disk type value is hdd, the smartctl -a command is first called to obtain the disk SMART attribute information based on the input disk name, and the metadata is extracted, including the model name, vendor name, and serial number sn; then, it is checked whether the disk supports the disk cumulative power-on running time attribute, and if it does, the power-on running time value is extracted as the running time value; finally, the monitoring data is output according to the Telegraf standard format, the indicator name is disk_life_running_time, the indicator labels include type, device, model, vendor, sn, and the indicator value is the running time value.

[0014] Furthermore, in step 1 of the method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, if the disk does not support the cumulative power-on runtime attribute, then check whether the disk supports the disk manufacturing date attribute. If it does, customize the configuration according to the format of the disk manufacturing date. According to the format of week X year Y, extract the values ​​of X and Y and use the date command to first convert them to the date of the first Monday of the corresponding week in the year, then convert them to Unix time as the manufacturing time value, and finally output the monitoring data according to the Telegraf standard format. The indicator name is disk_life_manufacture_time, the indicator labels include type, device, model, vendor, sn, and the indicator value is the manufacturing time value.

[0015] Furthermore, in step 2 of the method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, the Prometheus component is run in deployment or statefulset mode as the monitoring and alarm center of the cloud platform. The monitoring configuration automatically connects to the Telegraf component of all nodes based on the Kubernetes service discovery mechanism, automatically obtaining system pass-through disk lifespan monitoring metrics for all nodes, and automatically adding the node name (host) to the metric labels. The alarm configuration, based on disk management experience, configures disk lifespan expiration alarm rules, with the alarm expression being: disk_life_residue_time < 5 or disk_life_running_time / 24 / 365 > 5 or (time() - disk_life_manufacture_time) / 3600 / 24 / 365 > 5.

[0016] For NVMe and SSD type disks, based on disk life monitoring indicators and disk management experience, when the remaining lifespan of the disk is less than 5%, it is considered that the lifespan has expired, and the alarm expression is configured as: disk_life_residue_time<5.

[0017] For HDD type disks, based on disk lifespan monitoring metrics and disk management experience, a disk is considered to have reached the end of its lifespan when it has been used for more than 5 years. For the disk_life_running_time metric, the conversion unit is from hours to years, and the alarm expression is configured as: disk_life_running_time / 24 / 365>5. For the disk_life_manufacture_time metric, the Prometheus built-in time() function is used to return the current Unix timestamp. The conversion value is the current time minus the manufacturing time to obtain the usage time, with the conversion unit from seconds to years. The alarm expression is configured as: (time()-disk_life_manufacture_time) / 3600 / 24 / 365>5.

[0018] This invention also provides a device for monitoring disk lifespan on a cloud platform based on disk SMART attributes, including a script analysis module and a platform integration analysis module.

[0019] Different disk management clients use custom scripts through the script analysis module to obtain the system passthrough disks used by the nodes, identify the disk type based on system flags (including NVMe, SSD, and HDD), record disk metadata, analyze the SMART attributes of different types of disks from different manufacturers, and map different dimensions of disk lifespan through various monitoring metrics.

[0020] The Kubernetes management platform's Prometheus monitoring system uses the platform's integration and analysis module to connect to custom scripts. Different alarm rules are set based on different dimensions of disk lifespan monitoring indicators, enabling unified lifespan monitoring and expiration alarms for all disks on all nodes.

[0021] The advantages of this invention are:

[0022] This invention enables cloud platform disk lifespan monitoring based on disk SMART attributes. Addressing the disk lifespan management needs of cloud platform operations personnel, it uses custom scripts to obtain different types of disk lifespan data across various dimensions. By integrating with the Kubernetes management platform's Prometheus monitoring system, it achieves unified monitoring and automatic alerts for different types of disk lifespans from different vendors. This invention ensures that potential disk problems can be anticipated in advance, allowing for appropriate measures to prevent data loss or service interruptions, thereby guaranteeing the overall stability of the physical disks at the cloud platform's storage layer. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0025] This invention also provides a method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, comprising:

[0026] Step 1: Use custom scripts to obtain the system passthrough disks used by the nodes through different disk management clients, identify the disk type based on the system flag bits (disk types include NVMe, SSD, and HDD), record the disk metadata, analyze the SMART attributes of different types of disks from different manufacturers, and map different dimensions of disk lifespan through different monitoring metrics.

[0027] The custom script is written with a main function consisting of two loops. The first loop uses the `nvmelist` command to retrieve the NVMe type disks on the node and reads the name of each disk for further processing. The second loop uses the `smartctl --scan` command to retrieve all types of disks on the node. It first matches NVMe and bus based on the name regular expression to filter NVMe type and non-passthrough disks such as RAID or LVM management disks. Then, it uses the `udevadminfo` command to retrieve the `ID_PATH_TAG` attribute to filter remote disks connected via the network, such as FC or iSCSI connected disks, ensuring that the remaining disks are system passthrough disks. Finally, it reads the name of each disk for further processing.

[0028] After the main function performs its first loop to read each disk name, it first records the disk type value (type is nvme) and the disk name value (device, e.g., nvme0n1). Then, it calls the `smartctl -a` command to obtain the disk's SMART attribute information, extracting metadata including the model name, vendor name, and serial number (sn). Next, it calls the `nvme smart-log` command to extract the lifetime attribute value and calculates a 100-value as the remaining lifetime value. Finally, it outputs the monitoring data according to the Telegraf standard format, with the metric name `disk_life_residue_time`, metric labels including `type`, `device`, `model`, `vendor`, and `sn`, and the metric value being the remaining lifetime value.

[0029] After reading each disk name in the second loop of the main function, the disk name value "device" is recorded first. Then, the operating system flag file value corresponding to the disk is read. If the value is 0, the disk type value "type" is recorded as "ssd" and corresponding subsequent processing is performed. Otherwise, the disk type value "type" is recorded as "hdd" and corresponding subsequent processing is performed.

[0030] When the disk type value is ssd, the smartctl -a command is first called to obtain the disk's SMART attribute information based on the passed disk name. Metadata is extracted, including the model name, vendor name, and serial number (SN). Then, the wear level attribute value of the SSD disk is extracted, and the valid value is extracted as the remaining lifespan value. Finally, the monitoring data is output according to the Telegraf standard format, with the metric name being disk_life_residue_time, the metric labels including type, device, model, vendor, and SN, and the metric value being the remaining lifespan value.

[0031] When the disk type value is hdd, the smartctl -a command is first called to obtain the disk's SMART attribute information based on the passed disk name. The metadata includes the model name, vendor name, and serial number (sn). Then, it is checked whether the disk supports the cumulative power-on running time attribute. If it does, the power-on running time value is extracted as the running time value. Finally, the monitoring data is output according to the Telegraf standard format. The metric name is disk_life_running_time, the metric labels include type, device, model, vendor, and sn, and the metric value is the running time value. If the disk does not support the cumulative power-on runtime attribute, check if the disk supports the disk manufacturing date attribute. If it does, customize the configuration according to the disk manufacturing date format. Extract the values ​​of X and Y in the format of week X year Y, and use the date command to first convert them to the date of the first Monday of the corresponding week in the year, then convert them to Unix time as the manufacturing duration value. Finally, output the monitoring data according to the Telegraf standard format. The metric name is disk_life_manufacture_time, and the metric labels include type, device, model, vendor, sn. The metric value is the manufacturing duration value.

[0032] Step 2: Use the Kubernetes management platform Prometheus monitoring system to connect to custom scripts, set different alarm rules according to different dimensions of disk lifespan monitoring indicators, and uniformly realize lifespan monitoring and expiration alarms for all disks on all nodes.

[0033] The Prometheus monitoring system is managed using pods, and the Telegraf component is run using daemonset to provide monitoring and data collection for all nodes on the cloud platform. An exec-type data collection plugin is configured, a custom script is mounted and configured with executable permissions, and the script is called periodically to obtain real-time monitoring data on disk lifespan. A Prometheus-type output plugin is configured and node names are allowed to be output.

[0034] Step 2 uses either deployment or statefulset to run the Prometheus component as the monitoring and alerting center for the cloud platform. The monitoring configuration automatically connects to the Telegraf component on all nodes based on the Kubernetes service discovery mechanism, automatically obtaining system pass-through disk lifespan monitoring metrics for all nodes, and automatically adding the node name (host) to the metric labels. The alerting configuration, based on disk management experience, sets up disk lifespan expiration alert rules, with the alert expression being: disk_life_residue_time < 5 or disk_life_running_time / 24 / 365 > 5 or (time() - disk_life_manufacture_time) / 3600 / 24 / 365 > 5.

[0035] For NVMe and SSD type disks, based on disk life monitoring indicators and disk management experience, when the remaining lifespan of the disk is less than 5%, it is considered that the lifespan has expired, and the alarm expression is configured as: disk_life_residue_time<5.

[0036] For HDD type disks, based on disk lifespan monitoring metrics and disk management experience, a disk is considered to have reached the end of its lifespan when it has been used for more than 5 years. For the disk_life_running_time metric, the conversion unit is from hours to years, and the alarm expression is configured as: disk_life_running_time / 24 / 365>5. For the disk_life_manufacture_time metric, the Prometheus built-in time() function is used to return the current Unix timestamp. The conversion value is the current time minus the manufacturing time to obtain the usage time, with the conversion unit from seconds to years. The alarm expression is configured as: (time()-disk_life_manufacture_time) / 3600 / 24 / 365>5.

[0037] The method of this invention can deploy an alertmanager component to connect with a prometheus component to realize timely notification of disk lifespan expiration alarm rules. When the operation and maintenance personnel receive the alarm notification, they can obtain the name, type, model name, manufacturer name, serial number and node name of the disk whose lifespan has expired based on the alarm information, and locate the problematic disk of the problematic node.

[0038] Based on the above modifications, operations and maintenance personnel can perform disk maintenance operations without affecting the use of the cloud platform. For example, they can take other measures to test disk availability or perform disk replacement operations to avoid data loss or service interruption, thereby ensuring the overall stability of the physical disks at the cloud platform's storage layer.

[0039] Example 2

[0040] This invention also provides a device for monitoring disk lifespan on a cloud platform based on disk SMART attributes, including a script analysis module and a platform integration analysis module.

[0041] Different disk management clients use custom scripts through the script analysis module to obtain the system passthrough disks used by the nodes, identify the disk type based on system flags (including NVMe, SSD, and HDD), record disk metadata, analyze the SMART attributes of different types of disks from different manufacturers, and map different dimensions of disk lifespan through various monitoring metrics.

[0042] The Kubernetes management platform's Prometheus monitoring system uses the platform's integration and analysis module to connect to custom scripts. Different alarm rules are set based on different dimensions of disk lifespan monitoring indicators, enabling unified lifespan monitoring and expiration alarms for all disks on all nodes.

[0043] The information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description in the method embodiment of the present invention, and will not be repeated here.

[0044] Similarly, the device of this invention monitors the lifespan of disks on cloud platforms based on the SMART attribute of the disk. Addressing the disk lifespan management needs of cloud platform operators, it obtains different types of disk lifespan data from different dimensions through custom scripts. It then connects to the Prometheus monitoring system of the Kubernetes management platform to achieve unified monitoring and automatic alerts for different types of disk lifespans from different vendors. This invention ensures that potential disk problems can be predicted in advance, allowing for appropriate measures to prevent data loss or service interruption, thereby guaranteeing the overall stability of the physical disks at the cloud platform's storage layer.

[0045] It should be noted that not all steps and modules in the above processes and device structures are mandatory; some steps or modules may be omitted as needed. The execution order of the steps is not fixed and can be adjusted as required. The device structures described in the above embodiments can be physical or logical structures. That is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.

[0046] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, characterized by: include: Step 1: Using custom scripts on different disk management clients, obtain the system passthrough disks used by the nodes. Identify the disk type based on system flags (NVMe, SSD, and HDD). Record disk metadata, analyze the SMART attributes of different types of disks from different manufacturers, and map different dimensions of disk lifespan through various monitoring metrics. Step 2: Use the Kubernetes management platform Prometheus monitoring system to connect to custom scripts, set different alarm rules according to different dimensions of disk lifespan monitoring indicators, and uniformly realize lifespan monitoring and expiration alarms for all disks on all nodes.

2. The method for monitoring disk lifespan on a cloud platform based on disk SMART attributes as described in claim 1, characterized in that: In step 2, the Prometheus monitoring system is used to manage the system by using pods. The Telegraf component is run using the daemonset method to provide monitoring and collection for all nodes on the cloud platform. An exec-type collection plugin is configured, a custom script is mounted and configured with executable permissions, so that the script is called on a schedule to obtain real-time monitoring data on disk lifespan. Configure the Prometheus type output plugin and allow output of node names.

3. The method for monitoring disk lifespan on a cloud platform based on disk SMART attributes according to claim 2, characterized in that: In step 1, a custom script is written. The main function includes two loops. The first loop uses the `nvme list` command to get the NVMe type disks on the node and reads the name of each disk for further processing. The second loop uses the `smartctl --scan` command to get all types of disks on the node. First, it matches NVMe and bus according to the name regular expression to filter NVMe type and non-passthrough disks. Then, it uses the `udevadminfo` command to get the ID_PATH_TAG attribute to filter remote disks connected via the network, ensuring that the remaining disks are system passthrough disks. Finally, it reads the name of each disk for further processing.

4. A method for monitoring disk lifespan on a cloud platform based on disk SMART attributes as described in claim 3, characterized in that, in step 1, after reading each disk name in the first loop of the main function, the disk type value (type is nvme) and the disk name value (device) are recorded first. The smartctl -a command is called to obtain the disk SMART attribute information, and the metadata, including the model name (model), vendor name (vendor), and serial number (sn), is extracted. The nvme smart-log command is called again to extract the lifespan attribute value, and the 100-value is calculated as the remaining lifespan value. Finally, the monitoring data is output according to the Telegraf standard format, with the indicator name being disk_life_residue_time, the indicator labels including type, device, model, vendor, and sn, and the indicator value being the remaining lifespan value.

5. The method for monitoring the lifespan of a cloud platform disk based on the SMART attribute of a disk, as described in claim 3, is characterized in that in step 1, after reading each disk name in the second loop of the main function, the disk name value device is first recorded, and then the operating system flag file value corresponding to the disk is read. If the value is 0, the recorded disk type value type is ssd, and corresponding subsequent processing is performed; otherwise, the recorded disk type value type is hdd, and corresponding subsequent processing is performed.

6. A method for monitoring disk lifespan on a cloud platform based on disk SMART attributes as described in claim 5, characterized in that, in step 1, when the disk type value is ssd, the smartctl -a command is first called to obtain the disk SMART attribute information according to the input disk name, and the metadata including the model name, vendor name, and serial number sn is extracted; then, the value of the SSD disk wear degree attribute is extracted, and the valid value is extracted as the remaining lifespan value; finally, the monitoring data is output according to the Telegraf standard format, the indicator name is disk_life_residue_time, the indicator labels include type, device, model, vendor, sn, and the indicator value is the remaining lifespan value.

7. A method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, as described in claim 5. Its characteristic is that in step 1, when the disk type value is hdd, the smartctl -a command is first called to obtain the disk SMART attribute information based on the passed disk name, and the metadata is extracted, including the model name, vendor name and serial number sn. Then check if the disk supports the disk cumulative power-on runtime attribute. If it does, extract the power-on runtime value as the runtime value. Finally, output the monitoring data according to the Telegraf standard format. The metric name is disk_life_running_time, the metric labels include type, device, model, vendor, sn, and the metric value is the runtime value.

8. A method for monitoring disk lifespan on a cloud platform based on disk SMART attributes according to claim 7, characterized in that: If the disk does not support the cumulative power-on runtime attribute in step 1, check if the disk supports the disk manufacturing date attribute. If it does, customize the configuration according to the format of the disk manufacturing date. Extract the values ​​of X and Y in the format of week X year Y and use the date command to first convert them to the date of the first Monday of the corresponding week in the year, then convert them to Unix time as the manufacturing time value. Finally, output the monitoring data according to the Telegraf standard format. The metric name is disk_life_manufacture_time, the metric labels include type, device, model, vendor, sn, and the metric value is the manufacturing time value.

9. A method for monitoring disk lifespan on a cloud platform based on disk SMART attributes, as described in claim 2, characterized in that: Step 2 uses either deployment or statefulset to run the Prometheus component as the monitoring and alerting center for the cloud platform. The monitoring configuration automatically connects to the Telegraf component on all nodes based on the Kubernetes service discovery mechanism, automatically obtaining system pass-through disk lifespan monitoring metrics for all nodes, and automatically adding the node name (host) to the metric labels. The alerting configuration, based on disk management experience, sets up disk lifespan expiration alert rules, with the alert expression being: disk_life_residue_time < 5 or disk_life_running_time / 24 / 365 > 5 or (time() - disk_life_manufacture_time) / 3600 / 24 / 365 > 5. For NVMe and SSD type disks, based on disk life monitoring indicators and disk management experience, when the remaining lifespan of the disk is less than 5%, it is considered that the lifespan has expired, and the alarm expression is configured as: disk_life_residue_time<5. For HDD type disks, based on disk lifespan monitoring metrics and disk management experience, a disk is considered to have reached the end of its lifespan when it has been used for more than 5 years. For the disk_life_running_time metric, the conversion unit is from hours to years, and the alarm expression is configured as: disk_life_running_time / 24 / 365>5. For the disk_life_manufacture_time metric, the Prometheus built-in time() function is used to return the current Unix timestamp. The conversion value is the current time minus the manufacturing time to obtain the usage time, with the conversion unit from seconds to years. The alarm expression is configured as: (time()-disk_life_manufacture_time) / 3600 / 24 / 365>5.

10. A device for monitoring the lifespan of a cloud platform disk based on the disk's SMART attributes, characterized in that: Includes a script analysis module and a platform integration analysis module. Different disk management clients use custom scripts through the script analysis module to obtain the system passthrough disks used by the nodes, identify the disk type based on system flags (including NVMe, SSD, and HDD), record disk metadata, analyze the SMART attributes of different types of disks from different manufacturers, and map different dimensions of disk lifespan through various monitoring metrics. The Kubernetes management platform's Prometheus monitoring system uses the platform's integration and analysis module to connect to custom scripts. Different alarm rules are set based on different dimensions of disk lifespan monitoring indicators, enabling unified lifespan monitoring and expiration alarms for all disks on all nodes.