To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.
To initiate an exception request to enable this integration for your organization, email [email protected].
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.
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
power_state:battery_critical: Indicates a critical battery condition. On Windows, this indicates that battery failure is imminent. On macOS, this indicates that the operating system detected a degraded battery that requires service.
Events
The Battery check does not include any events.
Service Checks
The Battery check does not include any Service Checks.