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

Added support for gosensors plugin #519

Closed
wants to merge 4 commits into from
Closed

Conversation

md14454
Copy link
Contributor

@md14454 md14454 commented Jan 14, 2016

This change addresses #168

The implementation is very basic and intended to be worked upon. I am open to feedback as to the best approach for field names and tags. For now this is a working example.

@sparrc
Copy link
Contributor

sparrc commented Jan 15, 2016

Awesome, thanks for adding this, is there any possibility of a unit test? I know this is a fairly special case, so it's OK if the answer is "no"

@sparrc
Copy link
Contributor

sparrc commented Jan 15, 2016

please also add this to the README.md and CHANGELOG.md files

@sparrc
Copy link
Contributor

sparrc commented Jan 15, 2016

please add // +build linux at the top of this file, and any other OS that is supported

@md14454
Copy link
Contributor Author

md14454 commented Jan 15, 2016

I've edited the README and CHANGELOG. I also changed the build to only Linux.

I'm not sure how I would add a unit test, but I'll certainly look into it.

I'm not sure if it may be worth adding that the sensors command has to be run by root from the cli first. Also, do you have a preference on how the field names should be displayed?

@sparrc sparrc closed this in 963a942 Jan 15, 2016
@lGuillaume124
Copy link

Hi,
I'm using Telegraf on Ubuntu and I just upgraded to 0.10.3 (from the official repo) to use this input, but it doesn't seem to be available. Am I doing something wrong?

$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +37.0°C  (high = +100.0°C, crit = +100.0°C)
Core 0:         +34.0°C  (high = +100.0°C, crit = +100.0°C)
Core 1:         +34.0°C  (high = +100.0°C, crit = +100.0°C)
$ tail -n 3 telegraf.d/inputs_system.conf
# Read metrics about sensors
[[inputs.sensors]]
  sensors = [ "coretemp-isa-0000" ]
$ telegraf -test -config telegraf.conf -config-directory telegraf.d -filter sensors
2016/02/20 15:20:03 Undefined but requested input: sensors

Thanks for your help.

@md14454
Copy link
Contributor Author

md14454 commented Feb 21, 2016

@lGuillaume124
Hi,

Try changing
"coretemp-isa-0000"
to
"coretemp-isa-0000:*"

or, if you would like to just log all sensors then you don't need
sensors = [
at all and you can comment it out, or delete it.

Hope that helps.

@sparrc
Copy link
Contributor

sparrc commented Feb 21, 2016

@lGuillaume124

sensors is currently only available if you're building from source, I'll update the readme to indicate that

@penguinpowernz
Copy link

sensors is currently only available if you're building from source

@sparrc why is this? Is there a guide somewhere on how to enable this when you are building from source?

@sparrc
Copy link
Contributor

sparrc commented Apr 12, 2016

this plugin has extensive libsensors dependencies, and I haven't found a way to compile this plugin into telegraf as an optional dependency.

You could also just use the ipmi_sensor plugin, which also queries libsensors, but as a separate package.

@penguinpowernz
Copy link

So does that mean you just need to make sure you install lm_sensors etc before compiling?

@sparrc
Copy link
Contributor

sparrc commented Apr 12, 2016

you need to do something like -tags sensors

@penguinpowernz
Copy link

thanks :)

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.

None yet

4 participants