Commit Graph

14 Commits

Author SHA1 Message Date
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