modulepackage
0.0.0-20200910075833-6b5f73e3796c
Repository: https://github.com/youcd/smartctl_exporter.git
Documentation: pkg.go.dev
# README
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
--config=/path/to/file.yaml
: Path to configuration file, defaulr/etc/smartctl_exporter.yaml
--verbose
: verbosed log, default no--debug
: Debug logging, default no--version
: Show version and exit
Configuration file
Example content:
smartctl_exporter:
bind_to: "[::1]:9633"
url_path: "/metrics"
fake_json: no
smartctl_location: /usr/sbin/smartctl
collect_not_more_than_period: 120s
devices:
- /dev/sda
- /dev/sdb
- /dev/sdc
- /dev/sdd
- /dev/sde
- /dev/sdf
fake_json
used for debugging.
# Functions
GetFloatIfExists returns json value or default.
No description provided by the author
GetStringIfExists returns json value or default.
NewSMARTctl is smartctl constructor.
NewSMARTctlInfo is smartctl constructor.
# Variables
No description provided by the author
# Structs
JSONCache caching json.
Logger is logger.
Options is a representation of a options.
SMARTctl object.
SMARTctlInfo object.
SMARTctlManagerCollector implements the Collector interface.
SMARTDevice - short info about device.
SMARTOptions is a inner representation of a options.