---
title: Battery
description: Monitor the health of your laptop's battery.
breadcrumbs: Docs > Integrations > Battery
---

# Battery
Supported OS Integration version1.0.0
## Overview{% #overview %}

This check monitors battery health on MacOS and Windows laptops.

**Minimum Agent version:** 7.75.0

## Setup{% #setup %}

### Installation{% #installation %}

The Battery check is included in the [Datadog Agent](https://app.datadoghq.com/account/settings/agent/latest) package. No additional installation is needed on your server.

### Configuration{% #configuration %}

The configuration is located in the `battery.d/conf.yaml` file in the `conf.d/` folder at the root of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files/). See the [sample `battery.d/conf.yaml`](https://github.com/DataDog/datadog-agent/blob/main/cmd/agent/dist/conf.d/battery.d/conf.yaml.example) for all available configuration options. When you are done editing the configuration file, [restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent) to load the new configuration.

### Validation{% #validation %}

[Run the Agent's `status` subcommand](https://docs.datadoghq.com/agent/configuration/agent-commands/#agent-information) and look for `battery` under the Checks section.

**Note**: If no battery is detected in the system, the check will not run.

## Data Collected{% #data-collected %}

### Metrics{% #metrics %}

|  |
|  |
| **system.battery.charge\_rate**(gauge)           | The current rate of battery charge or discharge*Shown as milliwatt*                                         |
| **system.battery.current\_charge\_pct**(gauge)   | The current percentage of battery charge*Shown as percent*                                                  |
| **system.battery.cycle\_count**(gauge)           | The number of charge and discharge cycles the battery has experienced                                       |
| **system.battery.designed\_capacity**(gauge)     | The theoretical capacity of the battery when new*Shown as milliwatt-hour*                                   |
| **system.battery.maximum\_capacity**(gauge)      | The battery's current fully charged capacity*Shown as milliwatt-hour*                                       |
| **system.battery.maximum\_capacity\_pct**(gauge) | The percentage of maximum battery capacity relative to when it was new*Shown as percent*                    |
| **system.battery.power\_state**(gauge)           | The current state of the battery. Reports 1 if the battery has a valid state and 0 if no state is available |
| **system.battery.voltage**(gauge)                | The current battery voltage across the battery terminals*Shown as millivolt*                                |

### Tags{% #tags %}

The metric `system.battery.power_state` can report any of the following tags:

- `power_state:battery_charging`: Indicates that the battery is charging
- `power_state:battery_discharging`: Indicates that the battery is discharging
- `power_state:battery_power_on_line`: Indicates that the battery is connected to AC power

In Windows, the metric can also report the following tag:

- `power_state:battery_critical`: Indicates that battery failure is imminent

### Events{% #events %}

The Battery check does not include any events.

### Service Checks{% #service-checks %}

The Battery check does not include any Service Checks.

## Troubleshooting{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
