Add sys/class/net parsing from procfs and expose its metrics (#851)

* add sys/class/net parsing from procfs and expose its metrics

Signed-off-by: Jan Klat <jenik@klatys.cz>

* change code to use int pointers per procfs change, move netclass to separate collector, change metric naming

Signed-off-by: Jan Klat <jenik@klatys.cz>

* bump year in licence, remove redundant newline, correct fixtures

Signed-off-by: Jan Klat <jenik@klatys.cz>

* fix style

Signed-off-by: Jan Klat <jenik@klatys.cz>

* change carrier changes to counter type

Signed-off-by: Jan Klat <jenik@klatys.cz>

* fix e2e output

Signed-off-by: Jan Klat <jenik@klatys.cz>

* add fixtures

Signed-off-by: Jan Klat <jenik@klatys.cz>

* update vendor, use fixtures correctly

Signed-off-by: Jan Klat <jenik@klatys.cz>

* change fixtures (device in /sys/class/net should be symlinked)

Signed-off-by: Jan Klat <jenik@klatys.cz>

* correct fixtures for 64k page, updated readme

Signed-off-by: Jan Klat <jenik@klatys.cz>
This commit is contained in:
Jan Klat 2018-07-16 15:08:18 +02:00 committed by Johannes 'fish' Ziemke
commit c4102f1175
9 changed files with 849 additions and 36 deletions

6
vendor/vendor.json vendored
View file

@ -163,10 +163,10 @@
"revisionTime": "2018-03-26T16:04:09Z"
},
{
"checksumSHA1": "Etvt6mgzvD7ARf4Ux03LHfgSlzU=",
"checksumSHA1": "qG0ClCTt2wuQnYLsFvtlQB8J5FQ=",
"path": "github.com/prometheus/procfs",
"revision": "780932d4fbbe0e69b84c34c20f5c8d0981e109ea",
"revisionTime": "2018-03-21T23:08:12Z"
"revision": "add1f1c0b8971a8cdb88ab8bb152878e5074780b",
"revisionTime": "2018-05-31T12:13:16Z"
},
{
"checksumSHA1": "O64FotgWPYIpl3m2gvTEPIem+xg=",