Karsten Weiss
6720cfdbfe
golint: Fix comment on exported function NewDevstatCollector.
2017-05-14 13:21:39 +02:00
Karsten Weiss
b73af72853
Explicitly check for the rc 3 in call to getloadavg(). Reorder logic.
2017-05-14 13:07:54 +02:00
Karsten Weiss
af358ec800
golint fixes: if block ends with a return statement, so drop this else and outdent its block.
2017-05-14 12:55:44 +02:00
Karsten Weiss
732f839810
sysctl_bsd.go: golint fixes. Typo fix.
2017-05-14 12:51:57 +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
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
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
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
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
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
8aec44617a
Remove Windows support
...
Use https://github.com/martinlindhe/wmi_exporter instead.
2017-04-10 23:27:23 -03:00
Tobias Schmidt
41a44a4d24
Merge pull request #532 from prometheus/grobie/remove-extra-file-check
...
mdadm: Remove extra file existence check
2017-03-31 05:35:12 +02:00
Ben Kochie
5f43211f67
Blacklist systemd scope units
...
Blacklist `scope` units from systemd collector by default.
These units are created with unique IDs programatically[0]. This leads to
huge cardinality problems.
[0]: https://www.freedesktop.org/software/systemd/man/systemd.scope.html
2017-03-23 14:02:46 +01:00
Tobias Schmidt
d290ea94b8
Fix export of stale device error metrics for unmounted filesystems
...
Instead of maintaining a counter metric for device errors in memory,
this change exports a gauge and uses const metrics to avoid leaking
metrics for unmounted filesystems.
2017-03-22 21:48:18 -03:00
Tobias Schmidt
7b93b52010
Fix lint issues on filesystem BSD implementation
2017-03-22 21:48:12 -03:00
Tobias Schmidt
445ed44082
mdadm: Remove extra file existence check
2017-03-22 10:11:19 -03:00
Johannes 'fish' Ziemke
9676f5f2dc
Merge pull request #523 from roclark/support-legacy-infiniband
...
Add support for legacy InfiniBand drivers
2017-03-21 10:52:07 +01:00
Johannes 'fish' Ziemke
620e9937e6
Merge pull request #524 from mdlayher/wifi-expand
...
Expand wifi collector for more interface types
2017-03-21 10:32:44 +01:00
Juergen Hoetzel
aef2601cf6
Add missing dependency for static FreeBSD build
2017-03-20 16:59:45 +00:00
Matt Layher
2bfe410fb7
Expand wifi collector for more interface types
2017-03-20 12:25:01 -04:00
Robert Clark
3a5917dfdc
Add support for legacy InfiniBand drivers
...
Older versions of the OFED drivers contain 64-bit variants of the port counters and are located in a directory named 'counters_ext'. This patch includes these older metrics that have since been deprecated with OFED 4.0.
Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
2017-03-20 10:37:21 -05:00
Tobias Schmidt
0400e437be
Fix and simplify parsing of raid metrics
...
Fixes the wrong reporting of active+total disk metrics for inactive
raids. Also simplifies the code and removes a couple of redundant
comments.
2017-03-19 08:03:58 -03:00
Matt Layher
42c8a20545
Unexport wifiCollector metrics
2017-03-16 17:11:09 -04:00
Matt Layher
69368b7f9c
Add synthetic node_wifi_station_info metric for BSS information
2017-03-16 16:24:23 -04:00
Brian Brazil
a02e469b07
Report collector success/failure and duration per scrape. ( #516 )
...
This is in line with best practices, and also saves us
63 timeseries on a default Linux setup.
2017-03-16 17:21:00 +00:00
Robert Clark
413e5af502
Skip metric files that don't exist
...
In case a metric file within the InfiniBand collector doesn't exist, skip the metric in order to allow collection of the remaining valid InfiniBand metrics.
Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
2017-03-09 11:05:36 -06:00
Derek Marcotte
72d8576185
Refactor meminfo_bsd.go to use sysctl_bsd.go ( #501 )
...
* Refactor meminfo_bsd.go to use sysctl_bsd.go
* Fixed spelling.
2017-03-07 21:54:28 -04:00
Ben Kochie
5d22d41ed7
Merge pull request #484 from prometheus/grobie/update-vendored-packages
...
Update vendored packages
2017-03-01 08:05:45 +01:00
Derek Marcotte
bdc2131332
Added node_memory_buffer, node_memory_swaptotal to meminfo_bsd ( #451 )
2017-03-01 01:36:02 -04:00
Tobias Schmidt
ce117d7a40
Update vendored packages
2017-02-28 18:20:24 -04:00
Tobias Schmidt
84eaa8fecd
Remove more unnecessarily named return values
2017-02-28 17:33:46 -04:00
Derek Marcotte
5c28ab044d
Add BSD exec statistics collector ( #457 )
...
* First pass of a sysctl_bsd source, exec_bsd + exec metrics
* Incorportate PR feedback, including removing pre-build descriptions, unit conversion callback.
* Remove redundant cached_description field, per PR feedback
* Incorporate PR feedback
2017-02-28 17:23:10 -04:00
Tobias Schmidt
1bd94074dd
Delete unused code
2017-02-28 17:20:16 -04:00
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
084e585c2a
Fix scanner usage without error handling
2017-02-28 16:04:25 -04:00
Tobias Schmidt
d1dfda86ee
Fix wrong end-to-end expectation
2017-02-28 16:02:43 -04:00
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