Skip to content

danielskowronski/ismc-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus exporter for iSMC + S.M.A.R.T. data from macOS

This exporter uses github.com/dkorunic/iSMC and github.com/anatol/smart.go.

It is intended to measure data not covered by node-exporter on modern Apple-Silicon Mac, mainly various sensors from iSMC and temperature sensors for NVMe drives - both built-in and ones connected via Thunderbolt (PCIe).

Data

Data is exposed on port 65002

ismc_

Labels:

  • family - enum of 4 categories
  • key - key from iSMC
  • label - description from iSMC converted to influx-like format (no spaces)
  • unit

Metrics:

  • ismc_battery{family="battery",key="....",label="...",unit="none"}
  • ismc_fans{family="fans",key="....",label="...",unit="rpm"}
  • ismc_power{family="power",key="....",label="...",unit="w"}
  • ismc_temperature{family="temperature",key="....",label="...",unit="c"}

smart_

Labels:

  • device - disk node of SMART-capable NVMe disk under in /dev (e.g. disk0); not guaranteed to stay the same between reboots
  • model - disk model string
  • serial - disk serial string
  • size - size in bytes, may default to 0 for built-in drive
  • unit

Metrics:

  • smart_power_cycles{device="disk0",model="APPLE SSD ...",serial="...",size="0",unit=""}
  • smart_power_hours{device="disk0",model="APPLE SSD ...",serial="...",size="0",unit=""}
  • smart_temperature{device="disk0",model="APPLE SSD ...",serial="...",size="0",unit="c"}
  • smart_units_read{device="disk0",model="APPLE SSD ...",serial="...",size="0",unit=""}
  • smart_units_written{device="disk0",model="APPLE SSD ...",serial="...",size="0",unit=""}

Usage

Example scenario using launchctl and Prometheus Stack on k8s:

  • self-compile using go
  • install binary to /usr/local/bin (as root)
  • deploy provided example service plist to ~/Library/LaunchAgents/
  • launchctl load ~/Library/LaunchAgents/tech.skowronski.ismc-exporter.plist
  • patch provided example ScrapeConfig CRD for PromStack with correct IP address and name of your Mac
  • deploy it onto k8s with kubectl -f PromStackScrapeConfig.yaml apply
  • create Grafana dashboard

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages