磁盘结构
运行时磁盘结构和静态磁盘结构用途不同,不能混用。
运行时:metrics.disk
metrics.disk 有四个数组:
physical[]logical[]filesystems[]base_io[]
physical[]
每条对应一个块设备。
必填:
nameread_byteswrite_bytesread_rate_bytes_per_secwrite_rate_bytes_per_seciopsread_iopswrite_iopsutil_ratioqueue_lengthwait_msservice_ms
可选:
device_pathref
logical[]
逻辑存储的容量视图。
必填:
kindnameusedfreeused_ratio
可选:
device_pathrefhealth
常见 kind:
diskraidraid_mdlvm_vglvm_thinpoollvm_lvzfs_pool
filesystems[]
挂载点视图。
必填:
pathusedfreeused_ratioinodes_usedinodes_freeinodes_used_ratio
可选:
devicemountpoint
base_io[]
用于展示和排序的 IO 视图。
必填:
kindnameread_rate_bytes_per_secwrite_rate_bytes_per_secread_iopswrite_iopsiops
可选:
device_pathrefread_byteswrite_bytesutil_ratioqueue_lengthwait_msservice_ms
logical 项可能没有累计字节和底层延迟/利用率字段。
运行时:metrics.raid
必填:
supportedavailablearrays[]
arrays[]:
namestatusactiveworkingfailedhealthmembers- 可选:
sync_status - 可选:
sync_progress
members[]:
namestate
静态:disk
静态结构只保留稳定元数据。
physical[]
name- 可选:
device_path - 可选:
ref
logical[]
kindname- 可选:
device_path - 可选:
ref - 可选:
total - 可选:
mountpoint - 可选:
fs_type - 可选:
devices[]
filesystems[]
pathtotalfs_typeinodes_total- 可选:
device - 可选:
mountpoint
base_io[]
kindname- 可选:
device_path - 可选:
ref - 可选:
role
静态:raid
supportedavailablearrays[]arrays[]:name、level、devices、members[]members[]:name
平台说明
- Linux 采集文件系统、块设备、RAID、LVM、ZFS。
- 非 Linux 仍会从
gopsutil分区结果填充filesystems[]。 - 非 Linux 的 RAID 固定返回
supported=false。 - 数组返回
[],不是null。