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

Support NVMe devices in smart input plugin #4169

Closed
Lyncredible opened this issue May 18, 2018 · 7 comments · Fixed by #5765
Closed

Support NVMe devices in smart input plugin #4169

Lyncredible opened this issue May 18, 2018 · 7 comments · Fixed by #5765
Assignees
Labels
area/smart bug unexpected problem or unintended behavior feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@Lyncredible
Copy link

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Support NVMe devices in smart input plugin. smartmontools produces a different format for NVMe devices than SATA devices. See https://www.smartmontools.org/wiki/NVMe_Support for sample output.

Current behavior:

Currently the smart plugin does not work with NVMe devices.

Desired behavior:

It should correctly parse output from smartctl with NVMe devices.

Use case: [Why is this important (helps with prioritizing requests)]

NVMe devices will become more and more popular. It is important to see metrics for them.

@danielnelson danielnelson added the feature request Requests for new plugin and for new features to existing plugins label May 18, 2018
@dazzathewiz
Copy link

dazzathewiz commented Jun 5, 2018

This is a shell script I wrote which gets NVME temps, incase it helps (or at least others can use in the mean time). It may be specific to my environment though:

for device in /dev/nvme[0-9]; do
	temp=`smartctl -a $device | grep Temperature | awk '{print $2}'`
	serial=`smartctl -a $device | grep Serial | awk '{print $3}'`
	percent=`smartctl -a $device | grep Percentage | awk '{print $3}' | sed 's/.$//'`
	echo "disk,device=$device,serial=$serial temperature=$temp,percent_used=$percent"
done

@ValyaB
Copy link

ValyaB commented Jun 14, 2018

NVME devices have supported if specify type during the scan:
smartclt --scan -d nvme
Could you add an additional option to SMART plugin for specifying device type during the scan

Currently:
smartctl --scan
Desired:
smartctl --scan -d TYPE

@danielnelson
Copy link
Contributor

You may be able to use the devices option as a workaround for now: devices = ["/dev/foo -d nvme"]

@ValyaB
Copy link

ValyaB commented Jun 15, 2018

seems there is a different list of fields for NVME devices and only smartOverallHealth and serialInfo are exist if used smart plugin
smartctl --info --attributes --health --format=brief /dev/nvme0

smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.1.27-gvt-yocto-standard] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Number: TS128GMTE850
Serial Number: D704940282?
Firmware Version: C2.3.13
PCI Vendor/Subsystem ID: 0x126f
IEEE OUI Identifier: 0x000000
Controller ID: 1
Number of Namespaces: 1
Namespace 1 Size/Capacity: 128,035,676,160 [128 GB]
Namespace 1 Formatted LBA Size: 512
Local Time is: Fri Jun 15 11:41:35 2018 UTC

=== 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: 38 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 16%
Data Units Read: 11,836,935 [6.06 TB]
Data Units Written: 62,288,091 [31.8 TB]
Host Read Commands: 135,924,188
Host Write Commands: 7,715,573,429
Controller Busy Time: 4,042
Power Cycles: 472
Power On Hours: 6,038
Unsafe Shutdowns: 355
Media and Data Integrity Errors: 0
Error Information Log Entries: 119,699
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0

@russorat russorat added this to the 1.11.0 milestone Apr 22, 2019
@russorat russorat added the bug unexpected problem or unintended behavior label Apr 24, 2019
@coccobill1
Copy link

The plugin still only seems to save smart_device data to influxdb for my 970 EVO NVME drive, not smart_attribute.

@danielnelson
Copy link
Contributor

@coccobill1 Could you open a new issue with the output described here?

@coccobill1
Copy link

Sure, hope this helps: #6032

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/smart bug unexpected problem or unintended behavior feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants