电池指标的语义约定

状态: 开发中

电池指标 hw.battery.*

计算机系统或 UPS 中的电池。

hw.type 必须设置为 "battery"

所有电池指标都可以包含以下属性来描述被监控电池的特性

Attributes

Stability需求级别Value Type描述Example Values
hw.idDevelopment必需字符串硬件组件的标识符,在监控主机内是唯一的win32battery_battery_testsysa33_1
hw.battery.capacityDevelopment推荐字符串设计容量,单位为瓦时或安时9.3Ah; 50Wh
hw.battery.chemistryDevelopment推荐字符串电池 化学成分,例如锂离子、镍镉等。Li-ion; NiMH
hw.modelDevelopment推荐字符串硬件组件的描述性型号名称PERC H740P; Intel(R) Core(TM) i7-10700K; Dell XPS 15 Battery
hw.nameDevelopment推荐字符串硬件组件的一个易于识别的名称eth0
hw.parentDevelopment推荐字符串父组件的唯一标识符(通常是机箱或磁盘控制器的 hw.id 属性)dellStorage_perc_0
hw.vendorDevelopment推荐字符串硬件组件的供应商名称Dell; HP; Intel; AMD; LSI; Lenovo

Metric: hw.battery.charge

此指标是推荐的。

名称Instrument TypeUnit (UCUM)描述Stability实体关联
hw.battery.chargeGauge1电池剩余电量分数。Development

Attributes

Stability需求级别Value Type描述Example Values
hw.idDevelopment必需字符串硬件组件的标识符,在监控主机内是唯一的win32battery_battery_testsysa33_1
hw.battery.capacityDevelopment推荐字符串设计容量,单位为瓦时或安时9.3Ah; 50Wh
hw.battery.chemistryDevelopment推荐字符串电池 化学成分,例如锂离子、镍镉等。Li-ion; NiMH
hw.modelDevelopment推荐字符串硬件组件的描述性型号名称PERC H740P; Intel(R) Core(TM) i7-10700K; Dell XPS 15 Battery
hw.nameDevelopment推荐字符串硬件组件的一个易于识别的名称eth0
hw.parentDevelopment推荐字符串父组件的唯一标识符(通常是机箱或磁盘控制器的 hw.id 属性)dellStorage_perc_0
hw.vendorDevelopment推荐字符串硬件组件的供应商名称Dell; HP; Intel; AMD; LSI; Lenovo

Metric: hw.battery.charge.limit

此指标是推荐的。

名称Instrument TypeUnit (UCUM)描述Stability实体关联
hw.battery.charge.limitGauge1为确保正常运行,电池电量分数下限。Development

Attributes

Stability需求级别Value Type描述Example Values
hw.idDevelopment必需字符串硬件组件的标识符,在监控主机内是唯一的win32battery_battery_testsysa33_1
hw.battery.capacityDevelopment推荐字符串设计容量,单位为瓦时或安时9.3Ah; 50Wh
hw.battery.chemistryDevelopment推荐字符串电池 化学成分,例如锂离子、镍镉等。Li-ion; NiMH
hw.limit_typeDevelopment推荐字符串表示与设备运行和健康相关的电池电量阈值。每个 limit_type 都表示特定的充电限制,例如最小或最大最佳充电量、关机阈值或节能阈值。这些值通常由硬件或固件提供,以指导电池的安全高效使用。critical; throttled; degraded
hw.modelDevelopment推荐字符串硬件组件的描述性型号名称PERC H740P; Intel(R) Core(TM) i7-10700K; Dell XPS 15 Battery
hw.nameDevelopment推荐字符串硬件组件的一个易于识别的名称eth0
hw.parentDevelopment推荐字符串父组件的唯一标识符(通常是机箱或磁盘控制器的 hw.id 属性)dellStorage_perc_0
hw.vendorDevelopment推荐字符串硬件组件的供应商名称Dell; HP; Intel; AMD; LSI; Lenovo

hw.limit_type 具有以下已知值列表。如果其中一个适用,则必须使用相应的;否则,可以使用自定义值。

描述Stability
critical严重Development
degraded降级Development
high.critical高严重Development
high.degraded高降级Development
low.critical低严重Development
low.degraded低降级Development
max最大Development
throttled节流Development
turbo涡轮增压Development

Metric: hw.battery.time_left

此指标是推荐的。

名称Instrument TypeUnit (UCUM)描述Stability实体关联
hw.battery.time_leftGauges电池完全充电或放电前剩余的时间。Development

Attributes

