SMARTCTL_EXPORTER(1)
π SMARTCTL_EXPORTER π
okay bestie, sit down, hydrate, and let me tell you about smartctl_exporter β she's a user command and she's literally the moment. no cap. π«Ά
β¨ NAME β¨
smartctl_exporter β she exports S.M.A.R.T. metrics to Prometheus. that's it, that's the job, and she eats every time. π
πΈ SYNOPSIS πΈ
smartctl_exporter [OPTIONS]
π¦ DESCRIPTION π¦
so smartctl_exporter is a Prometheus exporter, right? she collects metrics from S.M.A.R.T. capable devices using the smartctl tool from the smartmontools package. then she exposes all those metrics over HTTP so Prometheus can come get them. iconic behavior honestly.
if you don't pass any --smartctl.device flags, she'll just scan your whole system for available devices herself. then she periodically polls those devices for their S.M.A.R.T. data and puts it out there as Prometheus metrics. she's self-sufficient like that. π
β REQUIREMENTS β
smartmontools >= 7.0β and this is not a suggestion bestie, because export to JSON was released in version 7.0 and without JSON there's literally nothing to work with. π
π OPTIONS π
-h,--helpβ shows context-sensitive help. also try--help-longand--help-manif you're feeling extra.--smartctl.path="/usr/sbin/smartctl"β the path to thesmartctlbinary. tell her where her bestie lives.--smartctl.interval=60sβ how long she waits between smartctl polls.--smartctl.rescan=10mβ the interval between rescanning for new/disappeared devices. heads up: if the interval is smaller than1s, no rescanning takes place. and if any devices are configured withsmartctl.device, also no rescanning takes place. she's busy, okay?--smartctl.device=SMARTCTL.DEVICE ...β the device to monitor (repeatable, so you can stack her up). you can specify the device type after a semicolon, like'/dev/bus/0;megaraid,1'. cute.--smartctl.device-exclude=""β regexp of devices to exclude from automatic scanning. (mutually exclusive to device-include β pick a lane bestie, you can't do both.)--smartctl.device-include=""β regexp of devices to include in automatic scanning. (mutually exclusive to device-exclude, same deal.)--smartctl.scan-device-typeβ device type to use during automatic scan. the specialby-idvalue forces predictable device names. (repeatable.)--smartctl.powermode-check="standby"β whether or not to check powermode before fetching data. valid values:never,sleep,standby,idle.--web.telemetry-path="/metrics"β the path under which to expose metrics.--web.systemd-socketβ use systemd socket activation listeners instead of port listeners. (Linux only, sorry other girlies.)--web.listen-address=:9633 ...β addresses on which to expose metrics and the web interface. repeatable for multiple addresses.--web.config.file=""β [EXPERIMENTAL] path to a configuration file that can enable TLS or authentication.--log.level=infoβ only log messages with the given severity or above. one of:[debug, info, warn, error].--log.format=logfmtβ output format of log messages. one of:[logfmt, json].--versionβ show application version. she'll tell you who she is. πββοΈ
π TLS AND BASIC AUTHENTICATION π
she supports TLS and basic authentication, yes ma'am. to use TLS and/or basic auth, you need to pass a configuration file using the --web.config.file parameter. the format of that file is described in the exporter-toolkit repository documentation. go read it, it's giving homework but it's important. π
π EXAMPLE π
minimal example of running the exporter β just the basics:
smartctl_exporter --web.listen-address=:9633
example with specific devices, when you know exactly who you're monitoring:
smartctl_exporter --smartctl.device=/dev/sda --smartctl.device=/dev/sdb
example with device filtering, regexp girlies rise:
smartctl_exporter --smartctl.device-include='^/dev/sd'
π TROUBLESHOOTING π
Data Inconsistencies
smartctl_exporter uses the JSON output from smartctl to provide the data to Prometheus. so if the data looks wrong, go look at the data from smartctl yourself and figure out whether the issue should be reported upstream to smartmontools or to this repo. detective work, but make it S.M.A.R.T. π
in general, if the data is missing from smartctl, it should not be in smartctl_exporter. and if the data from smartctl is incorrect, it should be reported upstream to smartmontools. don't shoot the messenger bestie, she's just relaying. π
π FILES π
/usr/sbin/smartctlβ the default path to thesmartctlbinary.
π SEE ALSO π
full documentation and FAQ available at: https://github.com/prometheus-community/smartctl_exporter β iykyk.
π AUTHOR π
smartctl_exporter was created by the Prometheus Community. slay. π
π COPYRIGHT π
Copyright Β© 2022 The Prometheus Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
http://www.apache.org/licenses/LICENSE-2.0
and that's the whole page bestie, you're so smart now. π§
kisses, this was smartctl_exporter from 2023, part of the SMARTCTL_EXPORTER(1) manual, brought to you by the Prometheus Community. go forth and export those metrics. periodt. π
β¨
π¦ where this page comes from
- ubuntu resolute: prometheus-smartctl-exporter 0.14.0-2 Β· Apache-2.0
- ubuntu stonking: prometheus-smartctl-exporter 0.14.0-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms