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

'sensors' input unavailable for telegraf-0.10.2-1.x86_64 RPM #649

Closed
dvusboy opened this issue Feb 5, 2016 · 15 comments
Closed

'sensors' input unavailable for telegraf-0.10.2-1.x86_64 RPM #649

dvusboy opened this issue Feb 5, 2016 · 15 comments

Comments

@dvusboy
Copy link

dvusboy commented Feb 5, 2016

It appears the telegraf executable in the official RPM, specifically, telegraf-0.10.2-1.x86_64.rpm, does not support the sensors input:

# telegraf -usage sensors
2016/02/04 17:10:53 Input sensors not found and Output sensors not found
@dvusboy
Copy link
Author

dvusboy commented Feb 5, 2016

It looks like there is no provision in the Makefile or build.py to set the build-tag sensors when the libsensors library and header are available.

@sparrc
Copy link
Contributor

sparrc commented Feb 5, 2016

Yes, this is true, setting that build flag slipped my mind. I'll make sure this is fixed for the next release.

@dvusboy
Copy link
Author

dvusboy commented Feb 5, 2016

@sparrc, thank you. On a slightly related note, it'd be nice to unify the Makefile with build.py so there's no chance they'd diverge, especially on the specifics of the build.

@sparrc
Copy link
Contributor

sparrc commented Feb 19, 2016

@dvusboy this is actually going to be more difficult than I realized. As far as I can tell we would need to build directly on 32-bit and ARM to support those platforms (and we would have to statically link in the C libraries in all cases). I think for the time being I'm going to have to say that the sensors plugin is only available for those building from source.

@dvusboy
Copy link
Author

dvusboy commented Feb 19, 2016

This is the patch I ended up using to make it work for x86_64. I definitely haven't explored other platforms.

@sparrc
Copy link
Contributor

sparrc commented Feb 19, 2016

That is what I tried as well, but I found that the resulting build won't work on a box that doesn't have lm-sensors & libsensors4-dev installed, which makes me think that statically linking the C library would be best.

But I believe this would also require statically building on a 64-bit, 32-bit, and ARM VM.

@leucos
Copy link

leucos commented May 24, 2016

It seems that sensors input is still not present in 0.13 ?

# telegraf --version
Telegraf - version 0.13.0
# telegraf -usage sensors
2016/05/24 12:08:49 Input sensors not found and Output sensors not found
# apt-cache show telegraf
Package: telegraf
Version: 0.13.0-1
License: MIT
Vendor: InfluxData
Architecture: amd64
Maintainer: [email protected]
Installed-Size: 32711
Homepage: https://github.com/influxdata/telegraf
Priority: extra
Section: default
Filename: pool/stable/t/telegraf/telegraf_0.13.0-1_amd64.deb
Size: 8996262
SHA256: 66ad4562846475694b59bb28631ab42e5349f0aca726508068294d642d935479
SHA1: 9497412af716dcf43ed83132423d21be5ccd4821
MD5sum: f5d7979a1918242a1677add1d94f0d68
Description: Plugin-driven server agent for reporting metrics into InfluxDB.
Description-md5: d2895f6fb51f407b1ee4231b2cf7a956

@sparrc
Copy link
Contributor

sparrc commented May 24, 2016

I think for the time being I'm going to have to say that the sensors plugin is only available for those building from source.

@dvusboy
Copy link
Author

dvusboy commented Jun 8, 2016

I do have one more comment on this issue: Is there a reason why github.com/md14454/gosensors is not in the Godeps file? Building from source breaks because that dependency is not pulled by gdm.

@sparrc
Copy link
Contributor

sparrc commented Jun 21, 2016

@dvusboy because gdm save would need the sensors flag turned on in order to see that dependency. This is not hard to workaround, just run go get ./... after gdm restore

@zbindenren
Copy link
Contributor

Another solution would be to invoke the sensors command from the lm_sensors package.

@sparrc
Copy link
Contributor

sparrc commented Jun 21, 2016

correct, I think that is a much simpler solution. Requires forking a process off but it might be worth it. Telegraf isn't a C project and it needs to be able to be cross-compiled, so I doubt there will ever be a pre-built solution for the sensors plugin in it's current form.

@zbindenren
Copy link
Contributor

if you want I can write a plugin with exec...

@sparrc
Copy link
Contributor

sparrc commented Jun 21, 2016

that would be great, but I would prefer if you just modify the existing sensors plugin

@dvusboy
Copy link
Author

dvusboy commented Aug 9, 2016

Thanks. I'm not a big fan of having to fork a process to do this, as in the IPMI plugin. But it is what it is to avoid a build-time dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants