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

-h, --help
    Show context-sensitive help (also try --help-long and --help-man).

--smartctl.path="/usr/sbin/smartctl"
    The path to the smartctl binary.

--smartctl.interval=60s
    The interval between smartctl polls.

--smartctl.rescan=10m
    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.

--smartctl.device=SMARTCTL.DEVICE ...
    The device to monitor (repeatable). Device type can be specified after a semicolon, e.g. '/dev/bus/0;megaraid,1'.

--smartctl.device-exclude=""
    Regexp of devices to exclude from automatic scanning. (mutually exclusive to device-include).

--smartctl.device-include=""
    Regexp of devices to include in automatic scanning. (mutually exclusive to device-exclude).

--smartctl.scan-device-type
    Device type to use during automatic scan. 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"
    Path under which to expose metrics.

--web.systemd-socket
    Use systemd socket activation listeners instead of port listeners (Linux only).

--web.listen-address=:9633 ...
    Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.

--web.config.file=""
    [EXPERIMENTAL] Path to 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.

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