Commit graph

825 commits

Author SHA1 Message Date
fahlke a89d72b5eb Resolves prometheus/node_exporter#585 (#586)
* Resolves prometheus/node_exporter#585

* - removed 'docker rm' as it is not allowed on CircleCI
See discussion: https://discuss.circleci.com/t/docker-error-removing-intermediate-container/70
2017-07-07 07:26:11 +02:00
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
Alexey Palazhchenko bba075710d Set Go import path on Travis CI (#612) 2017-07-06 14:12:22 +02:00
kadota kyohei a077024f51 add diskstats on Darwin (#593)
* Add diskstats collector for Darwin

* Update year in the header

* Update README.md

* Add github.com/lufia/iostat to vendored packages

* Change stats to follow naming guidelines

* Add a entry of github.com/lufia/iostat into vendor.json

* Remove /proc/diskstats from description
2017-07-06 13:51:24 +02:00
Tobias Schmidt ab3414e6fd Merge pull request #614 from percona/prometheus-master
Log response body if test fails.
2017-07-05 11:45:51 +02:00
Alexey Palazhchenko 4d294889da Log response body if test fails. 2017-07-05 10:51:27 +03:00
Alexey Palazhchenko 190d1347ba Use latest released Go 1.8 (#611) 2017-06-30 18:33:33 +02:00
Tobias Schmidt e27a1a1f0b Merge pull request #609 from rtreffer/fix-cpufreq-data
Fix cpufreq statistics by converting kHz to Hz
2017-06-27 23:51:14 +02:00
Rene Treffer 56bf8d4b2d Add link to kernel documentation for sysfs/cpufreq files 2017-06-27 11:25:06 +02:00
Rene Treffer bcc3cd92b8 Fix cpufreq statistics by converting kHz to Hz 2017-06-27 11:05:55 +02:00
Ben Kochie 182810056f Fix Linux cpu errors (#606)
Make the Linux cpu collector soft-error on missing `cpufreq` and
`thermal_throttle` features.
2017-06-20 07:51:26 +02:00
Rene Treffer be6291adde Add changelog entry for node_cpu metrics move (#603) 2017-06-19 10:28:53 +02:00
Ben Kochie f3a4afc059 Add go path help to build instructions (#601)
Add `go get` and source directory requirements to the build
instructions.
2017-06-15 09:32:45 +02:00
Rene Treffer 2e9f1913b8 Move stat_linux to cpu_linux and add cpufreq stats (#548) 2017-06-13 11:21:53 +02:00
Johannes 'fish' Ziemke 798950d25b Run node-exporter in Docker as nobody (#599) 2017-06-08 20:02:20 +02:00
Johannes 'fish' Ziemke 0451c9c5f6 Make bind-mounts in Docker example read-only (#598) 2017-06-08 18:21:44 +02:00
Tobias Schmidt 30fb33f7a4 Update github.com/prometheus/procfs dependencies 2017-06-08 14:44:11 +02:00
Emanuele Rocca 047003b6bb Add qdisc collector for Linux (#580)
* Add qdisc collector for Linux

This collector gathers basic queueing discipline metrics via netlink,
similarly to what `tc -s qdisc show` does.

* qdisc collector: nl-specific code moved, names fixed

- netlink-specific parts moved to github.com/ema/qdisc
- avoid using shortened names
- counters renamed into XXX_total

* Get rid of parseMessage error checking leftover

* Add github.com/ema/qdisc to vendored packages

* Update help texts and comments

* Add qdisc collector to README file

* qdisc collector end-to-end testing

* Update qdisc dependency to latest version

Update github.com/ema/qdisc dependency to revision 2c7e72d, which
includes unit testing.

* qdisc collector: rename "iface" label into "device"
2017-05-23 11:55:50 +02:00
Jonas Große Sundrup e6d031788f Correct typo (#582) 2017-05-14 19:46:23 +02:00
Robert Clark 58f50b31f2 Multiply port data XMIT/RCV metrics by 4 (#579)
According to Mellanox, it is standard practice that the port_xmit_data and port_rcv_data
files are split into 4 lanes. To get the actual transmit and receive values for each
port, the metric needs to be multiplied by 4.

Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
2017-05-12 07:28:53 +02:00
Tobias Schmidt a14e2c0229 Merge pull request #576 from filippog/ipvs_v6
Update github.com/prometheus/procfs dependency
2017-05-04 17:04:52 +02:00
Filippo Giunchedi 2e9758564e Update github.com/prometheus/procfs dependency
Fix IPVS ipv6 parsing, see also prometheus/procfs#40
2017-05-04 16:40:25 +02:00
Tobias Schmidt d31c29490e Update github.com/prometheus/procfs dependency (#572) 2017-04-25 10:24:59 +02:00
Ben Kochie 8f3cddf734 Merge pull request #568 from mdlayher/xfs-init
Initial XFS collector
2017-04-25 09:54:28 +02:00
Kai S 59f9b8c5c1 Handle nonexisting bonding_masters file (#569)
* silently ignore nonexisting bonding_masters file

Add an empty fixtures dir without a bonding_masters file to test.

* Moved the check to the Update() method

Dropped the empty test dir.
2017-04-24 23:19:17 +04:00
Matt Layher 1feb091b36
Initial XFS collector 2017-04-22 11:53:07 -04:00
Ben Kochie e9aad0157c Merge pull request #550 from derekmarcotte/dm-boottime
Add exec_boot_time for freebsd, dragonfly
2017-04-22 09:18:05 +02:00
Derek Marcotte 5b557bf973 Fix metric name per review. 2017-04-21 16:25:31 -04:00
Derek Marcotte db8ec9c6b4 Add exec_boot_time for freebsd, dragonfly
Adds new sysctl type, bsdSysctlTypeStructTimeval to enable parsing of
timevals from raw memory.
2017-04-21 10:23:19 -04:00
Tobias Schmidt e7ea5c1867 Merge pull request #565 from daenney/mips32
uname_linux: Build for 32bit MIPS too
2017-04-20 16:08:46 +04:00
Daniele Sluijters bb9d4ade0b uname_linux: Build for 32bit MIPS too
Since Go 1.8 32bit MIPS Big/Little Endian are supported assuming the
target runs Linux and the kernel either emulates an FPU or can access
the CPU one.

This allows the node_collector to build for mips and mipsle opening up
the possibility of running it on things like home routers
(DD-|Open|ASUS-)Wrt firmware usually has the necessary bits in place.
2017-04-20 13:30:40 +02:00
Brian Brazil f291d2d6dd Get full resolution for node_time (#555) 2017-04-19 18:31:21 +01:00
Tobias Florek 2a38b57a2a Mention copr yum repository, add systemd unit (#529)
* add systemd unit as example

* mention community yum repo

fixes #498

* rename textfile collector dir
2017-04-19 18:54:15 +02:00
Ben Kochie 536b989aea Merge pull request #564 from knweiss/edac_typo
edac: Fix typo in node_edac_csrow_uncorrectable_errors_total
2017-04-18 13:41:08 +02:00
Karsten Weiss d9703ff7c6 edac: Fix typo in csrow label of node_edac_csrow_uncorrectable_errors_total metric. 2017-04-18 12:45:06 +02:00
Tobias Schmidt 266f0958d2 Merge pull request #561 from derekmarcotte/dm-fix-dfly-build
Fixes broken build on Dragonfly.
2017-04-17 17:31:12 +02:00
Derek Marcotte 83cecfa696 Fixes broken build on Dragonfly.
Undefined err:

84eaa8fecd/collector/devstat_dragonfly.go (L145)
2017-04-17 10:50:49 -04:00
Tobias Schmidt 2e7ac47fee Merge pull request #554 from knweiss/guest_nice
cpu collector: guest_nice
2017-04-15 17:48:58 +02:00
Tobias Schmidt 65768ceac8 Create sha256 checksums file during release 2017-04-15 12:31:19 -03:00
Karsten Weiss 45ca8db352 Support the 'guest_nice' cpu mode of /proc/stat.
'guest_nice' is available since Linux 2.6.33.
2017-04-14 12:50:37 +02:00
Ben Kochie 636c88adf7 Merge pull request #435 from gianrubio/test-image
Test docker image before pushing
2017-04-12 11:03:35 +02:00
Giancarlo Rubio 1438243934 test docker image before pushing 2017-04-12 10:47:21 +02:00
Sam Kottler 6eafa51fa8 Add ARP collector for Linux (#540)
* Implement commonalities and linux support for ARP collection

* Add ARP collector to fixtures and run as part of e2e tests

* Bubble up scanner errors

* Use single return values where it makes sense

* Add missing annotation

* Move arp_common into arp_linux

* Add license header to arp_linux.go

* Address initial feedback

* Use strings.Fields instead of strings.Split

* Deal with scanner.Err() rather than throwing away errors

* Check for scan errors in-line before interacting with the entries map

* Don't interact with potentially empty text from scan

* Check for scan errors outside the scan loop

* Add comment about moving procfs parsing

* Add more direct comment

* Update initialism style to match go style guide

* Put function args on the same line

* Add TODO in front of comment about procfs extraction

* Guard against strings.Fields returning an empty slice

* Be more defensive about ARP table format and use upcase more broadly

* Enable the ARP collector by default

* Add ARP collector to the README

* Remove 'entry'
2017-04-11 17:45:19 +02:00
Tobias Schmidt 84b65edb04 Merge pull request #546 from wtip/master
updated smartmon.sh example to include metric for overall health status
2017-04-11 17:44:30 +02:00
Tobias Schmidt 919aab2e80 Merge pull request #549 from prometheus/grobie/remove-windows
Remove Windows support
2017-04-11 17:43:28 +02:00
Tobias Schmidt 67d01ca397 Merge pull request #552 from prometheus/grobie/use-go1.8
Use go1.8 in CircleCI tests
2017-04-11 17:42:59 +02:00
Tobias Schmidt 09727a6191 Merge pull request #551 from prometheus/grobie/remove-netbsd-arm-support
Remove netbsd/arm support for now
2017-04-11 17:42:29 +02:00
Tobias Schmidt 2965ba6bf9 Use go1.8 in CircleCI tests
We already use go1.8 in promu, so loading another image slows down the
build.
2017-04-11 12:17:51 -03:00
Tobias Schmidt 8edc142113 Remove netbsd/arm support for now
There are crossbuild errors on netbsd/arm with go1.8. Assuming there is
only a small minority of people running netbsd on ARM processors,
disabling these builds is the fastest workaround.
2017-04-11 11:46:43 -03:00
Tobias Schmidt 8aec44617a Remove Windows support
Use https://github.com/martinlindhe/wmi_exporter instead.
2017-04-10 23:27:23 -03:00