-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
S.M.A.R.T input plugin: Power On Hours on NVME device not reported #10907
Comments
Hi, Is the actual behavior output directly from smartctl and is that where you noticed the extra space? If not, can you provide the output smartctl against your 970 EVO? In linux I would run something like: smartctl /dev/nvme0n1 -a I do have two NVMe with 1k+ hours, which report, but as you noticed, they use a comma and in the code we handle this, but not the space:
I do happen to have a 970 EVO, but it has not passed the 1000 hours mark yet :( |
Yup that's how it's reported, here's the smartctl output:
|
Thanks for that output. I'll look at putting something together for this and can re-use this output in a test case. |
I built a test case using your output and was successfully able to parse the fields sucessfully. It looks like Telegraf uses this regex to parse these fields: By chance, do you have the |
I don't have nvme-cli installed, so it must be the smartctl output it uses. The smartctl output format for the 980 PRO is identical, I thought it's maybe the blank character messing things up. The 980 PRO is brand new so less than 1000 hours still. |
It seems that output format from Here is my output for
And here is my output for
Fun fact, json output format doesn't seem to be region-specific, because numbers are treated as numbers without any separators:
|
@zak-pawel thanks for taking a look at this. Since you also show values space-separated, could you try reproducing with Telegraf under with Windows + Polish regional settings? It isn't clear to me if this is a parsing issue or something else yet. |
@powersj Sure, here is my
And here is output from Telegraf:
|
Thanks @zak-pawel and with English you get the field? or is it also missing? |
Lo and behold, switched to English UK region and:
|
@powersj @coccobill1
All of them have |
Fantastic, thanks for this. I clearly see an issue with |
@powersj Remember that not only Look at locale for Liechtenstein:
Maybe there are some locales with different thousands separator. |
The smartctl output can vary based on the localization set in Windows. This means that some numbers can show up comma-seperated (english), space seperated, or even apostrophe seperated. There are probably others. This updates one function that was always assuming comma seperated to remove any non-numeric value and no longer split on white space, which could be used as a seperator. Fixes: influxdata#10907
I have put up #10923 which should fix some of the fields that were not correctly parsing. There is also a debug line added to print the fields that it finds and what it parsed them into. Could one of you grab a PR artifact, run it on a non-english locale, and provide the output? Thanks! |
@powersj Here is output with Polish locale enabled:
|
Italian (Switzerland):
|
perfect, that looks like it fixes some of the fields
This explains why these fields are not showing up. I will look at this next. |
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf 1.22.0, smartctl 7.3, Windows 10 (19044,1620)
Docker
No response
Steps to reproduce
Expected behavior
Telegraf reports the Power On Hours smart_attribute correctly on all NVME drives.
Actual behavior
My Samsung 980 PRO:
Power On Hours: 496
My Samsung 970 EVO:
Power On Hours: 22 371
The 980 value is reported correctly, for the 970 the whole attribute is missing. Looks like smartctl adds an extra blank as the thousands separator in the reported value, which might be causing issues?
Additional info
No response
The text was updated successfully, but these errors were encountered: