Battery

Supported OS Windows Mac OS

Intégration1.0.0
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Overview

This check monitors battery health on MacOS and Windows laptops.

Minimum Agent version: 7.75.0

Setup

Installation

The Battery check is included in the Datadog Agent package. No additional installation is needed on your server.

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. See the sample battery.d/conf.yaml for all available configuration options. When you are done editing the configuration file, restart the Agent to load the new configuration.

Validation

Run the Agent’s status subcommand and look for battery under the Checks section.

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

Data Collected

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

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

The Battery check does not include any events.

Service Checks

The Battery check does not include any Service Checks.

Troubleshooting

Need help? Contact Datadog support.