Scroll to navigation

SMARTCTL_EXPORTER(1) User Commands SMARTCTL_EXPORTER(1)

NAME

smartctl_exporter - export S.M.A.R.T. metrics to Prometheus

SYNOPSIS

smartctl_exporter [OPTIONS]

DESCRIPTION

smartctl_exporter is a Prometheus exporter that collects metrics from S.M.A.R.T. capable devices using the smartctl tool from the smartmontools package. It exposes these metrics via HTTP for consumption by Prometheus.

The exporter scans the system for available devices if no --smartctl.device flags are used. It periodically polls the devices for their S.M.A.R.T. data and exposes it as Prometheus metrics.

REQUIREMENTS

smartmontools >= 7.0, because export to JSON was released in version 7.0.

OPTIONS

Show context-sensitive help (also try --help-long and --help-man).
The path to the smartctl binary.
The interval between smartctl polls.
The interval between rescanning for new/disappeared devices. If the interval is smaller than 1s no rescanning takes place. If any devices are configured with smartctl.device also no rescanning takes place.
The device to monitor (repeatable). Device type can be specified after a semicolon, e.g. '/dev/bus/0;megaraid,1'.
Regexp of devices to exclude from automatic scanning. (mutually exclusive to device-include).
Regexp of devices to include in automatic scanning. (mutually exclusive to device-exclude).
Device type to use during automatic scan. Special by-id value forces predictable device names. (repeatable).
Whether or not to check powermode before fetching data. Valid values: never, sleep, standby, idle.
Path under which to expose metrics.
Use systemd socket activation listeners instead of port listeners (Linux only).
Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.
[EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.
Only log messages with the given severity or above. One of: [debug, info, warn, error].
Output format of log messages. One of: [logfmt, json].
Show application version.

TLS AND BASIC AUTHENTICATION

This exporter supports TLS and basic authentication. To use TLS and/or basic authentication, you need to pass a configuration file using the --web.config.file parameter. The format of the file is described in the exporter-toolkit repository documentation.

EXAMPLE

Minimal example of running the exporter:

smartctl_exporter --web.listen-address=:9633

Example with specific devices:

smartctl_exporter --smartctl.device=/dev/sda --smartctl.device=/dev/sdb

Example with device filtering:

smartctl_exporter --smartctl.device-include='^/dev/sd'

TROUBLESHOOTING

Data Inconsistencies

smartctl_exporter uses the JSON output from smartctl to provide the data to Prometheus. If the data is incorrect, look at the data from smartctl to determine if the issue should be reported upstream to smartmontools or to this repo.

In general, if the data is missing from smartctl, it should not be in smartctl_exporter. If the data from smartctl is incorrect, it should be reported upstream to smartmontools.

FILES

/usr/sbin/smartctl
The default path to the smartctl binary.

SEE ALSO

smartctl(8), smartd(8)

Full documentation and FAQ available at: https://github.com/prometheus-community/smartctl_exporter

AUTHOR

smartctl_exporter was created by the Prometheus Community.

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

2023 smartctl_exporter