SMART disk stats

36 views
Skip to first unread message

chris....@gmail.com

unread,
Mar 19, 2025, 1:54:24 PM3/19/25
to Prometheus Users
Does anyone know of a repo that has SUSE zypper files for smart disk data?  I'm looking to add smart data(temp, total bytes written, ....)  

I've seen a few that I could compile(if my system had those packages)... could also use smartctl to generate a JSON that could be read.

Was wondering if there was a better way.. was hoping for an easy plug and play.

Brian Candler

unread,
Mar 20, 2025, 9:21:22 AM3/20/25
to Prometheus Users
Not SUSE zypper format, but check out smartmon.py and smartmon.sh from here:

chris....@gmail.com

unread,
Mar 20, 2025, 9:55:29 AM3/20/25
to Prometheus Users
those packages do work but they don't include everything that I'm looking for.  

I found the https://github.com/prometheus-community/smartctl_exporter that seems to have everything at least with the collect-smartctl-json.sh file but the lack of a go compiler is hampering.  Wonder if there is a JSON to prometheus 

Brian Candler

unread,
Mar 20, 2025, 1:49:42 PM3/20/25
to Prometheus Users
On Thursday, 20 March 2025 at 13:55:29 UTC chris....@gmail.com wrote:
Wonder if there is a JSON to prometheus 

Recent versions of smartctl have a -j flag. But it's still up to you to parse out the info to make meaningful metrics; you'd have to decide how to flatten the nested structure, which fields are to be used as labels, and so on.

> the lack of a go compiler is hampering

No need to compile anything, there are published binaries:
Note that you have to click "show all assets" for the Linux ones to be shown, e.g. smartctl_exporter-0.13.0.linux-amd64.tar.gz

Go binaries are statically linked (usually):

# ldd smartctl_exporter
not a dynamic executable
#

Hence you can copy this to, and run it on, any Linux system of your choice. No SUSE-specific packaging is required, although you might want to install a systemd unit file to run it.  A sample is provided here:

Reply all
Reply to author
Forward
0 new messages