SMARTCTL_EXPORTER(1)

πŸ“¦ version 0.14.0, in ubuntu resolute, ubuntu stonking

πŸ’– 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-long and --help-man if you're feeling extra.
  • --smartctl.path="/usr/sbin/smartctl" β€” the path to the smartctl binary. 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 than 1s, no rescanning takes place. and if any devices are configured with smartctl.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 special by-id value 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 the smartctl binary.

πŸ‘€ 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 Β© 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