Node_Exporter/collector/fixtures
ideaship 8d90276283 Add bcache collector (#597)
* Add bcache collector for Linux

This collector gathers metrics related to the Linux block cache
(bcache) from sysfs.

* Removed commented out code

* Use project comment style

* Add _sectors to metric name to indicate unit

* Really use project comment style

* Rename bcache.go to bcache_linux.go

* Keep collector namespace clean

Rename:
- metric -> bcacheMetric
- periodStatsToMetrics -> bcachePeriodStatsToMetric

* Shorten slice initialization

* Change label names to backing_device, cache_device

* Remove five minute metrics (keep only total)

* Include units in additional metric names

* Enable bcache collector by default

* Provide metrics in seconds, not nanoseconds

* remove metrics with label "all"

* Add fixtures, update end-to-end for bcache collector

* Move fixtures/sys into tar.gz

This changeset moves the collector/fixtures/sys directory into
collector/fixtures/sys.tar.gz and tweaks the Makefile to unpack the
tarball before tests are run.

The reason for this change is that Windows does not allow colons in a
path (colons are present in some of the bcache fixture files), nor can
it (out of the box) deal with pathnames longer than 260 characters
(which we would be increasingly likely to hit if we tried to replace
colons with longer codes that are guaranteed not the turn up in regular
file names).

* Add ttar: plain text archive, replacement for tar

This changeset adds ttar, a plain text replacement for tar, and uses it
for the sysfs fixture archive. The syntax is loosely based on tar(1).

Using a plain text archive makes it possible to review changes without
downloading and extracting the archive. Also, when working on the repo,
git diff and git log become useful again, allowing a committer to verify
and track changes over time.

The code is written in bash, because bash is available out of the box on
all major flavors of Linux and on macOS. The feature set used is
restricted to bash version 3.2 because that is what Apple is still
shipping.

The programm also works on Windows if bash is installed. Obviously, it
does not solve the Windows limitations (path length limited to 260
characters, no symbolic links) that prompted the move to an archive
format in the first place.
2017-07-07 07:20:18 +02:00
..
proc Add ARP collector for Linux (#540) 2017-04-11 17:45:19 +02:00
qdisc Add qdisc collector for Linux (#580) 2017-05-23 11:55:50 +02:00
textfile Fix mtime reporting in textfile collector, add tests. 2015-09-04 15:42:44 +02:00
wifi Expand wifi collector for more interface types 2017-03-20 12:25:01 -04:00
e2e-output.txt Add bcache collector (#597) 2017-07-07 07:20:18 +02:00
ip_vs_result.txt Rearrange fixtures to match "real" proc and sys. 2015-09-28 13:56:22 +00:00
megacli Add an end-to-end test. 2015-09-28 13:56:22 +00:00
megacli_adapter.txt
megacli_disks.txt megacli: prevent crash when drive temperature is N/A 2015-07-29 08:34:02 +02:00
sys.ttar Add bcache collector (#597) 2017-07-07 07:20:18 +02:00