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

Implement support for fetching hddtemp data #1411

Merged
merged 1 commit into from
Jul 21, 2016

Conversation

mendelgusmao
Copy link
Contributor

Here's a basic implementation for getting temperature data from disks using hddtemp

@@ -0,0 +1,101 @@
// +build linux,hddtemp
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

amend + push -f

@mendelgusmao mendelgusmao force-pushed the hddtemp-plugin branch 4 times, most recently from a6445d3 to 60fc15a Compare June 24, 2016 20:02
@sparrc
Copy link
Contributor

sparrc commented Jun 25, 2016

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.

@mendelgusmao mendelgusmao force-pushed the hddtemp-plugin branch 3 times, most recently from 8e8c194 to c33a149 Compare June 27, 2016 20:00
@mendelgusmao
Copy link
Contributor Author

Fine, @sparrc ! Just pushed a modified commit according to your suggestions.

@sparrc
Copy link
Contributor

sparrc commented Jul 18, 2016

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 hddtemp command and parsing the output suffice?

@mendelgusmao
Copy link
Contributor Author

mendelgusmao commented Jul 18, 2016

Yes. It's the common approach because hddtemp requires root access for gathering the data from the disks.

@sparrc
Copy link
Contributor

sparrc commented Jul 19, 2016

this looks good, but you'll need to write a README: https://github.com/influxdata/telegraf/blob/master/CONTRIBUTING.md#steps-for-contributing

@mendelgusmao
Copy link
Contributor Author

OK. I'll provide one.

@mendelgusmao
Copy link
Contributor Author

Done!

@sparrc
Copy link
Contributor

sparrc commented Jul 19, 2016

please rebase as well! 🙏

@mendelgusmao
Copy link
Contributor Author

Done too.

@sparrc
Copy link
Contributor

sparrc commented Jul 21, 2016

thanks @mendelgusmao

@sparrc sparrc merged commit 29ea433 into influxdata:master Jul 21, 2016
bitmori pushed a commit to bitmori/telegraf that referenced this pull request Jul 23, 2016
@mendelgusmao mendelgusmao deleted the hddtemp-plugin branch September 12, 2016 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants