Find a file
David Randall e5bf7aa1b2
Merge pull request #138 from tekert/fix_data_written_ssd
Fix reported Data bytes Read/Written on SSDs
2023-08-10 11:58:18 -04:00
.circleci Update build 2023-04-12 09:36:11 +02:00
.github Update build 2023-04-12 09:36:11 +02:00
gentoo/app-metrics/smartctl_exporter Cleanup obsolete yaml config 2022-10-03 17:35:37 +02:00
scripts Refactor exporter config (#68) 2022-10-03 11:16:00 +02:00
systemd systemd service 2019-08-15 00:04:32 +03:00
.gitignore Fix Dockerfile (#53) 2022-08-08 17:03:53 +02:00
.golangci.yml Refactor exporter config (#68) 2022-10-03 11:16:00 +02:00
.promu.yml Update build 2023-04-12 09:36:11 +02:00
.yamllint Update common Prometheus files 2023-04-13 17:50:49 +00:00
CHANGELOG.md Release v0.9.1 2022-11-06 12:42:41 +01:00
CODE_OF_CONDUCT.md Update common Prometheus files 2022-06-17 19:51:12 +00:00
collect_fake_json.sh Parsing smartctl error code; parsing resulting json for smartctl errors; docker moved to subfolder 2020-10-30 00:35:49 +03:00
device_filter.go Add device filtering 2022-12-09 21:12:08 +01:00
device_filter_test.go Add device filtering 2022-12-09 21:12:08 +01:00
Dockerfile Drop arm64 Docker image 2022-10-05 14:06:48 +02:00
EXAMPLE.md Added disk form_factor meta label 2022-10-17 14:28:05 +07:00
gjsonext.go Release 0.7.0 (#50) 2022-08-05 03:37:13 +02:00
go.mod Update build 2023-04-12 09:36:11 +02:00
go.sum Update build 2023-04-12 09:36:11 +02:00
LICENSE Initial commit 2019-08-14 23:28:21 +03:00
main.go Add background scanning for devices 2023-08-10 12:10:39 +02:00
Makefile Drop arm64 Docker image 2022-10-05 14:06:48 +02:00
Makefile.common Update common Prometheus files 2023-06-18 17:52:13 +00:00
metrics.go Critical metrics for SCSI disks added 2023-06-29 14:50:45 -05:00
readjson.go Merge pull request #141 from k0ste/help2 2023-08-10 08:47:22 -04:00
README.md Add background scanning for devices 2023-08-10 12:10:39 +02:00
SECURITY.md Update common Prometheus files 2022-06-17 19:51:12 +00:00
smartctl.go Merge pull request #138 from tekert/fix_data_written_ssd 2023-08-10 11:58:18 -04:00
smartctlinfo.go Avoid running mineVersion when the SMARTctlInfo struct is not ready 2022-11-06 11:56:43 +01:00
VERSION Release v0.9.1 2022-11-06 12:42:41 +01:00

CircleCI Container Repository on Quay

smartctl_exporter

Export smartctl statistics to prometheus

Example output you can show in EXAMPLE.md

Need more?

If you need additional metrics - contact me :) Create a feature request, describe the metric that you would like to have and attach exported from smartctl json file

Requirements

smartmontools >= 7.0, because export to json released in 7.0

Configuration

Command line options

The exporter will scan the system for available devices if no --smartctl.device flags are used.

usage: smartctl_exporter [<flags>]

Flags:
  -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)
      --smartctl.device-exclude=""
                               Regexp of devices to exclude from automatic scanning. (mutually exclusive to
                               device-include)
      --smartctl.device-include=""
                               Regexp of devices to exclude from automatic scanning. (mutually exclusive to
                               device-exclude)
      --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.