Commit Graph

8 Commits

Author SHA1 Message Date
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 195b4d596c Merge pull request #480 from prometheus/grobie/gosimple
Simplify go code
2017-02-28 13:59:01 -04:00
Tobias Schmidt 694294baf5 Remove unnecessary conversions 2017-02-28 13:57:49 -04:00
Tobias Schmidt 21e13c7f52 Simplify code 2017-02-28 13:54:27 -04:00
Tobias Schmidt c703435790 Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
Ben Kochie c6162312f2 Add Linux NUMA "numastat" metrics (#249)
* Add Linux NUMA "numastat" metrics
  Read the `numastat` metrics from /sys/devices/system/node/node* when reading NUMA meminfo metrics.
* Update end-to-end test output.
* Add `numastat` metrics as counters.
* Add tests for error conditions.
* Refactor meminfo numa metrics struct
* Refactor meminfoKey into a simple struct of metric data.
  This makes it easier to pass slices of metrics around.
* Refactor tests.
* Fixup: Add suggested fixes.
* Fixup:  More fixes
* Add another scanner.Err() return
* Add "_total" to counter metrics.
2016-10-12 13:07:49 +02:00
Pavel Borzenkov 5a085dcaf5 meminfo_numa: fix crash on CentOS 6 kernel
It turns out, on some kernels (notably - CentOS6) there is an empty line
inserted at the beginning of /sys/devices/system/node/node*/meminfo
files.  The leads to node_exporter crash on such kernels.

Fix this by checking for empty string first.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2016-02-06 16:11:49 +03:00
Pavel Borzenkov c12d8ea927 Add new per NUMA node memory statistics collector
It is sometimes useful to understand the distribution of free/occupied
memory between NUMA nodes to deal with performance problems. To do so,
add new meminfo_numa collector that enables exporting of per node
statistics along with unit and end-to-end tests for it.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2016-01-15 15:04:27 +03:00