Skip to content

Smart plugin no data, incorrect tag #3540

@ihard

Description

@ihard

telegraf.conf:

[global_tags]
  app = "telegraf"
  send_interval = "ten_second"
[agent]
  interval = "10s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""
  debug = false
  quiet = false
  logfile = "/var/log/telegraf/telegraf.log"
  hostname = ""
  omit_hostname = false

[[inputs.smart]]
  interval = '1m'
  path = "/usr/sbin/smartctl"
  use_sudo = true
  attributes = true
  [inputs.smart.tags]
    send_interval = ""

[[outputs.file]]
  files = ["/tmp/metrics.out"]
  data_format = "influx"

System info:

Ubuntu 16.04.3
Telegraf v1.5.0~rc1 (git: release-1.5 ca8911f)

Problem

  1. No attribute metric with attributes = true
    run command smartctl with plugin
/usr/sbin/smartctl --info --health --attributes --tolerance=verypermissive -n standby --format=brief /dev/sdc -d scsi
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-40-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

User Capacity:        3,840,755,982,336 bytes [3.84 TB]
Logical block size:   512 bytes
Physical block size:  4096 bytes
LU is resource provisioned, LBPRZ=1
Rotation Rate:        Solid State Device
Form Factor:          2.5 inches
Logical Unit id:      0x300143803896f322
Serial number:        XXX
Device type:          disk
Transport protocol:   SAS (SPL-3)
Local Time is:        Tue Dec  5 13:55:38 2017 MSK
SMART support is:     Available - device has SMART capability.
SMART support is:     Enabled
Temperature Warning:  Disabled or Not Supported

=== START OF READ SMART DATA SECTION ===
SMART Health Status: OK
Current Drive Temperature:     21 C

with out -d scsi

/usr/sbin/smartctl --info --health --attributes --tolerance=verypermissive -n standby --format=brief /dev/sdc
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.10.0-40-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     INTEL SSDSC2KB038T7
Serial Number:    XXX
LU WWN Device Id: 5 5cd2e4 14e16852c
Firmware Version: SCV10100
User Capacity:    3,840,755,982,336 bytes [3.84 TB]
Sector Sizes:     512 bytes logical, 4096 bytes 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-3 T13/2161-D revision 5
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Tue Dec  5 13:57:04 2017 MSK
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: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  5 Reallocated_Sector_Ct   -O--CK   100   100   000    -    4
  9 Power_On_Hours          -O--CK   100   100   000    -    334
 12 Power_Cycle_Count       -O--CK   100   100   000    -    7
170 Unknown_Attribute       PO--CK   099   099   010    -    0
171 Unknown_Attribute       -O--CK   100   100   000    -    1
172 Unknown_Attribute       -O--CK   100   100   000    -    0
174 Unknown_Attribute       -O--CK   100   100   000    -    5
175 Program_Fail_Count_Chip PO--CK   100   100   010    -    39201800214
183 Runtime_Bad_Block       -O--CK   100   100   000    -    0
184 End-to-End_Error        PO--CK   100   100   090    -    0
187 Reported_Uncorrect      -O--CK   100   100   000    -    0
190 Airflow_Temperature_Cel -O---K   079   059   000    -    21 (Min/Max 21/42)
192 Power-Off_Retract_Count -O--CK   100   100   000    -    5
194 Temperature_Celsius     -O---K   100   100   000    -    21
197 Current_Pending_Sector  -O--C-   100   100   000    -    0
199 UDMA_CRC_Error_Count    -OSRCK   100   100   000    -    0
225 Unknown_SSD_Attribute   -O--CK   100   100   000    -    242983
226 Unknown_SSD_Attribute   -O--CK   100   100   000    -    40
227 Unknown_SSD_Attribute   -O--CK   100   100   000    -    17
228 Power-off_Retract_Count -O--CK   100   100   000    -    924
232 Available_Reservd_Space PO--CK   099   099   010    -    0
233 Media_Wearout_Indicator -O--CK   100   100   000    -    0
234 Unknown_Attribute       -O--CK   100   100   000    -    0
241 Total_LBAs_Written      -O--CK   100   100   000    -    242983
242 Total_LBAs_Read         -O--CK   100   100   000    -    50431
243 Unknown_Attribute       -O--CK   100   100   000    -    363835
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning
  1. No tag name
    all smart metric from file out - format influx
smart_device,host=ssd1,app=telegraf,device=/dev/sdc,capacity=3840755982336,enabled=Enabled exit_status=0i 1512472270000000000
smart_device,device=/dev/sdd,capacity=3840755982336,enabled=Enabled,host=ssd1,app=telegraf exit_status=0i 1512472270000000000
smart_device,app=telegraf,host=ssd1,device=/dev/sde,capacity=3840755982336,enabled=Enabled exit_status=0i 1512472270000000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions