Find a file
Eric Culp 6b6fd628d2 Fix exit code bit parsing
The previous code was parsing left-to-right, but the bits are actually
numbered right-to-left (least to most significant). Instead of
converting to strings, just use bitmasks.

Fixes https://github.com/prometheus-community/smartctl_exporter/issues/22

Signed-off-by: Eric Culp <eculperic@gmail.com>
2022-03-17 16:57:34 -06:00
.circleci store_artifacts 2019-08-16 13:53:03 +03:00
docker Parsing smartctl error code; parsing resulting json for smartctl errors; docker moved to subfolder 2020-10-30 00:35:49 +03:00
gentoo/app-metrics/smartctl_exporter gentoo ebuild keywords 2019-08-17 19:35:23 +03:00
systemd systemd service 2019-08-15 00:04:32 +03:00
.gitignore apply merges 2020-11-14 18:36:34 +03: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
EXAMPLE.md right example 2019-08-17 13:26:31 +03:00
gjsonext.go First commit 2019-08-14 23:34:49 +03:00
go.mod merging tavyc 2020-11-14 17:57:43 +03:00
go.sum Convert to Go module. 2020-07-26 21:08:03 +03:00
LICENSE Initial commit 2019-08-14 23:28:21 +03:00
logging.go First commit 2019-08-14 23:34:49 +03:00
main.go apply merges 2020-11-14 18:36:34 +03:00
Makefile Parsing smartctl error code; parsing resulting json for smartctl errors; docker moved to subfolder 2020-10-30 00:35:49 +03:00
metrics.go chripede-master merge 2020-11-14 18:30:32 +03:00
options.go option for set minimum time period between run smartctl; smartctl info metric 2019-08-16 00:01:16 +03:00
readjson.go Fix exit code bit parsing 2022-03-17 16:57:34 -06:00
README.md Update README.md 2019-08-26 11:27:28 +03:00
smartctl.go apply merges 2020-11-14 18:36:34 +03:00
smartctl_exporter.yaml apply merges 2020-11-14 18:36:34 +03:00
smartctlinfo.go option for set minimum time period between run smartctl; smartctl info metric 2019-08-16 00:01:16 +03:00

CircleCI

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.