The exporter seems to generate metrics for sata disks but fails for my nvme hosts:
root@node-exporter-smartmon-2k9qk:/var/lib/node_exporter# cat smartmon.prom
# HELP smartmon_smartctl_version SMART metric smartctl_version
# TYPE smartmon_smartctl_version gauge
smartmon_smartctl_version{version="6.6"} 1
# HELP smartmon_device_active SMART metric device_active
# TYPE smartmon_device_active gauge
smartmon_device_active{disk="/dev/sda",type="scsi"} 1
smartmon_device_active{disk="/dev/sdb",type="scsi"} 1
smartmon_device_active{disk="/dev/sdc",type="scsi"} 1
# HELP smartmon_device_info SMART metric device_info
# TYPE smartmon_device_info gauge
smartmon_device_info{disk="/dev/sda",type="scsi",vendor="IET",product="VIRTUAL-DISK",revision="0001",lun_id="0x30000001000000010x60000000000000000e00000000010001",model_family="",device_model="",serial_number="",firmware_version=""} 1
smartmon_device_info{disk="/dev/sdb",type="scsi",vendor="IET",product="VIRTUAL-DISK",revision="0001",lun_id="0x30000002000000010x60000000000000000e00000000020001",model_family="",device_model="",serial_number="",firmware_version=""} 1
smartmon_device_info{disk="/dev/sdc",type="scsi",vendor="IET",product="VIRTUAL-DISK",revision="0001",lun_id="0x30000003000000010x60000000000000000e00000000030001",model_family="",device_model="",serial_number="",firmware_version=""} 1
# HELP smartmon_device_smart_available SMART metric device_smart_available
# TYPE smartmon_device_smart_available gauge
smartmon_device_smart_available{disk="/dev/sda",type="scsi"} 1
smartmon_device_smart_available{disk="/dev/sdb",type="scsi"} 1
smartmon_device_smart_available{disk="/dev/sdc",type="scsi"} 1
# HELP smartmon_device_smart_enabled SMART metric device_smart_enabled
# TYPE smartmon_device_smart_enabled gauge
smartmon_device_smart_enabled{disk="/dev/sda",type="scsi"} 0
smartmon_device_smart_enabled{disk="/dev/sdb",type="scsi"} 0
smartmon_device_smart_enabled{disk="/dev/sdc",type="scsi"} 0
# HELP smartmon_device_smart_healthy SMART metric device_smart_healthy
# TYPE smartmon_device_smart_healthy gauge
smartmon_device_smart_healthy{disk="/dev/sda",type="scsi"} 1
smartmon_device_smart_healthy{disk="/dev/sdb",type="scsi"} 1
smartmon_device_smart_healthy{disk="/dev/sdc",type="scsi"} 1
# HELP smartmon_smartctl_run SMART metric smartctl_run
# TYPE smartmon_smartctl_run gauge
smartmon_smartctl_run{disk="/dev/sda",type="scsi"} 1644098182
smartmon_smartctl_run{disk="/dev/sdb",type="scsi"} 1644098190
smartmon_smartctl_run{disk="/dev/sdc",type="scsi"} 1644098198
root@node-exporter-smartmon-2k9qk:/var/lib/node_exporter# smartctl -a /dev/nvme0
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-5.4.0-97-generic] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: Samsung SSD 980 500GB
Serial Number: S64DNF0R967004T
Firmware Version: 1B4QFXO7
PCI Vendor/Subsystem ID: 0x144d
IEEE OUI Identifier: 0x002538
Total NVM Capacity: 500,107,862,016 [500 GB]
Unallocated NVM Capacity: 0
Controller ID: 5
Number of Namespaces: 1
Namespace 1 Size/Capacity: 500,107,862,016 [500 GB]
Namespace 1 Utilization: 125,461,372,928 [125 GB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 002538 d911b194f9
Local Time is: Sat Feb 5 22:01:21 2022 UTC
Firmware Updates (0x16): 3 Slots, no Reset required
Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test
Optional NVM Commands (0x0055): Comp DS_Mngmt Sav/Sel_Feat Timestmp
Maximum Data Transfer Size: 512 Pages
Warning Comp. Temp. Threshold: 82 Celsius
Critical Comp. Temp. Threshold: 85 Celsius
Namespace 1 Features (0x10): *Other*
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 5.24W - - 0 0 0 0 0 0
1 + 4.49W - - 1 1 1 1 0 0
2 + 2.19W - - 2 2 2 2 0 500
3 - 0.0500W - - 3 3 3 3 210 1200
4 - 0.0050W - - 4 4 4 4 1000 9000
Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART/Health Information (NVMe Log 0x02, NSID 0xffffffff)
Critical Warning: 0x00
Temperature: 53 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 2%
Data Units Read: 2,343,146 [1.19 TB]
Data Units Written: 9,288,707 [4.75 TB]
Host Read Commands: 55,157,318
Host Write Commands: 351,969,224
Controller Busy Time: 891
Power Cycles: 3
Power On Hours: 2,382
Unsafe Shutdowns: 0
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 2
Critical Comp. Temperature Time: 0
Temperature Sensor 1: 53 Celsius
Temperature Sensor 2: 59 Celsius
Thermal Temp. 2 Transition Count: 670
Thermal Temp. 2 Total Time: 124
Error Information (NVMe Log 0x01, max 64 entries)
No Errors Logged
I have also some virtual disk created by longhorn in k8s, they should not appear in the exporter output because there are no smart values anyway:
root@node-exporter-smartmon-2k9qk:/var/lib/node_exporter# smartctl /dev/sda
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-5.4.0-97-generic] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org