aboutsummaryrefslogtreecommitdiff
path: root/collector/drbd_linux.go
Commit message (Collapse)AuthorAge
* Use Go 1.13 error featuresBen Kochie2020-06-16
| | | | | | | * Use `errors.Is()` for unwrapping errors. * Use `%w` error verb in internal error formatting. Signed-off-by: Ben Kochie <superq@gmail.com>
* Fix collectors' build tagsJeffrey Stoke2020-06-12
| | | | Signed-off-by: Jeffrey Stoke <me@arhat.dev>
* Don't count empty collection as success (#1613)Ben Kochie2020-02-19
| | | | | | | | | | | | | | Many collectors depend on underlying features to be enabled. This causes confusion about what "success" means. This changes the behavior of the `node_scrape_collector_success` metric. * When a collector is unable to find data don't return success. * Catch the no data error and send to Debug log level to avoid log spam. * Update collectors to support this new functionality. * Fix copy-pasta mistake in infiband debug message. Closes: https://github.com/prometheus/node_exporter/issues/1323 Signed-off-by: Ben Kochie <superq@gmail.com>
* switch to go-kit/log (#1575)Ben Ye2019-12-31
| | | Signed-off-by: yeya24 <yb532204897@gmail.com>
* collector: clean up DRBD collector, less global stateMatt Layher2019-10-04
| | | | Signed-off-by: Matt Layher <mdlayher@gmail.com>
* Replace --collectors.enabled with per-collector flags (#640)Calle Pettersson2017-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move NodeCollector into package collector * Refactor collector enabling * Update README with new collector enabled flags * Fix out-of-date inline flag reference syntax * Use new flags in end-to-end tests * Add flag to disable all default collectors * Track if a flag has been set explicitly * Add --collectors.disable-defaults to README * Revert disable-defaults flag * Shorten flags * Fixup timex collector registration * Fix end-to-end tests * Change procfs and sysfs path flags * Fix review comments
* Remove unnecessarily named return variablesTobias Schmidt2017-02-28
| | | | | | 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.
* Reduce the severity of these messages.Ed Schouten2016-12-23
| | | | | | | They get printed all the time, as there are some tokens in the /proc file that we simply don't support. It's better to keep these as debugging messages, which may come in useful if new tags start to appear.
* Improve the help strings, as proposed in the code review.Ed Schouten2016-12-23
|
* Process feedback from the code review.Ed Schouten2016-12-22
| | | | | | | - Use the right number of printf() arguments. Use %q where it makes sense. - Use "DRBD" instead of "Drbd", per Go's style guide. - Add _total suffixes to counter metrics. - Mention the unit (bytes) in documentation strings once more.
* Use a descriptive name for the file descriptor.Ed Schouten2016-12-16
|
* Properly propagate parse errors.Ed Schouten2016-12-16
|
* Add a collector for DRBD.Ed Schouten2016-12-11
This collector exposes most of the useful information that can be found in /proc/drbd. Sizes are normalised to be in bytes, as /proc/drbd uses kibibytes.