prometheus...n-exporter(1)
β¨ NAME β¨
prometheus-diskspin-exporter β bestie, it's literally here to monitor your spinning rust disks in Prometheus π
π¦ SYNOPSIS π¦
prometheus-diskspin-exporter INTERFACE PORT
πΈ DESCRIPTION πΈ
okay so. prometheus-diskspin-exporter is a zero-dependency Python program that will export the power state of the SATA disks found on the host and expose them to an HTTP endpoint for consumption by Prometheus. no cap. π«Ά
Here's the vibe: it monitors if the disks are correctly shut down according to scheduled time in the disk, or manual calls to hdparm -y. It calls hdparm -C on every request and parses the status of each SATA disk /dev/sd* reported by lsblk. β¨
Now the important part β the program limits queries on SATA disks because NVME SSDs and other disk types will often respond with an unknown status to the hdparm -C command. so yeah, it's not being lazy, it's being selective π
This way one can monitor disk spin status to be sure that the spin policy works correctly: energy is saved and noise is reduced when not in use, and disks do not spin up and down too often to prevent wear. iconic behavior honestly. π₯
π OPTIONS π
INTERFACEβ Network interface to bind to. An empty string binds on all interfaces. (yes, all of them, she's everywhere π)PORTβ Network port to listen on. π
π EXAMPLES π
Below is an example output of an HTTP response sent from the server, and she ate:
hdparm_disk_power_status{disk="/dev/sda",status="standby"} 1 1731616722000
hdparm_disk_power_status{disk="/dev/sdb",status="standby"} 1 1731616722000
hdparm_disk_power_status{disk="/dev/sdc",status="standby"} 1 1731616722000
hdparm_disk_power_status{disk="/dev/sdd",status="active/idle"} 1 1731616722000
π BUGS π
ngl, there's some stuff you need to know about. not me being the bearer of bad news but here we are π
The server will reply for any URL, not only /metrics. Why? Because this is the only thing the server do and there is no point in parsing the query url to match it. it's giving "i have one job and i do it" π
The server will run lsblk and hdparm -C on every request. This may DDoS your machine if an attacker spams the server. Always make sure to allow access to this HTTP server only for authorized users.
π¨ bestie PLEASE. do not leave this thing wide open on the internet. she's small and she's trying her best but she cannot fight an attacker for you. lock it down. periodt.
See https://github.com/gagath/prometheus-diskspin-exporter/issues to file your complaints (politely, she's sensitive π₯Ί)
π SEE ALSO π
hdparm(1)lsblk(1)
and that's the whole page, bestie!! π¦β¨ this was prometheus...n-exporter(1) from the General Commands Manual, and this version is dated 2026-01-24. go monitor those disks and stay iconic ππ
π¦ where this page comes from
- ubuntu stonking: prometheus-diskspin-exporter 1.1-2 Β· GPL-3.0-only
- π the page's license: GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms