Add Seagate FARM log metrics, vdev-label support, deploy tooling, and Grafana dashboard#357
Open
mpyne1 wants to merge 16 commits into
Open
Add Seagate FARM log metrics, vdev-label support, deploy tooling, and Grafana dashboard#357mpyne1 wants to merge 16 commits into
mpyne1 wants to merge 16 commits into
Conversation
Add opt-in collection of Seagate FARM (Field Accessible Reliability Metrics) log data via new --smartctl.farm-log CLI flag. When enabled, passes --log=farm to smartctl and exports metrics from: - Page 2: workload statistics (read/write commands, sectors read/written) - Page 3: error statistics (unrecoverable errors, reallocated sectors, CRC errors, command timeouts) including per-head breakdowns - Page 4: environment (temperature, humidity, voltage, motor power) - Page 5: reliability (error rate, seek error rate, unload events, helium pressure) including per-head reallocations, skip-write detect, and MR head resistance Requires smartmontools 7.4+ for FARM JSON output support.
- deploy.sh: builds and deploys to multiple hosts, auto-detects Grafana - smartctl-farm-dashboard.json: Grafana dashboard for FARM metrics - smartctl_exporter.yml: Prometheus scrape config - systemd/smartctl_exporter.service: updated ExecStart with --smartctl.farm-log
- Install smartmontools if missing (dnf/apt) - Print smartctl version to confirm FARM support (>=7.4) - Check if Prometheus exists before updating scrape config - Remove empty smartctl_exporter.yml (config generated dynamically) - Add note that all hosts must be passed each run (config is replaced) - Update dashboard JSON with instance variable and localhost filter
Farmlogs
Uses udevadm to look up ID_VDEV property for each device, providing physical slot numbers (e.g. 2-1, 3-15) as Prometheus device labels instead of kernel device names. Falls back to /dev/sdX name if no ID_VDEV is found. Also updates deploy.sh with stop-before-copy, smartctl path detection, Grafana dashboard import improvements, and dual Prometheus config support.
Farmlogs
dashboard: split 12V and 5V voltage charts into separate current/min/…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds Seagate FARM (Field Accessible Reliability Metrics) log support to smartctl_exporter, along with deployment tooling and a purpose-built Grafana dashboard.
FARM Log Metrics
Parses Seagate FARM log data from
smartctl -j --log=farmand exposes the following Prometheus metric families:FARM log collection is enabled via the
--smartctl.farm-logflag and handles errors gracefully with limited concurrency to avoid overloading storage controllers.vdev-label Support
Adds
--smartctl.vdev-labelflag that reads udevID_VDEVproperties to use ZFS vdev labels (e.g. enclosure slot identifiers) as the device label in metrics, making it easier to correlate metrics with physical disk locations.Grafana Dashboard
Includes a comprehensive smartctl-farm-dashboard.json with panels for:
Template variables for instance, device, temperature type, and voltage type filtering.
Deploy Script
deploy.sh automates end-to-end deployment to one or more target hosts:
CGO_ENABLED=0)ID_VDEVudev data and enables--smartctl.vdev-labelsmartctlpathsscrape_config_filesand inlineprometheus.ymlstyles)