Skip to content

Add SMART self-test metrics - #269

Open
alvistar wants to merge 10 commits into
prometheus-community:masterfrom
alvistar:selftest
Open

Add SMART self-test metrics#269
alvistar wants to merge 10 commits into
prometheus-community:masterfrom
alvistar:selftest

Conversation

@alvistar

@alvistar alvistar commented Feb 4, 2025

Copy link
Copy Markdown

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

@robbat2

robbat2 commented Feb 9, 2025

Copy link
Copy Markdown
Contributor

Can you include examples of the output metrics in the PR?
Esp. I want to be able to easily see how it changes when successive tests are run on a device

@k0ste

k0ste commented Feb 11, 2025

Copy link
Copy Markdown
Contributor

@alvistar the DCO is missed, look to the CI results

@daveiit

daveiit commented Oct 15, 2025

Copy link
Copy Markdown

Hi!
would be nice to merge if the only issue are the conflicts.

@k0ste

k0ste commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Hi! would be nice to merge if the only issue are the conflicts.

Impossible to merge before author resolve conflict's and pass CI

@Preclowski

Copy link
Copy Markdown

Hey @alvistar, thank you for your effort! Thats really nice feature. It hurts its stalled just because of conflicts. Could you look into this? Its shame if so nice work is unmerged because of some conflicts. Thank you :)

@TrapStoner

Copy link
Copy Markdown

Hey @alvistar, i was looking if self-test metrics are available and foud your work through this PR. It's a shame some conflicts are stopping this from being merged for so long... could you please look into it?

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.

6 participants