How to List Battery Status Across All Macs
Using Kolide, you can easily view and query Mac Battery Status across your fleet.
Introduction
Portable macOS devices such as MacBooks can report diagnostic data about the identity and state of their internal battery. This can include details such as charge cycles, charge percentage, and overall health.
What Mac Battery Status Data Can Kolide Collect?
Kolide's endpoint agent bundles in osquery to efficiently collect Mac Battery Status from Macs in your fleet. Once collected, Kolide will parse, clean up, and centrally store this data in Inventory for your team to view, query, or export via API.
Kolide meticulously documents every piece of data returned so you can understand the results.
Mac Battery Status Schema
Column | Type | Description | |
---|---|---|---|
id | Primary Key |
Unique identifier for the object |
|
device_id | Foreign Key |
Device associated with the entry |
|
device_name | Text |
Display name of the device associated with the entry |
|
amperage | Integer |
The battery's current amperage in mA |
|
charged | Boolean |
|
|
charging | Boolean |
|
|
condition | Enum::Text |
A description of the battery's condition Can be one of the following:
|
|
current_capacity | Integer |
The battery's current charged capacity in mAh |
|
cycle_count | Integer |
The number of charge/discharge cycles |
|
designed_capacity | Integer |
The battery's designed capacity in mAh |
|
health | Enum::Text |
A description of the battery's health Can be one of the following:
|
|
manufacture_date | Date |
The date the battery was manufactured |
|
manufacturer | Text |
The battery manufacturer's name Note on data collection: Due to a bug in the macOS battery API,
occasionally this value will be overwritten with |
|
max_capacity | Integer |
The battery's actual capacity when it is fully charged in mAh |
|
minutes_to_full_charge | Integer |
The number of minutes until the battery is fully charged. Special Values:
|
|
minutes_until_empty | Integer |
The number of minutes until the battery is fully depleted. Special Values:
|
|
model | Text |
The battery's model number |
|
percent_remaining | Integer |
The percentage of battery remaining before it is drained |
|
serial | Text |
The battery's unique serial number |
|
state | Enum::Text |
A description of the battery's current charging state or status Can be one of the following:
|
|
voltage | Integer |
The battery's current voltage in mV |
|
collected_at | Timestamp |
Time the row of data was first collected in the database |
|
updated_at | Timestamp |
Time the row of data was last changed in the database |
|
What Can You Do With This Information?
Kolide enables you to write your own queries against the data the agent collects. This allows you to build your own reports and API endpoints. For example, you can:
SELECT
device_name,
model AS battery_model,
health,
serial AS battery_serial,
cycle_count
FROM mac_batteries
WHERE health != 'Good'
health | cycle_count | device_name | battery_model | battery_serial |
---|---|---|---|---|
Check Battery | 227 | eradicator | bq20z451 | D868267A5WWJ65H3Q |
Check Battery | 418 | georges-macbook | bq20z451 | F5D80135MBWGQT7AC |
Why Should I Collect Mac Battery Status?
This information is collected to determine batteries which are potentially in need of service or likely due for replacement. Serial numbers are also cataloged for administrators to cross reference with Apple recall notices.
End-User Privacy Consideration
Kolide practices Honest Security. We believe that data should be collected from end-user devices transparently and with privacy in mind.
When you use Kolide to list Mac Battery Status data from end-user devices, Kolide gives the people using those devices insight into exactly what data is collected, the privacy implications, and who on the IT team can see the data. This all happens in our end-user privacy center which can be accessed directly by employees.