mirror of
https://github.com/prometheus-community/smartctl_exporter.git
synced 2024-11-16 01:33:07 +01:00
6e2143ca62
All errors are already logged from the called functions: readSMARTctl, resultCodeIsOk, jsonIsOk. Logging twice due to the same error is useless and the "smartctl returned bad data for device" message is confusing since that condition may happen when a device is in a low-power mode. Signed-off-by: Jakub Klinkovský <j.l.k@gmx.com> |
||
---|---|---|
.circleci | ||
.github | ||
gentoo/app-metrics/smartctl_exporter | ||
scripts | ||
systemd | ||
.gitignore | ||
.golangci.yml | ||
.promu.yml | ||
.yamllint | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
collect_fake_json.sh | ||
Dockerfile | ||
EXAMPLE.md | ||
gjsonext.go | ||
go.mod | ||
go.sum | ||
LICENSE | ||
main.go | ||
Makefile | ||
Makefile.common | ||
metrics.go | ||
readjson.go | ||
README.md | ||
SECURITY.md | ||
smartctl.go | ||
smartctlinfo.go | ||
VERSION |
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 smarctl polls
--smartctl.device=SMARTCTL.DEVICE ...
The device to monitor (repeatable)
--web.listen-address=":9633"
Address to listen on for web interface and telemetry
--web.telemetry-path="/metrics"
Path under which to expose metrics
--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.