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

Multiple SMART input configs only output data from the last instance #6309

Closed
mattster98 opened this issue Aug 23, 2019 · 1 comment
Closed
Assignees
Labels
area/smart bug unexpected problem or unintended behavior
Milestone

Comments

@mattster98
Copy link

Relevant telegraf.conf:

[[inputs.smart]]
  path = "/usr/sbin/smartctl"
  use_sudo = true
  attributes = false
  devices = [ "/dev/sda" ]

[[inputs.smart]]
  path = "/usr/sbin/smartctl"
  use_sudo = true
  attributes = false
  devices = [ "/dev/sdb" ]
  [inputs.smart.tags]
    disk = "0"

[[inputs.smart]]
  path = "/usr/sbin/smartctl"
  use_sudo = true
  attributes = false
  devices = [ "/dev/sdc" ]
  [inputs.smart.tags]
    disk = "1"

System info:

Telegraf v1.7.2 (git: release-1.7 c6feb05)
also reproduced on Telegraf 1.11.4 (git: HEAD d9ca76e)
Linux r820 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-58-generic] (local build)

Steps to reproduce:

  1. Create multiple [[inputs.smart]] sections with different configs as needed. My original use case was to add tags for some devices.

Expected behavior:

Each output row for each device would have the proper device details.

Actual behavior:

Each output row contains the same information showing only the LAST device, but does have the tags added in each config. Reordering the config file makes whatever device is LAST in the file display for all three.

Additional info:

(serials replaced with -------)
> smart_device,capacity=10000831348736,device=sdc,enabled=Enabled,host=r710-reborn,model=ST10000NM0016-1TT101,serial_no=--------,wwn=5000c500b26369f2 exit_status=0i,health_ok=true,read_error_rate=94757728i,seek_error_rate=643456985i,temp_c=28i,udma_crc_errors=0i 1566573128000000000
> smart_device,capacity=10000831348736,device=sdc,disk=0,enabled=Enabled,host=r710-reborn,model=ST10000NM0016-1TT101,serial_no=--------,wwn=5000c500b26369f2 exit_status=0i,health_ok=true,read_error_rate=94757728i,seek_error_rate=643456988i,temp_c=28i,udma_crc_errors=0i 1566573128000000000
> smart_device,capacity=10000831348736,device=sdc,disk=1,enabled=Enabled,host=r710-reborn,model=ST10000NM0016-1TT101,serial_no=--------,wwn=5000c500b26369f2 exit_status=0i,health_ok=true,read_error_rate=94757728i,seek_error_rate=643456989i,temp_c=28i,udma_crc_errors=0i 1566573128000000000

@danielnelson danielnelson added area/smart bug unexpected problem or unintended behavior labels Aug 24, 2019
@glinton glinton self-assigned this Aug 26, 2019
@glinton glinton added this to the 1.11.5 milestone Aug 26, 2019
@glinton glinton removed this from the 1.11.5 milestone Aug 26, 2019
@danielnelson danielnelson added this to the 1.11.5 milestone Aug 26, 2019
@danielnelson
Copy link
Contributor

Fixed in #6314

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
Projects
None yet
Development

No branches or pull requests

3 participants