Prometheus exporter for detailed battery metrics on macOS.
A Prometheus exporter for macOS battery information, exposing wide range of details available from `ioreg` about batteries. Includes a lot more details than what `node_exporter` supports via its `node_power_supply_*` metrics. ## Installation ### Manually Binary releases are available on the [Releases](https://github.com/jimeh/macos-battery-exporter/releases) page. ### Homebrew You can install it from the [`jimeh/tap`](https://github.com/jimeh/homebrew-tap) Tap: ```bash brew install jimeh/tap/macos-battery-exporter ``` #### Service The homebrew formula has a service configuration, which can be started with: ```bash brew services start macos-battery-exporter ``` After which battery metrics are available on [`http://localhost:9108/metrics`](http://localhost:9108/metrics). ### Go ```bash go install github.com/jimeh/macos-battery-exporter@latest ``` ## Usage ### Help ```bash macos-battery-exporter -h ``` ``` usage: macos-battery-exporter [