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

potential smart documentation issue #11967

Closed
SimonMcN opened this issue Oct 8, 2022 · 3 comments
Closed

potential smart documentation issue #11967

SimonMcN opened this issue Oct 8, 2022 · 3 comments
Labels
bug unexpected problem or unintended behavior waiting for response waiting for response from contributor

Comments

@SimonMcN
Copy link

SimonMcN commented Oct 8, 2022

Relevant telegraf.conf

[[inputs.smart]]
      use_sudo = true

Logs from Telegraf

2022-10-08T14:15:20+01:00 E! [inputs.smart] Error in plugin: failed to run command '/usr/sbin/smartctl [--scan]': exit status 1 - sudo: a password is required
2022-10-08T14:15:30+01:00 E! [inputs.smart] Error in plugin: failed to run command '/usr/sbin/smartctl [--scan]': exit status 1 - sudo: a password is required
2022-10-08T14:15:40+01:00 E! [inputs.smart] Error in plugin: failed to run command '/usr/sbin/smartctl [--scan]': exit status 1 - sudo: a password is required
2022-10-08T14:15:50+01:00 E! [inputs.smart] Error in plugin: failed to run command '/usr/sbin/smartctl [--scan]': exit status 1 - sudo: a password is required
2022-10-08T14:16:00+01:00 E! [inputs.smart] Error in plugin: failed to run command '/usr/sbin/smartctl [--scan]': exit status 1 - sudo: a password is required
2022-10-08T14:16:10+01:00 E! [inputs.smart] Error in plugin: failed to run command '/usr/sbin/smartctl [--scan]': exit status 1 - sudo: a password is required
2

System info

Telegraf 1.24.1 (git: HEAD@bd7d53fb), debian Linux 5.15.53-1-pve #1 SMP PVE 5.15.53-1 (Fri, 26 Aug 2022 16:53:52 +0200) x86_64 GNU/Linux

Docker

No response

Steps to reproduce

  1. follow documentation
  2. doesn't work

Expected behavior

  1. follow instructions
  2. does work

Actual behavior

I found that the suggestion of
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/smart/README.md

did not work as it told me to use:
Cmnd_Alias SMARTCTL = /usr/bin/smartctl
when mine is located in
Cmnd_Alias SMARTCTL = /usr/sbin/smartctl

Please can you update the documentation to determine where the smartctl is located on the system.
Cheers

Additional info

No response

@SimonMcN SimonMcN added the bug unexpected problem or unintended behavior label Oct 8, 2022
@zak-pawel
Copy link
Collaborator

@SimonMcN Am I understand you correctly, that after you changed Cmnd_Alias SMARTCTL = /usr/bin/smartctl to Cmnd_Alias SMARTCTL = /usr/sbin/smartctl your problem disappeared?

@powersj
Copy link
Contributor

powersj commented Oct 11, 2022

@SimonMcN

Please can you update the documentation to determine where the smartctl is located on the system.

Would a short message like the following have helped:

In order to find the location of the binary, consider using the `which smartctl` or `locate smartctl`

@powersj powersj added the waiting for response waiting for response from contributor label Oct 11, 2022
@telegraf-tiger
Copy link
Contributor

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Page. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior waiting for response waiting for response from contributor
Projects
None yet
Development

No branches or pull requests

2 participants