Stability需求级别Value Type描述Example Values
hw.idDevelopment必需字符串硬件组件的标识符,在监控主机内是唯一的win32battery_battery_testsysa33_1
hw.stateDevelopment必需字符串组件的当前状态degraded; failed; needs_cleaning
hw.battery.stateDevelopment有条件要求 如果电池正在充电或放电字符串电池的当前状态 [1]charging; discharging
hw.battery.capacityDevelopment推荐字符串设计容量,单位为瓦时或安时9.3Ah; 50Wh
hw.battery.chemistryDevelopment推荐字符串电池 化学成分,例如锂离子、镍镉等。Li-ion; NiMH
hw.modelDevelopment推荐字符串硬件组件的描述性型号名称PERC H740P; Intel(R) Core(TM) i7-10700K; Dell XPS 15 Battery
hw.nameDevelopment推荐字符串硬件组件的一个易于识别的名称eth0
hw.parentDevelopment推荐字符串父组件的唯一标识符(通常是机箱或磁盘控制器的 hw.id 属性)dellStorage_perc_0
hw.vendorDevelopment推荐字符串硬件组件的供应商名称Dell; HP; Intel; AMD; LSI; Lenovo

[1] hw.battery.state: hw.state 属性应指示电池的当前状态。它应该是预定义的 States 之一,例如“charging”或“discharging”。


hw.battery.state 具有以下一系列已知值。如果其中一个适用,则必须使用相应的 Value;否则,可以按需使用自定义 Value。

描述Stability
charging充电中Development
discharging放电中Development

hw.state 具有以下已知值列表。如果其中一个适用,则必须使用相应的;否则,可以使用自定义值。

描述Stability
degraded降级Development
failed失败Development
needs_cleaning需要清洁Development
okOKDevelopment
predicted_failure预测失败Development

Metric: hw.status (Battery)

此指标是推荐的。

运行状态:对于每种可能的状态,为 1(true)或 0(false)。

使用此指标报告电池状态时,必须设置以下属性

  • hw.type 必须设置为 "battery",以指示状态是针对电池的。
  • hw.state 必须设置为以下值之一,以指示电池状态
    • "ok": 电池运行正常。
    • "degraded": 电池运行功能或性能下降。
    • "failed": 电池已损坏,无法运行。
    • "charging": 电池正在充电。
    • "discharging": 电池正在放电。

hw.type 属性应指明硬件组件的类型,在本例中是电池。应将其设置为“battery”,以清楚地识别正在监控的组件。

名称Instrument TypeUnit (UCUM)描述Stability实体关联
hw.statusUpDownCounter1运行状态:对于每种可能的状态,为 1(true)或 0(false)。[1]Development

[1]: hw.status 目前被指定为 UpDownCounter,但理想情况下应使用 StateSet(如 OpenMetrics 中定义的) 来表示。一旦 StateSet 在 OpenTelemetry 中被指定,此语义约定将进行更新。此计划的更改预计不会对用户查询其时间序列后端以检索 hw.status 值的方式产生任何影响。

Attributes

Stability需求级别Value Type描述Example Values
hw.idDevelopment必需字符串硬件组件的标识符,在监控主机内是唯一的win32battery_battery_testsysa33_1
hw.stateDevelopment必需字符串组件的当前状态degraded; failed; needs_cleaning
hw.typeDevelopment必需字符串组件类型 [1]battery; cpu; disk_controller
hw.nameDevelopment推荐字符串硬件组件的一个易于识别的名称eth0
hw.parentDevelopment推荐字符串父组件的唯一标识符(通常是机箱或磁盘控制器的 hw.id 属性)dellStorage_perc_0

[1] hw.type: 描述了报告 hw.state 的硬件组件的类别。例如,hw.type=temperaturehw.state=degraded 将表示硬件组件的温度被报告为 degraded


hw.state 具有以下已知值列表。如果其中一个适用,则必须使用相应的;否则,可以使用自定义值。

描述Stability
degraded降级Development
failed失败Development
needs_cleaning需要清洁Development
okOKDevelopment
predicted_failure预测失败Development

hw.type 具有以下已知值列表。如果其中一个适用,则必须使用相应的;否则,可以使用自定义值。

描述Stability
batteryBatteryDevelopment
cpuCPUDevelopment
disk_controller磁盘控制器Development
enclosureEnclosureDevelopment
fanFanDevelopment
gpuGPUDevelopment
logical_disk逻辑磁盘Development
memoryMemoryDevelopment
network网络Development
physical_disk物理磁盘Development
power_supply电源Development
tape_drive磁带机Development
temperatureTemperatureDevelopment
voltageVoltageDevelopment