Tobias Schmidt
abdebef47c
Fix gofmt -s and spelling issues
2017-02-28 14:01:28 -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
38cd07ebb9
Merge pull request #450 from roclark/add-infiniband
...
infiniband: Add new collector for InfiniBand statistics
2017-02-16 14:33:19 +01:00
Ben Kochie
a097dd36b3
Merge pull request #459 from joehandzik/wip-zpool-io-cherrypick
...
ZFS Collector: Add zpool IO statistics
2017-02-16 08:16:55 +01:00
Thorhallur Sverrisson
19813d3e02
Changing datastructure for BuddyInfo
2017-02-15 10:15:44 -06:00
Thorhallur Sverrisson
5ab285e098
Adding buddyinfo to end to end test.
2017-02-15 10:15:44 -06:00
Thorhallur Sverrisson
55417d7688
Moving buddyinfo logic to procfs
2017-02-15 10:15:44 -06:00
Thorhallur Sverrisson
492c96f6b6
Moving buddyinfo_test.go to procfs library
2017-02-15 10:15:43 -06:00
Thorhallur Sverrisson
3ba15c1ddb
Adding support for /proc/buddyinfo for linux free memory fragmentation.
...
/prod/buddyinfo returns data on the free blocks fragments available
for use from the kernel. This data is useful when diagnosing
possible memory fragmentation.
More info can be found in:
* https://lwn.net/Articles/7868/
* https://andorian.blogspot.com/2014/03/making-sense-of-procbuddyinfo.html
2017-02-15 10:15:43 -06:00
Joe Handzik
bb8b3fca88
ZFS Collector: Add zpool IO statistics
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-02-10 13:31:25 -06:00
Robert Clark
36f81282b7
Add unit tests for InfiniBand collector
...
Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
2017-02-07 11:09:08 -06:00
Robert Clark
4866adcb71
Add new collector for InfiniBand statistics
...
Add new metrics for the InfiniBand network protocol including the amount of packets sent and received, the number of times the link has been downed and how many times the link has recovered from an error state.
Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
2017-02-07 11:09:08 -06:00
Joe Handzik
8c23f5ff54
ZFS Collector: Convert dashes to underscores for metrics
...
This fixes #442 , and prevents other ZFS metrics from slipping through in the future.
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-31 14:11:56 -06:00
Ben Kochie
7cfa5e75b8
Merge pull request #439 from mdlayher/collector-staticcheck
...
Fix two staticcheck issues in IPVS collector tests
2017-01-31 08:53:10 -05:00
Ben Kochie
71362d45eb
Merge pull request #432 from joehandzik/wip-zfs-zfetchstats
...
Update ZFS Collector with most non-zpool metrics
2017-01-31 08:52:41 -05:00
Joe Handzik
e5ee274a32
ZFS Collector: Move from camelcase to underscores for metric prefixes
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-29 15:59:01 -06:00
Matt Layher
c8e546926a
Fix two staticcheck issues in IPVS collector tests
2017-01-27 15:20:36 -05:00
Joe Handzik
e213ccbc57
ZFS Collector: Refactor to use maps/slices and fewer globals
...
Removed all global types that were unnecessary, and refactored to use constructor-created values and inline values instead of globals.
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-27 14:02:28 -06:00
Ben Kochie
5a6db5c8d2
Handle multiple NFS device mounts
...
It's possible to mount an NFS share in multiple locations.
* Duplicates contain the same metric values, so they can be ignored.
* Update fixture.
2017-01-24 13:44:08 +01:00
Joe Handzik
94fb93a9f3
ZFS Collector: Add dmu_tx functionality
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-23 16:41:15 -06:00
Joe Handzik
07c7ae733a
ZFS Collector: Add fm functionality
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-23 16:31:22 -06:00
Joe Handzik
05048c067d
ZFS Collector: Add xuio_stats functionality
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-23 16:30:37 -06:00
Joe Handzik
3c9e779989
ZFS Collector: Add vdev_cache_stats functionality
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-23 16:29:50 -06:00
Joe Handzik
a02ca9502c
ZFS Collector: Add zil functionality
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-23 16:29:00 -06:00
Joe Handzik
a3125ab4d9
ZFS Collector: Add zfetchstats functionality
...
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-23 16:28:11 -06:00
Ben Kochie
acb495ccab
Merge pull request #425 from mdlayher/wifi-update
...
Update vendored wifi, handle stations with missing info
2017-01-20 08:43:44 -05:00
Matt Layher
dfd661a633
Allow graceful failure in hwmon collector
2017-01-17 11:24:28 -05:00
Matt Layher
ca3f07feef
Update vendored wifi, handle stations with missing info
2017-01-17 00:54:18 -05:00
Ben Kochie
92537020a3
Fix runit collector flag typo.
2017-01-16 23:41:33 +01:00
Julius Volz
276112c7ef
Merge pull request #418 from mdlayher/wifi-graceful-fail
...
Make wifi collector fail gracefully if metrics not available
2017-01-13 20:31:21 -05:00
Matt Layher
d3089f2ce8
Make wifi collector fail gracefully if metrics not available
2017-01-13 13:35:20 -05:00
Matt Layher
1e1775e761
Make ZFS collector fail gracefully when not available
2017-01-12 12:54:16 -05:00
Johannes 'fish' Ziemke
2884181cce
Merge pull request #415 from mdlayher/mountstats-nfs-additional
...
Add NFS event metrics to mountstats collector
2017-01-12 14:08:21 +01:00
Matt Layher
e3f99e13b9
Add NFS event metrics to mountstats collector
2017-01-11 11:41:13 -05:00
Matt Layher
efa25665ec
Add initial wifi collector, bump netlink to fix 32-bit builds
2017-01-11 10:08:44 -05:00
Johannes 'fish' Ziemke
55170e8feb
Merge pull request #411 from discordianfish/hwmon-move-label-metrics
...
Use filename as label, move 'label' to own metric
2017-01-10 12:21:18 +01:00
Ben Kochie
38a4a36061
Update end-to-end test.
2017-01-10 10:23:16 +01:00
Ben Kochie
b4fa10ca9d
Add collector for Linux EDAC
...
Collect "Error detection and correction" metrics from memory
controllers.
* Supported on Linux only.
* Add basic fixtures.
* Enabled by default.
2017-01-10 10:14:19 +01:00
Johannes 'fish' Ziemke
6aef20f8d8
Use filename as label, move 'label' to own metric
...
This closes #406
2017-01-09 18:33:31 +01:00
Joe Handzik
e7442d6517
end-to-end-test.sh: Add zfs plugin
...
Enables fixture test and updates e2e-output.txt.
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-08 11:13:35 -06:00
Corey Stewart
10ba27bf2c
Remove FreeBSD support for zfs plugin.
...
This also involves removing zfs_zpool code for now.
Signed-Off-By: Corey Stewart <stewa169@purdue.edu>
Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-01-08 11:13:35 -06:00
Corey Stewart
a8c94d48e6
Style changes and cleanup
...
This patch makes stylistic changes to error strings, unexports method names by lower casing them, removes unused dataSetMetric, and adds copyright/licence information.
Signed-Off-By: Corey Stewart <stewa169@purdue.edu>
2017-01-08 10:23:58 -06:00
Christian Schwarz
f29f3873ea
Add a collector for ZFS, currently focussed on ARC stats.
...
It is tested on FreeBSD 10.2-RELEASE and Linux (ZFS on Linux 0.6.5.4).
On FreeBSD, Solaris, etc. ZFS metrics are exposed through sysctls.
ZFS on Linux exposes the same metrics through procfs `/proc/spl/...`.
In addition to sysctl metrics, 'computed metrics' are exposed by
the collector, which are based on several sysctl values.
There is some conditional logic involved in computing these metrics
which cannot be easily mapped to PromQL.
Not all 92 ARC sysctls are exposed right now but this can be changed
with one additional LOC each.
2017-01-08 10:23:58 -06:00
Johannes 'fish' Ziemke
2e47fcb8c5
Only store relevant e2e output
...
This makes commits ligher/more readable when updating the output.
2017-01-06 12:36:26 +01:00
Johannes 'fish' Ziemke
ad2eb4a788
Use Gauge for megacli counters
...
Without refactoring this to use const metrics, we need to make this a
gauge to we can keep using Set() which was deprecated for counters.
2017-01-06 12:33:21 +01:00
Johannes 'fish' Ziemke
01a9a37556
Stop using deprecated SetMetricFamilyInjectionHook
2017-01-06 12:21:12 +01:00
Johannes 'fish' Ziemke
3e266e28b9
Merge pull request #397 from dominikh/freebsd-cpu
...
Collect CPU temperatures on FreeBSD
2017-01-05 17:32:48 +01:00
Johannes 'fish' Ziemke
fc1113cd11
Merge pull request #396 from dominikh/bsd-memleak
...
Don't leak or race in FreeBSD devstat collector
2017-01-05 17:31:57 +01:00
Dominik Honnef
d827db8e17
Better error handling when collecting CPU temps
...
Log why we couldn't collect the temperature, and set metric to NaN if
the CPU should support temperature collection but had an error.
2017-01-05 15:19:56 +01:00
Johannes 'fish' Ziemke
91f4781234
Merge pull request #311 from kpettijohn/solaris-loadavg
...
Added loadavg collector for Solaris
2017-01-05 11:49:16 +01:00
Dominik Honnef
9847257bc0
Add missing license headers
2017-01-05 06:18:34 +01:00
Dominik Honnef
782eaee100
Collect CPU temperatures on FreeBSD
2017-01-05 06:17:16 +01:00
Dominik Honnef
38c5890428
Reuse devinfo struct
...
The devstat API expects us to reuse one devinfo for many invocations of
devstat_getstats. In particular, it allocates and resizes memory
referenced by devinfo.
2017-01-05 05:38:26 +01:00
Dominik Honnef
ea55d0f5cb
Don't race in FreeBSD devstat collector
...
Querying the number of devices separately from the device list itself is
racy. Devices may be added or removed between the two calls; and removed
devices would lead to a segfault.
2017-01-05 05:38:26 +01:00
Dominik Honnef
5e220c1665
Move cgo portions of FreeBSD devstat collector into own file
...
Embedding 100 lines of code in a comment doesn't make for good reading,
editing or code quality.
2017-01-05 05:38:26 +01:00
Dominik Honnef
20ca0f1376
Eliminate memory leak in FreeBSD devstat collector
...
The memory allocated by calloc was never freed. Since the devinfo struct
never leaves the function, anyway, we might as well just allocate it on
the stack.
2017-01-05 05:38:26 +01:00
Dominik Honnef
732dd67729
Fix build of cpu_freebsd.go
...
Corrects an incorrect merge in 8e50b80
2017-01-05 03:16:51 +01:00
Kevin Pettijohn
d2fbeeb3c3
Added loadavg collector for solaris
...
It seems solaris prefers "sys/loadavg.h" over "stdlib.h" when
fetching the load average.
For Illumos based OSes it was required to include "sys/time.h" to
ensure that "hrtime_t" was defined.
https://www.illumos.org/issues/6002
It also required setting the ldflags "-fno-stack-protector -lssp" to
avoid undefined symbols when linking with gcc.
/opt/local/go/pkg/tool/solaris_amd64/link: running gcc failed: exit status 1
Undefined first referenced
symbol in file
__stack_chk_fail /tmp/go-link-138622936/000002.o
__stack_chk_guard /tmp/go-link-138622936/000002.o
2017-01-04 17:45:40 -08:00
Johannes 'fish' Ziemke
f9d3f830cb
Merge pull request #399 from discordianfish/fish-fs-uniq-metric
...
Make sure we only return one metric per mounted fs
2017-01-04 16:48:04 +01:00
Johannes 'fish' Ziemke
4c9131b7d8
Make sure we only return one metric per mounted fs
2017-01-04 16:45:25 +01:00
Johannes 'fish' Ziemke
6dd39b15c2
Do not build meminfo on freebsd
2017-01-04 16:02:49 +01:00
Johannes 'fish' Ziemke
a97ff2bcda
Do not build meminfo on windows
2017-01-04 15:16:13 +01:00
Johannes 'fish' Ziemke
d17b1b44a6
Merge pull request #398 from prometheus/fish-netdev-check-scan-errror
...
Check for errors in netdev scanner
2017-01-03 16:00:08 +01:00
Johannes 'fish' Ziemke
9969f93e7d
Merge pull request #387 from discordianfish/fish-fix-meminfo-darwin
...
Refactor meminfo and add darwin metrics
2017-01-03 14:50:52 +01:00
Johannes 'fish' Ziemke
6576571ac8
Check for errors in netdev scanner
2017-01-03 14:48:52 +01:00
Johannes 'fish' Ziemke
26c6182c84
Move comment and remove superfluous newline
2017-01-03 14:41:05 +01:00
Johannes 'fish' Ziemke
b68a9ec7af
Merge pull request #359 from CloudAndHeat/feature/hwmon_chip_name_metric
...
hwmon: Provide annotation metric to link chip sysfs paths to human-readable chip types
2017-01-03 14:38:43 +01:00
Johannes 'fish' Ziemke
4e696d5d31
Merge pull request #391 from discordianfish/fish-add-cpu-darwin
...
Add cpu collector for darwin
2017-01-03 14:23:50 +01:00
Johannes 'fish' Ziemke
079fd701a0
Merge pull request #389 from prometheus/fish-use-const-metrics
...
Convert remaining collectors to use ConstMetrics
2017-01-03 14:22:58 +01:00
Johannes 'fish' Ziemke
d2ca252457
Merge pull request #393 from discordianfish/fish-add-netdev-darwin
...
Add netdev collector for darwin
2017-01-03 14:12:36 +01:00
Johannes 'fish' Ziemke
8e50b80d12
Convert remaining collectors to use ConstMetrics
2017-01-03 14:11:10 +01:00
Johannes 'fish' Ziemke
3db2f442ae
Limit node-exporter scope, deprecated collectors
2017-01-03 14:03:23 +01:00
Johannes 'fish' Ziemke
c21c59dfeb
Add meminfo stats for Darwin
2017-01-03 11:22:46 +01:00
Johannes 'fish' Ziemke
2983c4a31d
Refactor meminfo collector similar to filesystem
...
Instead of doing the whole metric exposition in a platform specific collector
implementation, this creates and updates the metrics in meminfo.go and
expected a platform specific implementation of getMemInfo on
*meminfoCollector.
2017-01-03 11:20:36 +01:00
Johannes 'fish' Ziemke
3c47ef8e60
Add netdev collector for darwin
...
Same as for openbsd, this is just slightly adjusted from freebsd
variant.
2016-12-29 19:17:15 +01:00
Dominik Honnef
f0adcd163d
Implement CPU collector on FreeBSD without cgo
2016-12-29 04:29:52 +01:00
Dominik Honnef
d2a43f7d05
Implement meminfo on BSD without cgo
...
This removes some error handling, which should be fine. If the calls
fail, we will get the zeroes, which is a safe enough fallback.
Additionally, if the first sysctl (page_size) succeeded it is unlikely
that other ones will fail.
2016-12-29 02:19:21 +01:00
Johannes 'fish' Ziemke
050d6f7f13
Add cpu collector for darwin
2016-12-28 18:38:52 +01:00
Dominik Honnef
0f6191987e
Implement file systems on FreeBSD without cgo
...
The code may also work for other BSDs, but I don't have access to those
for testing.
2016-12-26 23:06:17 +01:00
Dominik Honnef
54c74923ee
Implement loadavg on FreeBSD without cgo
...
The code may also work for other BSDs, but I don't have access to those
for testing.
2016-12-26 23:06:05 +01:00
Ben Kochie
10e525ff02
Merge pull request #375 from prometheus/fish-add-runit-servicedir-flag
...
Add runit service dir flag
2016-12-26 13:01:51 +01:00
Johannes 'fish' Ziemke
d506b2266c
Merge pull request #374 from prometheus/fish-add-filesystem-errors
...
Add node_filesystem_device_errors_total metric
2016-12-26 11:51:14 +01:00
Bjørn Forsman
64e637cbcc
Ignore autofs filesystems on linux
...
node_exporter currently triggers autofs to mount the underlying
filesystem on every scrape. This is undesirable. Better ignore autofs.
The underlying filesystem that autofs mounts will be monitored though,
when the (real) filesystem is mounted.
2016-12-25 15:13:45 +01:00
Johannes 'fish' Ziemke
71ea37987f
Merge pull request #365 from EdSchouten/drbd
...
A collector for DRBD
2016-12-25 11:04:43 +01:00
Ed Schouten
b0d15eaac6
Reduce the severity of these messages.
...
They get printed all the time, as there are some tokens in the /proc
file that we simply don't support. It's better to keep these as
debugging messages, which may come in useful if new tags start to
appear.
2016-12-23 15:57:46 +01:00
Ed Schouten
4adf7fa96c
Improve the help strings, as proposed in the code review.
2016-12-23 15:55:49 +01:00
Ed Schouten
b7daf27678
Process feedback from the code review.
...
- Use the right number of printf() arguments. Use %q where it makes sense.
- Use "DRBD" instead of "Drbd", per Go's style guide.
- Add _total suffixes to counter metrics.
- Mention the unit (bytes) in documentation strings once more.
2016-12-22 13:57:19 +01:00
Björn Rabenstein
08c9347e88
Merge pull request #367 from mdlayher/mountstats
...
Add mountstats collector for detailed NFS statistics
2016-12-20 17:20:41 +01:00
Matt Layher
25a93e38e7
Add mountstats collector for detailed NFS statistics
2016-12-20 11:13:02 -05:00
Johannes 'fish' Ziemke
9039a425d0
Add runit service dir flag
2016-12-19 13:10:38 +01:00
Johannes 'fish' Ziemke
deebf0aa49
Add node_filesystem_device_errors_total metric
...
This metric is the total number of errors occurred when getting stats
for the given device.
2016-12-19 11:48:32 +01:00
Ed Schouten
d1fa279105
Use a descriptive name for the file descriptor.
2016-12-16 11:45:14 +01:00
Ben Kochie
677ed28575
Merge pull request #361 from lucasbergman/mips-build-fix
...
mips64 build fix
2016-12-16 11:39:53 +01:00
Ed Schouten
6ff620e387
Properly propagate parse errors.
2016-12-16 11:36:36 +01:00
Ed Schouten
6269f7502a
Add a collector for DRBD.
...
This collector exposes most of the useful information that can be found
in /proc/drbd. Sizes are normalised to be in bytes, as /proc/drbd uses
kibibytes.
2016-12-11 11:55:28 +01:00
Ed Schouten
a696830c38
Add a collector for NFS client statistics.
...
This change adds a new collector called "nfs" that parses the contents
of /proc/net/rpc/nfs and turns it into metrics. It can be used to
inspect the number of operations per type, but also to keep an eye on an
extraneous number of retransmissions, which may indicate connectivity
issues.
I've picked the name "nfs", as most operating systems use "nfs" for the
client component and "nfsd" as the server component. If we want to add
stats for the NFS server as well, we'd better call such a collector
"nfsd".
2016-12-09 19:58:08 +01:00
Jonas Wielicki
3efaa1a6a8
Update end-to-end tests
2016-12-01 10:00:50 +01:00