-
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
Implement support for fetching hddtemp data #1411
Conversation
a2efcd3
to
ed05dc9
Compare
@@ -0,0 +1,101 @@ | |||
// +build linux,hddtemp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you add an hddtemp
build tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I'll update asap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
amend + push -f
a6445d3
to
60fc15a
Compare
Looks good, but I noticed that go-hddtemp: https://github.com/MendelGusmao/go-hddtemp/blob/master/hddtemp.go is only ~60 lines of code. Could you just copy hddtemp.go (and hddtemp_test.go) in-repo? You can add them with the license file in a directory, or put the license at the top of the file in a comment. |
8e8c194
to
c33a149
Compare
Fine, @sparrc ! Just pushed a modified commit according to your suggestions. |
Thanks @mendelgusmao. Am I correct in assuming that this requires that hddtemp is running as a daemon on the target system? Is this a common approach or would simply forking the |
Yes. It's the common approach because hddtemp requires root access for gathering the data from the disks. |
this looks good, but you'll need to write a README: https://github.com/influxdata/telegraf/blob/master/CONTRIBUTING.md#steps-for-contributing |
OK. I'll provide one. |
c33a149
to
a9f5906
Compare
Done! |
please rebase as well! 🙏 |
a9f5906
to
3289073
Compare
Done too. |
thanks @mendelgusmao |
Here's a basic implementation for getting temperature data from disks using hddtemp