Semantic Conventions for Common Hardware Metrics

Status: Experimental

Hardware metrics do not include attributes that identify the device, machine, or host they are reported for. This information is expected to be provided via resource attributes configured by user applications. Application developers are encouraged to configure Host resource attributes.

Common hardware metrics

The below metrics apply to any type of hardware component.

These common hw. metrics include the below attributes to describe the monitored component:

AttributeTypeDescriptionExamplesRequirement LevelStability
hw.idstringAn identifier for the hardware component, unique within the monitored hostwin32battery_battery_testsysa33_1RequiredExperimental
hw.typestringType of the component [1]battery; cpu; disk_controllerRequiredExperimental
hw.namestringAn easily-recognizable name for the hardware componenteth0RecommendedExperimental
hw.parentstringUnique identifier of the parent component (typically the hw.id attribute of the enclosure, or disk controller)dellStorage_perc_0RecommendedExperimental

[1]: Describes the category of the hardware component for which hw.state is being reported. For example, hw.type=temperature along with hw.state=degraded would indicate that the temperature of the hardware component has been reported as degraded.

hw.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
batteryBatteryExperimental
cpuCPUExperimental
disk_controllerDisk controllerExperimental
enclosureEnclosureExperimental
fanFanExperimental
gpuGPUExperimental
logical_diskLogical diskExperimental
memoryMemoryExperimental
networkNetworkExperimental
physical_diskPhysical diskExperimental
power_supplyPower supplyExperimental
tape_driveTape driveExperimental
temperatureTemperatureExperimental
voltageVoltageExperimental

Metric: hw.energy

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
hw.energyCounterJEnergy consumed by the componentExperimental
AttributeTypeDescriptionExamplesRequirement LevelStability
hw.idstringAn identifier for the hardware component, unique within the monitored hostwin32battery_battery_testsysa33_1RequiredExperimental
hw.typestringType of the component [1]battery; cpu; disk_controllerRequiredExperimental
hw.namestringAn easily-recognizable name for the hardware componenteth0RecommendedExperimental
hw.parentstringUnique identifier of the parent component (typically the hw.id attribute of the enclosure, or disk controller)dellStorage_perc_0RecommendedExperimental

[1]: Describes the category of the hardware component for which hw.state is being reported. For example, hw.type=temperature along with hw.state=degraded would indicate that the temperature of the hardware component has been reported as degraded.

hw.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
batteryBatteryExperimental
cpuCPUExperimental
disk_controllerDisk controllerExperimental
enclosureEnclosureExperimental
fanFanExperimental
gpuGPUExperimental
logical_diskLogical diskExperimental
memoryMemoryExperimental
networkNetworkExperimental
physical_diskPhysical diskExperimental
power_supplyPower supplyExperimental
tape_driveTape driveExperimental
temperatureTemperatureExperimental
voltageVoltageExperimental

Metric: hw.errors

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
hw.errorsCounter{error}Number of errors encountered by the componentExperimental
AttributeTypeDescriptionExamplesRequirement LevelStability
hw.idstringAn identifier for the hardware component, unique within the monitored hostwin32battery_battery_testsysa33_1RequiredExperimental
hw.typestringType of the component [1]battery; cpu; disk_controllerRequiredExperimental
error.typestringThe type of error encountered by the component [2]uncorrected; zero_buffer_credit; crc; bad_sectorConditionally Required if and only if an error has occurredStable
hw.namestringAn easily-recognizable name for the hardware componenteth0RecommendedExperimental
hw.parentstringUnique identifier of the parent component (typically the hw.id attribute of the enclosure, or disk controller)dellStorage_perc_0RecommendedExperimental

[1]: Describes the category of the hardware component for which hw.state is being reported. For example, hw.type=temperature along with hw.state=degraded would indicate that the temperature of the hardware component has been reported as degraded.

[2]: The error.type SHOULD match the error code reported by the component, the canonical name of the error, or another low-cardinality error identifier. Instrumentations SHOULD document the list of errors they report.

error.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
_OTHERA fallback error value to be used when the instrumentation doesn’t define a custom value.Stable

hw.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
batteryBatteryExperimental
cpuCPUExperimental
disk_controllerDisk controllerExperimental
enclosureEnclosureExperimental
fanFanExperimental
gpuGPUExperimental
logical_diskLogical diskExperimental
memoryMemoryExperimental
networkNetworkExperimental
physical_diskPhysical diskExperimental
power_supplyPower supplyExperimental
tape_driveTape driveExperimental
temperatureTemperatureExperimental
voltageVoltageExperimental

Metric: hw.power

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
hw.powerGaugeWInstantaneous power consumed by the component [1]Experimental

[1]: It is recommended to report hw.energy instead of hw.power when possible.

AttributeTypeDescriptionExamplesRequirement LevelStability
hw.idstringAn identifier for the hardware component, unique within the monitored hostwin32battery_battery_testsysa33_1RequiredExperimental
hw.typestringType of the component [1]battery; cpu; disk_controllerRequiredExperimental
hw.namestringAn easily-recognizable name for the hardware componenteth0RecommendedExperimental
hw.parentstringUnique identifier of the parent component (typically the hw.id attribute of the enclosure, or disk controller)dellStorage_perc_0RecommendedExperimental

[1]: Describes the category of the hardware component for which hw.state is being reported. For example, hw.type=temperature along with hw.state=degraded would indicate that the temperature of the hardware component has been reported as degraded.

hw.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
batteryBatteryExperimental
cpuCPUExperimental
disk_controllerDisk controllerExperimental
enclosureEnclosureExperimental
fanFanExperimental
gpuGPUExperimental
logical_diskLogical diskExperimental
memoryMemoryExperimental
networkNetworkExperimental
physical_diskPhysical diskExperimental
power_supplyPower supplyExperimental
tape_driveTape driveExperimental
temperatureTemperatureExperimental
voltageVoltageExperimental

Metric: hw.status

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
hw.statusUpDownCounter1Operational status: 1 (true) or 0 (false) for each of the possible states [1]Experimental

[1]: hw.status is currently specified as an UpDownCounter but would ideally be represented using a StateSet as defined in OpenMetrics. This semantic convention will be updated once StateSet is specified in OpenTelemetry. This planned change is not expected to have any consequence on the way users query their timeseries backend to retrieve the values of hw.status over time.

AttributeTypeDescriptionExamplesRequirement LevelStability
hw.idstringAn identifier for the hardware component, unique within the monitored hostwin32battery_battery_testsysa33_1RequiredExperimental
hw.statestringThe current state of the componentok; degraded; failedRequiredExperimental
hw.typestringType of the component [1]battery; cpu; disk_controllerRequiredExperimental
hw.namestringAn easily-recognizable name for the hardware componenteth0RecommendedExperimental
hw.parentstringUnique identifier of the parent component (typically the hw.id attribute of the enclosure, or disk controller)dellStorage_perc_0RecommendedExperimental

[1]: Describes the category of the hardware component for which hw.state is being reported. For example, hw.type=temperature along with hw.state=degraded would indicate that the temperature of the hardware component has been reported as degraded.

hw.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
degradedDegradedExperimental
failedFailedExperimental
okOkExperimental

hw.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
batteryBatteryExperimental
cpuCPUExperimental
disk_controllerDisk controllerExperimental
enclosureEnclosureExperimental
fanFanExperimental
gpuGPUExperimental
logical_diskLogical diskExperimental
memoryMemoryExperimental
networkNetworkExperimental
physical_diskPhysical diskExperimental
power_supplyPower supplyExperimental
tape_driveTape driveExperimental
temperatureTemperatureExperimental
voltageVoltageExperimental