Relevant telegraf.conf:
[[inputs.smart]]
use_sudo = true
attributes = true
System info:
root# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
uname -a
Linux plutus 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Telegraf v1.7.4 (git: release-1.7 578db7e)
Steps to reproduce:
A SSD with this smart output:
root# smartctl --info --attributes --health -n standby --format=brief /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-33-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: SanDisk Ultra II 240GB
Serial Number: XXXXXXXX
LU WWN Device Id: XXXXXXXX
Firmware Version: XXXXXXX
User Capacity: 240.057.409.536 bytes [240 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2 T13/2015-D revision 3
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Sep 17 13:22:19 2018 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
Power mode is: ACTIVE or IDLE
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART Attributes Data Structure revision number: 4
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE
5 Reallocated_Sector_Ct -O--CK 100 100 --- - 0
9 Power_On_Hours -O--CK 100 100 --- - 6383
12 Power_Cycle_Count -O--CK 100 100 --- - 19
165 Unknown_Attribute -O--CK 100 100 --- - 59310806
166 Unknown_Attribute -O--CK 100 100 --- - 1
167 Unknown_Attribute -O--CK 100 100 --- - 57
168 Unknown_Attribute -O--CK 100 100 --- - 43
169 Unknown_Attribute -O--CK 100 100 --- - 221
170 Unknown_Attribute -O--CK 100 100 --- - 0
171 Unknown_Attribute -O--CK 100 100 --- - 0
172 Unknown_Attribute -O--CK 100 100 --- - 0
173 Unknown_Attribute -O--CK 100 100 --- - 13
174 Unknown_Attribute -O--CK 100 100 --- - 4
184 End-to-End_Error -O--CK 100 100 --- - 0
187 Reported_Uncorrect -O--CK 100 100 --- - 0
188 Command_Timeout -O--CK 100 100 --- - 0
194 Temperature_Celsius -O---K 066 065 --- - 34 (Min/Max 19/65)
199 UDMA_CRC_Error_Count -O--CK 100 100 --- - 0
230 Unknown_SSD_Attribute -O--CK 100 100 --- - 2229110374919
232 Available_Reservd_Space PO--CK 100 100 004 - 100
233 Media_Wearout_Indicator -O--CK 100 100 --- - 3129
234 Unknown_Attribute -O--CK 100 100 --- - 7444
241 Total_LBAs_Written ----CK 253 253 --- - 4812
242 Total_LBAs_Read ----CK 253 253 --- - 671
244 Unknown_Attribute -O--CK 000 100 --- - 0
||||||_ K auto-keep
|||||__ C event count
||||___ R error rate
|||____ S speed/performance
||_____ O updated online
|______ P prefailure warning
Expected behavior:
I don't get the temp_c value.
root# telegraf -config /etc/telegraf/telegraf.conf -test|grep smart_device
> smart_device,dc=de-home-serverx-1,device=sda,enabled=Enabled,host=serverx,model=SanDisk\ Ultra\ II\ 240GB,serial_no=XXXXXXX,wwn=XXXXXXXX exit_status=0i,health_ok=true 1537184553000000000
Actual behavior:
I think the brackets behind the raw value of 194 cause problems when parsing.
194 Temperature_Celsius -O---K 066 065 --- - 34 (Min/Max 19/65)
On another system I also have the value with brackets but without a "/". But parsing works there.
(OS: FreeNAS)
194 Temperature_Celsius -O---K 044 063 000 - 44 (0 21 0 0 0)
Relevant telegraf.conf:
System info:
Telegraf v1.7.4 (git: release-1.7 578db7e)
Steps to reproduce:
A SSD with this smart output:
Expected behavior:
I don't get the temp_c value.
Actual behavior:
I think the brackets behind the raw value of 194 cause problems when parsing.
On another system I also have the value with brackets but without a "/". But parsing works there.
(OS: FreeNAS)