Commit graph

20 commits

Author SHA1 Message Date
Julien Pivotto 68a6c78c0d
Update go to 1.17 (#2159)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-10-03 13:35:24 +02:00
Ben Kochie 3bc9a93c20
Add ErrorLog plumbing to promhttp
Fix the error logging of the promhttp handler by connecting it to the
promlog setup.
* Switch to go-kit/log.
* Cleanup CHANGELOG.

Fixes: https://github.com/prometheus/node_exporter/issues/1886

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-06-03 10:47:41 +02:00
Julian Kornberger 2d412c6ce6 Move ignore/accept to new netDevFilter struct
Signed-off-by: Julian Kornberger <jk+github@digineo.de>
2020-08-26 11:33:05 +02:00
Julian Kornberger 66fb6762bf
Netdev tweaks (#1558)
* Check interface name before loading interface data
* Reduce indentation
* Optimize nested netdev map

This change avoids conversion to strings and back.

Signed-off-by: Julian Kornberger <jk+github@digineo.de>
2020-08-24 17:43:27 +02:00
Ben Ye 2477c5c67d switch to go-kit/log (#1575)
Signed-off-by: yeya24 <yb532204897@gmail.com>
2019-12-31 17:19:37 +01:00
Noam Meltzer 501ccf9fb4 Add --collector.netdev.device-whitelist flag (#1279)
* Add --collector.netdev.device-whitelist flag

Sometimes it is desired to monitor only one netdev. The golang regexp
does not support a negated regex, so the ignored-devices flag is too
cumbersome for this task.
This change introduces a new flag: accept-devices, which is mutually
exclusive to ignored-devices. This flag allows specifying ONLY the
netdev you'd like.

Signed-off-by: Noam Meltzer <noam@cynerio.co>
2019-05-31 17:55:50 +02:00
Ben Kochie b10ca77680
Fix /proc/net/dev/ interface name handling
* Allow any character (UTF-8) for Linux interface names.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-18 12:53:59 +02:00
Ben Kochie a528966dcd Fix parsing of interface aliases in netdev linux
Very old kernels expose interface aliases as `foo0:0`, adjust the line
parsing to handle these names.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-17 13:15:02 +02:00
Ben Kochie 0507b0c9a2
Fix formatting.
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-14 15:02:20 +02:00
Dmitriy Lukyanchikov eddd1b9357 Fix netdev collector for linux (#890)
fix variable name, fix transmitHeader extracting
modify fixtures to run tests with updated netdev_linux collector

Signed-off-by: dmitriy-lukyanchikov <d.lukyanchikov@anchorfree.com>
2018-04-14 13:58:56 +02:00
Tobias Schmidt 694294baf5 Remove unnecessary conversions 2017-02-28 13:57:49 -04:00
Johannes 'fish' Ziemke 6576571ac8 Check for errors in netdev scanner 2017-01-03 14:48:52 +01:00
Brian Brazil 2f0d697f8c Do a make format run. 2015-12-18 14:08:52 +00:00
Nick Owens 3eb2d6625a collector: add openbsd support for netdev 2015-11-06 15:29:57 -08:00
Nick Owens eb79937340 switch to github.com/prometheus/common/log for logging 2015-10-30 13:20:06 -07:00
Matthias Rampke 2d0d72b97d Add license headers to all code files. 2015-09-26 17:44:39 +02:00
Matthias Rampke 20b551ab2b Add flag to change the location of the procfs.
Remove all hardcoded references to `/proc`. For all collectors that do
not use `github.com/prometheus/procfs` yet, provide a wrapper to
generate the full paths.

Reformulate help strings, errors and comments to remove absolute
references to `/proc`.

This is a breaking change: the `-collector.ipvs.procfs` flag is removed
in favor of the general flag. Since it only affected that collector it
was only useful for development, so this should not cause many issues.
2015-09-26 15:32:10 +02:00
Martín Ferrari 0161a36fa5 Fix formatting and variable names. 2015-09-16 17:06:59 +03:00
Martín Ferrari 13672ced48 Revamp the netdev collector to use throw-away ConstMetrics. 2015-09-15 15:31:51 +00:00
Siavash Safi 66e0171159 Rename linux collectors for build constraints. 2015-07-14 13:58:45 +04:30
Renamed from collector/netdev.go (Browse further)