Supported OS
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 dischargeShown as milliwatt system.battery.current_charge_pct (gauge)The current percentage of battery chargeShown 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 newShown as milliwatt-hour system.battery.maximum_capacity (gauge)The battery’s current fully charged capacityShown as milliwatt-hour system.battery.maximum_capacity_pct (gauge)The percentage of maximum battery capacity relative to when it was newShown 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 terminalsShown as millivolt
The metric system.battery.power_state can report any of the following tags:
power_state:battery_charging: Indicates that the battery is chargingpower_state:battery_discharging: Indicates that the battery is dischargingpower_state:battery_power_on_line: Indicates that the battery is connected to AC powerIn Windows, the metric can also report the following tag:
power_state:battery_critical: Indicates that battery failure is imminentEvents 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 .