Commit graph

10 commits

Author SHA1 Message Date
Tobias Schmidt 84eaa8fecd Remove more unnecessarily named return values 2017-02-28 17:33:46 -04:00
Tobias Schmidt 1bd94074dd Delete unused code 2017-02-28 17:20:16 -04:00
Tobias Schmidt 922e74d58f Remove unnecessarily named return variables
Named return variables should only be used to describe the returned type
further, e.g. `err error` doesn't add any new information and is just
stutter.
2017-02-28 16:04:25 -04:00
Tobias Schmidt c703435790 Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
Matt Layher dfd661a633
Allow graceful failure in hwmon collector 2017-01-17 11:24:28 -05:00
Johannes 'fish' Ziemke 6aef20f8d8 Use filename as label, move 'label' to own metric
This closes #406
2017-01-09 18:33:31 +01:00
Johannes 'fish' Ziemke 26c6182c84 Move comment and remove superfluous newline 2017-01-03 14:41:05 +01:00
Jonas Wielicki c481dd19da Re-introduce human-readable chip types
The chip label generation has been changed in #334 to prefer the
unique device path (e.g. the location on the PCI bus) due to #333.

Here, a new annotation metric ``node_hwmon_chip_names`` is
introduced which allows to link the unique chip sysfs path to a
human-readable chip name which may not be unique among chip sysfs
paths (for example, dual-slot systems have multiple
chipType="coretemp" sensors).

This allows to mitigate the downsides of the solution to #333
(namely that the device path may not be stable across kernels and
reboots) for cases where it does not matter that multiple devices
may have the same human-readable name (e.g. aggregation or where
at most one device with a common chip name is present).

For cases where no human-readable name can be derived, the
annotation metric is not emitted.
2016-12-01 09:59:52 +01:00
Rene Treffer abe8e297a6 Prefer device path based names over exported names (#334)
* Prefer device path based names over exported names

For some sensors (like coretemp) it is possible that multiple
instances exist, thus base the name on the device path and not on
the exported name.

* Update end-to-end test for dual socket machines

Explicitly have 2 coretemp instances with a symlink for the device
such that the hwmon collector must pick that name (or fail)
2016-10-28 20:25:44 +01:00
Rene Treffer 081ecc5db0 Add hwmon /sensors support (#278)
* Add hwmon support (mainly known from lm-sensors)

This commit adds initial support for linux hardware sensors, exported
through sysfs.

Details of the interface can be found at
https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface

* Add end-to-end test with some real life data

* Cleanup comments on hwmon collector

* Drop raw sensor name from hwmon output

* Let the sensor label be "sensor"

* Add hwmon short description to README.
2016-10-06 16:33:24 +01:00