Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SMART self-test metrics #269

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

alvistar
Copy link

@alvistar alvistar commented Feb 4, 2025

This PR adds support for monitoring SMART self-test results, providing visibility into the health and reliability of storage devices. The implementation supports both ATA and SCSI devices.

New metrics:

  • smartctl_device_last_self_test: Status value of the most recent self-test
  • smartctl_device_last_self_test_info: Detailed information about the most recent self-test including type, status description, and when it was performed

The implementation includes:

  • Support for both ATA and SCSI device self-test logs
  • Comprehensive test coverage with real-world device data
  • Modified smartctl command to include self-test logs

Testing:

  • Added test cases using real device data from:
    • Seagate Exos X16 (ATA)
    • Seagate ST18000NM004J (SCSI)
  • Implemented testing framework for metric collection and validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant