sensu-plugins / sensu-plugins-disk-checks

This plugin provides native disk instrumentation for monitoring and metrics collection, including: health, usage, and various metrics.
http://sensu-plugins.io
MIT License
27 stars 63 forks source link

check-smart.rb doesn't recognize NVMe SSD #115

Open mdzidic opened 5 years ago

mdzidic commented 5 years ago

check-smart.rb throws: CheckSMART UNKNOWN: No SMART capable devices found

And this is output from lsblk:

# lsblk -nro NAME,TYPE
nvme0n1 disk
nvme0n1p1 part
md0 raid1
nvme0n1p2 part
md1 raid1
nvme0n1p3 part
md2 raid1
nvme1n1 disk
nvme1n1p1 part
md0 raid1
nvme1n1p2 part
md1 raid1
nvme1n1p3 part
md2 raid1
pfak commented 4 years ago

NVMe drives require having SMART capabilities, so smartctl will not output that the device has capability.

https://www.smartmontools.org/ticket/1134

FredrikWendt commented 7 months ago

If I understand things correctly, NVMe drives have basic SMART capabilities. There just aren't optional ones that can be turned on/off.

Unlike ATA/SATA, NVMe drives have no optional SMART support which could be unavailable or disabled. The NVMe SMART/Health Information log is mandatory.

See https://www.smartmontools.org/ticket/1134#comment:10

SMART/Health Information (NVMe Log 0x02) seems to be something to scan for in the smartctl output, in the find_devices method:

https://github.com/sensu-plugins/sensu-plugins-disk-checks/blob/master/bin/check-smart-status.rb#L311