This check monitors battery health on MacOS and Windows laptops.
Minimum Agent version: 7.75.0
The Battery check is included in the Datadog Agent package. No additional installation is needed on your server.
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.
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.
See metadata.csv for a list of metrics provided by this integration.
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 power
In Windows, the metric can also report the following tag:
power_state:battery_critical: Indicates that battery failure is imminent
The Battery check does not include any events.
The Battery check does not include any Service Checks.
Need help? Contact Datadog support.