> Source: https://www.ymotongpoo.com/works/otel-specs-ja/semconv/hardware/battery/


# バッテリーメトリクスに関するセマンティック規約

**ステータス**: [Development][DocumentStatus]

## バッテリーメトリクス `hw.battery.*`

コンピューターシステムまたはUPS内のバッテリー。

### メトリクス: `hw.battery.charge`

このメトリクスは[推奨（recommended）][MetricRecommended]です。

<!-- semconv metric.hw.battery.charge -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `hw.battery.charge` | Gauge | `1` | バッテリー充電量の残り割合。 | ![Development](https://img.shields.io/badge/-development-blue) | |

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`hw.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | 監視対象のホスト内で一意な、ハードウェアコンポーネントの識別子 | `win32battery_battery_testsysa33_1` |
| [`hw.battery.capacity`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ワット時またはアンペア時で表した設計容量 | `9.3Ah`; `50Wh` |
| [`hw.battery.chemistry`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | バッテリーの[化学的組成](https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html)（例：リチウムイオン、ニッケルカドミウムなど） | `Li-ion`; `NiMH` |
| [`hw.model`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントを説明するモデル名 | `PERC H740P`; `Intel(R) Core(TM) i7-10700K`; `Dell XPS 15 Battery` |
| [`hw.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントの、見てすぐわかる名前 | `eth0` |
| [`hw.parent`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | 親コンポーネントの一意識別子（通常はエンクロージャーまたはディスクコントローラーの`hw.id`属性） | `dellStorage_perc_0` |
| [`hw.vendor`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントのベンダー名 | `Dell`; `HP`; `Intel`; `AMD`; `LSI`; `Lenovo` |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `hw.battery.charge.limit`

このメトリクスは[推奨（recommended）][MetricRecommended]です。

<!-- semconv metric.hw.battery.charge.limit -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `hw.battery.charge.limit` | Gauge | `1` | 正常な動作を保証するための、バッテリー充電割合の下限。 | ![Development](https://img.shields.io/badge/-development-blue) | |

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`hw.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | 監視対象のホスト内で一意な、ハードウェアコンポーネントの識別子 | `win32battery_battery_testsysa33_1` |
| [`hw.battery.capacity`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ワット時またはアンペア時で表した設計容量 | `9.3Ah`; `50Wh` |
| [`hw.battery.chemistry`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | バッテリーの[化学的組成](https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html)（例：リチウムイオン、ニッケルカドミウムなど） | `Li-ion`; `NiMH` |
| [`hw.limit_type`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | デバイスの動作および健全性に関連するバッテリー充電レベルの閾値を表す。各`limit_type`は、最小または最大の最適充電量、シャットダウン閾値、省電力閾値といった特定の充電上限を示す。これらの値は通常、安全かつ効率的なバッテリー使用を導くために、ハードウェアまたはファームウェアから提供される。 | `critical`; `throttled`; `degraded` |
| [`hw.model`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントを説明するモデル名 | `PERC H740P`; `Intel(R) Core(TM) i7-10700K`; `Dell XPS 15 Battery` |
| [`hw.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントの、見てすぐわかる名前 | `eth0` |
| [`hw.parent`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | 親コンポーネントの一意識別子（通常はエンクロージャーまたはディスクコントローラーの`hw.id`属性） | `dellStorage_perc_0` |
| [`hw.vendor`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントのベンダー名 | `Dell`; `HP`; `Intel`; `AMD`; `LSI`; `Lenovo` |

---

`hw.limit_type`には、以下のよく知られた値のリストがあります。これらのいずれかが該当する場合は、対応する値を使用しなければならず（MUST）、そうでない場合はカスタム値を使用してもよい（MAY）です。

| Value | Description | Stability |
| --- | --- | --- |
| `critical` | Critical（危険） | ![Development](https://img.shields.io/badge/-development-blue) |
| `degraded` | Degraded（劣化） | ![Development](https://img.shields.io/badge/-development-blue) |
| `high.critical` | High Critical（高側の危険） | ![Development](https://img.shields.io/badge/-development-blue) |
| `high.degraded` | High Degraded（高側の劣化） | ![Development](https://img.shields.io/badge/-development-blue) |
| `low.critical` | Low Critical（低側の危険） | ![Development](https://img.shields.io/badge/-development-blue) |
| `low.degraded` | Low Degraded（低側の劣化） | ![Development](https://img.shields.io/badge/-development-blue) |
| `max` | Maximum（最大） | ![Development](https://img.shields.io/badge/-development-blue) |
| `throttled` | Throttled（抑制） | ![Development](https://img.shields.io/badge/-development-blue) |
| `turbo` | Turbo（ターボ） | ![Development](https://img.shields.io/badge/-development-blue) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `hw.battery.time_left`

このメトリクスは[推奨（recommended）][MetricRecommended]です。

<!-- semconv metric.hw.battery.time_left -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `hw.battery.time_left` | Gauge | `s` | バッテリーが完全に充電または放電されるまでの残り時間。 | ![Development](https://img.shields.io/badge/-development-blue) | |

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`hw.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | 監視対象のホスト内で一意な、ハードウェアコンポーネントの識別子 | `win32battery_battery_testsysa33_1` |
| [`hw.state`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | コンポーネントの現在の状態 | `degraded`; `failed`; `needs_cleaning` |
| [`hw.battery.state`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Conditionally Required` If the battery is charging or discharging | string | バッテリーの現在の状態 [1] | `charging`; `discharging` |
| [`hw.battery.capacity`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ワット時またはアンペア時で表した設計容量 | `9.3Ah`; `50Wh` |
| [`hw.battery.chemistry`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | バッテリーの[化学的組成](https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html)（例：リチウムイオン、ニッケルカドミウムなど） | `Li-ion`; `NiMH` |
| [`hw.model`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントを説明するモデル名 | `PERC H740P`; `Intel(R) Core(TM) i7-10700K`; `Dell XPS 15 Battery` |
| [`hw.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントの、見てすぐわかる名前 | `eth0` |
| [`hw.parent`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | 親コンポーネントの一意識別子（通常はエンクロージャーまたはディスクコントローラーの`hw.id`属性） | `dellStorage_perc_0` |
| [`hw.vendor`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントのベンダー名 | `Dell`; `HP`; `Intel`; `AMD`; `LSI`; `Lenovo` |

**[1] `hw.battery.state`:** `hw.state`属性は、バッテリーの現在の状態を示すべきです（should）。"charging"や"discharging"のような、事前に定義された状態のいずれかであるべきです。

---

`hw.battery.state`には、以下のよく知られた値のリストがあります。これらのいずれかが該当する場合は、対応する値を使用しなければならず（MUST）、そうでない場合はカスタム値を使用してもよい（MAY）です。

| Value | Description | Stability |
| --- | --- | --- |
| `charging` | Charging（充電中） | ![Development](https://img.shields.io/badge/-development-blue) |
| `discharging` | Discharging（放電中） | ![Development](https://img.shields.io/badge/-development-blue) |

---

`hw.state`には、以下のよく知られた値のリストがあります。これらのいずれかが該当する場合は、対応する値を使用しなければならず（MUST）、そうでない場合はカスタム値を使用してもよい（MAY）です。

| Value | Description | Stability |
| --- | --- | --- |
| `degraded` | Degraded（劣化） | ![Development](https://img.shields.io/badge/-development-blue) |
| `failed` | Failed（故障） | ![Development](https://img.shields.io/badge/-development-blue) |
| `needs_cleaning` | Needs Cleaning（清掃が必要） | ![Development](https://img.shields.io/badge/-development-blue) |
| `ok` | OK（正常） | ![Development](https://img.shields.io/badge/-development-blue) |
| `predicted_failure` | Predicted Failure（故障予測） | ![Development](https://img.shields.io/badge/-development-blue) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

### メトリクス: `hw.status`（バッテリー）

このメトリクスは[推奨（recommended）][MetricRecommended]です。

<!-- semconv metric.hw.battery.status -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `hw.status` | UpDownCounter | `1` | 動作ステータス：可能な各状態に対して`1`（true）または`0`（false）。 [1] | ![Development](https://img.shields.io/badge/-development-blue) | |

**[1]:** `hw.status`は現在*UpDownCounter*として規定されていますが、理想的には[OpenMetricsで定義されている*StateSet*](https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#stateset)を使って表現されるべきです。*StateSet*がOpenTelemetryで規定された時点で、このセマンティック規約は更新されます。この予定されている変更は、ユーザーが時系列バックエンドに対して`hw.status`の値を時系列で取得する方法に影響を与えることは想定されていません。

**Attributes:**

| Key | Stability | [Requirement Level](/works/otel-specs-ja/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`hw.id`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | 監視対象のホスト内で一意な、ハードウェアコンポーネントの識別子 | `win32battery_battery_testsysa33_1` |
| [`hw.state`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | コンポーネントの現在の状態 [1] | `ok`; `degraded`; `failed`; `charging`; `discharging` |
| [`hw.type`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Required` | string | コンポーネントの種別 [2] | `battery` |
| [`hw.battery.capacity`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ワット時またはアンペア時で表した設計容量 | `9.3Ah`; `50Wh` |
| [`hw.battery.chemistry`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | バッテリーの[化学的組成](https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html)（例：リチウムイオン、ニッケルカドミウムなど） | `Li-ion`; `NiMH` |
| [`hw.model`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントを説明するモデル名 | `PERC H740P`; `Intel(R) Core(TM) i7-10700K`; `Dell XPS 15 Battery` |
| [`hw.name`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントの、見てすぐわかる名前 | `eth0` |
| [`hw.parent`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | 親コンポーネントの一意識別子（通常はエンクロージャーまたはディスクコントローラーの`hw.id`属性） | `dellStorage_perc_0` |
| [`hw.vendor`](https://opentelemetry.io/docs/specs/semconv/registry/attributes/hardware/) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | ハードウェアコンポーネントのベンダー名 | `Dell`; `HP`; `Intel`; `AMD`; `LSI`; `Lenovo` |

**[1] `hw.state`:** 以下のいずれかの値に設定しなければなりません（MUST）。

* `ok`：バッテリーは正常に動作しています。
* `degraded`：バッテリーは機能または性能が低下した状態で動作しています。
* `failed`：バッテリーは故障し、動作していません。
* `charging`：バッテリーは現在充電中です。
* `discharging`：バッテリーは現在放電中です。

**[2] `hw.type`:** `battery`に設定しなければなりません（MUST）。

---

`hw.state`には、以下のよく知られた値のリストがあります。これらのいずれかが該当する場合は、対応する値を使用しなければならず（MUST）、そうでない場合はカスタム値を使用してもよい（MAY）です。

| Value | Description | Stability |
| --- | --- | --- |
| `degraded` | Degraded（劣化） | ![Development](https://img.shields.io/badge/-development-blue) |
| `failed` | Failed（故障） | ![Development](https://img.shields.io/badge/-development-blue) |
| `needs_cleaning` | Needs Cleaning（清掃が必要） | ![Development](https://img.shields.io/badge/-development-blue) |
| `ok` | OK（正常） | ![Development](https://img.shields.io/badge/-development-blue) |
| `predicted_failure` | Predicted Failure（故障予測） | ![Development](https://img.shields.io/badge/-development-blue) |

---

`hw.type`には、以下のよく知られた値のリストがあります。これらのいずれかが該当する場合は、対応する値を使用しなければならず（MUST）、そうでない場合はカスタム値を使用してもよい（MAY）です。

| Value | Description | Stability |
| --- | --- | --- |
| `battery` | バッテリー | ![Development](https://img.shields.io/badge/-development-blue) |
| `cpu` | CPU | ![Development](https://img.shields.io/badge/-development-blue) |
| `disk_controller` | ディスクコントローラー | ![Development](https://img.shields.io/badge/-development-blue) |
| `enclosure` | エンクロージャー | ![Development](https://img.shields.io/badge/-development-blue) |
| `fan` | ファン | ![Development](https://img.shields.io/badge/-development-blue) |
| `gpu` | GPU | ![Development](https://img.shields.io/badge/-development-blue) |
| `logical_disk` | 論理ディスク | ![Development](https://img.shields.io/badge/-development-blue) |
| `memory` | メモリ | ![Development](https://img.shields.io/badge/-development-blue) |
| `network` | ネットワーク | ![Development](https://img.shields.io/badge/-development-blue) |
| `physical_disk` | 物理ディスク | ![Development](https://img.shields.io/badge/-development-blue) |
| `power_supply` | 電源ユニット | ![Development](https://img.shields.io/badge/-development-blue) |
| `tape_drive` | テープドライブ | ![Development](https://img.shields.io/badge/-development-blue) |
| `temperature` | 温度 | ![Development](https://img.shields.io/badge/-development-blue) |
| `voltage` | 電圧 | ![Development](https://img.shields.io/badge/-development-blue) |

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
[MetricRecommended]: /works/otel-specs-ja/semconv/general/metric-requirement-level/#recommended

