Skip to content

check_nvme_health: Add NVMe disk remaining life check#368

Open
lamaral wants to merge 1 commit intomasterfrom
l_nvme
Open

check_nvme_health: Add NVMe disk remaining life check#368
lamaral wants to merge 1 commit intomasterfrom
l_nvme

Conversation

@lamaral
Copy link
Copy Markdown
Contributor

@lamaral lamaral commented Apr 16, 2026

Discovers NVMe devices via /sys/class/nvme and queries percent_used from nvme-cli smart-log to report remaining drive life. Raises WARNING at <=20% and CRITICAL at <=10% remaining life (configurable via -w/-c).

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new Nagios-style monitoring plugin (check_nvme_health) to report NVMe drive remaining life by discovering controllers in /sys/class/nvme and reading percent_used from nvme smart-log JSON output.

Changes:

  • Discover NVMe devices via sysfs and query nvme smart-log --output-format=json.
  • Compute remaining life (100 - percent_used) and apply -w/-c thresholds (default 20/10).
  • Emit plugin output including performance data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/check_nvme_health.py Outdated
Comment thread src/check_nvme_health.py
Discovers NVMe devices via /sys/class/nvme and queries percent_used from
nvme-cli smart-log to report remaining drive life. Raises WARNING at <=20%
and CRITICAL at <=10% remaining life (configurable via -w/-c).
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.

2 participants