Commit graph

156 commits

Author SHA1 Message Date
Paul Gier cb9e23c536 Systemd refactor (#1254)
This reduces the system metric collection time by using a wait group
and go routines to allow the systemd metric calls happen concurrently.

Also, makes the start time, restarts, tasks_max, and tasks_current metrics disabled by default
because these can be time consuming to gather.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-02-11 23:27:21 +01:00
Sachi King 18fc512fc4 Bond: Monitor bond mii_status not link operstate (#1124)
With a bond interface the state of the slave interface from the bond's
point of view is reflected in `mii_status` and is independent of the
link's `operstate`.

When a bond is monitored with `miimon`, `mii_status` will reflect the
state of the physical link as configured via the operator.

When a bond is monitored via `arp_interval` the `mii_status` will
reflect the results of the bond ARP checking.  This means the link can
be down from the bond's point of view, but up from a physical
connection point of view.

If a bond is not monitored via miimon or arp, the `mii_status` should
likely be always `up`, however I have observed a case where this is not
true and the `operstate` is `up` while `mii_status` is `down`.  Kernel
bond documentation stresses that a bond should not be configured without
one of `mii_mon` or `arp_interval` configured however.

This change results in the metric 'node_bonding_active' matching the
up/down state of the bond's point of view rather than operstate.

Signed-off-by: Sachi King <nakato@nakato.io>
2019-02-10 11:00:04 +01:00
Paul Gier e0d6d11859 netclass_linux: remove varying labels from the 'up' metric (#1243)
* netclass_linux: remove varying labels from the 'up' metric

This moves the variable label values such as 'operstate' out of
the 'network_up' metric and into a separate metric called '_info'.
This allows the 'up' metric to remain continous over state changes.
Fixes #1236

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-02-07 15:59:32 +01:00
Johannes 'fish' Ziemke 6ea0aa73e4 Rename interface to device in netclass collector (#1224)
* Rename interface to device in netclass collector

This makes it consistent with other networking metrics like node_network_receive_bytes_total

This closes #1223 

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2019-02-06 20:02:48 +01:00
Ralf Horstmann 3867ad5ab0 Add diskstats collector for OpenBSD (#1250)
* Add diskstats collector for OpenBSD

Tested on i386 and amd64, OpenBSD 6.4 and -current.

* Refactor diskstats collectors

This moves common descriptors from Linux, Darwin, OpenBSD
diskstats collectors into diskstats_common.go

Signed-off-by: Ralf Horstmann <ralf+github@ackstorm.de>
2019-02-06 11:36:22 +01:00
David O'Rourke d442108d7a collector: Implement uname collector for FreeBSD (#1239)
* collector: Implement uname collector for FreeBSD

Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2019-02-05 17:39:24 +01:00
mknapphrt 7fbdd0ae93 Update procfs vendor (#1248)
Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
2019-02-04 16:54:41 +01:00
Jon Davies e766485286 Add kstat-based Solaris metrics (#1197)
* collector/loadavg_solaris.go: Use libkstat to gather load averages.
* go.mod: Added go-kstat.
* boot_time_solaris.go: Added.
* cpu_solaris.go: Added.
* README.md: Updated entries for Solaris.
* collector/zfs_solaris.go: Added.
* CHANGELOG.md: Added note about kstat-based Solaris metrics.

Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2019-01-12 13:33:56 +01:00
Ben Kochie f9dd8e9b8c
Release v0.17.0 (#1168)
* Update CHANGELOG
* Update VERSION

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 15:18:48 +01:00
Ben Kochie 4abc6fba7d
Add fallback for missing /proc/1/mounts (#1172)
* Add fallback for missing /proc/1/mounts

On some systems, `/proc/1/mounts` is hidden from non-root users due to
the `hidepid` procfs feature. Attempt to fallback to `/proc/mounts` if
`/proc/1/mounts` is not found.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add tests.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add CHANGELOG entry.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 14:01:55 +01:00
Nemikolh 62f99f95f0 Add receive/transmit bytes total metric (wifi collector). (#1150)
Signed-off-by: Nemikolh <Nemikolh@users.noreply.github.com>
2018-11-19 19:15:54 +01:00
Ben Kochie ab19e0c831
Add changelog entry for #1148 (#1154)
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-15 04:22:02 +01:00
Arno Uhlig 6edd9d217e [systemd] collect taskCurrent, tasksMax per systemd unit (#1098)
* [systemd] collect taskCurrent, tasksMax per systemd unit

Signed-off-by: Arno Uhlig <arno.uhlig@sap.com>
2018-11-14 10:50:39 +01:00
Ben Kochie b1eec66640
Add TCPSynRetrans to netstat default filter (#1143)
Tcp SYN packet retransmits are a very useful signal as they affect
network performance disproportionately to regular TCP retransmits.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-07 17:21:18 +01:00
Patrick bdc0e7e678 Collect additional common Infiniband counters (#1120)
* Collect additional common Infiniband counters

Signed-off-by: Patrick Freeman <will.pat.free@gmail.com>
2018-10-30 21:54:09 +01:00
Ben Kochie 0da9d248e7
Update for 0.17.0-rc.0 release (#1118)
* Update VERSION.
* Update CHANGELOG.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-10-19 17:29:19 +02:00
Ralf Horstmann 9f820bd3ee Update cpu collector for OpenBSD 6.4 (#1094)
Starting with (not yet released) OpenBSD 6.4, sysctl KERN_CPTIME2 will
return ENODEV for offline CPUs.

SMT siblings are reported as offline when hw.smt is disabled, which is
the default since one of the later Spectre variants. So this might
affect a few systems.

For more details see:
https://cvsweb.openbsd.org/src/sys/kern/kern_sysctl.c#rev1.348

Signed-off-by: Ralf Horstmann <ralf+github@ackstorm.de>
2018-10-02 10:21:30 +02:00
Ben Kochie 0fdc089187
Change systemd unit filtering (#1083)
* Change systemd unit filtering

Get all units from systemd and filter in Go.
* Improves compatibility with older versions of systemd.
* Improve debugging by printing when units pass the filter.
* Remove extraneous newlines from log messages.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-09-24 15:04:55 +02:00
Ben Kochie ebdd524123
Correctly cast Darwin memory info (#1060)
* Correctly cast Darwin memory info

* Cast stats to float64 before doing math on them to avoid integer
wrapping.
* Remove invalid `_total` suffix from gauge values.
* Handle counters in `meminfo.go`.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-09-07 22:27:52 +02:00
James Hartig 60c827231a NRestarts or NRefused aren't available on older systemd versions (#1039)
* If NRestarts or NRefused are not available, don't ignore the unit itself
* Don't report systemd metrics (NRestarts/NRefused) that are not available

Signed-off-by: James Hartig <james@getadmiral.com>
2018-08-14 14:28:26 +02:00
Ben Kochie fe5a117831
Handle vanishing PIDs (#1043)
PIDs can vanish (exit) from /proc/ between gathering the list of PIDs
and getting all of their stats.

* Ignore file not found errors.
* Explicitly count the PIDs we find.
* Cleanup some error style issues.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-08-13 17:27:23 +02:00
Ben Kochie 0662673ad6
Disable wifi collector by default (#1037)
* Disable wifi collector by default

Disable the wifi collector by default due to suspected cashing issues and goroutine leaks.
* https://github.com/prometheus/node_exporter/issues/870
* https://github.com/prometheus/node_exporter/issues/1008

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-08-07 10:27:20 +02:00
Ben Kochie 5d23ad0ca7
Fix supervisord collector (#978)
* Replace supervisord xmlrpc library
* Use `github.com/mattn/go-xmlrpc` that doesn't leak goroutines.
* Fix uptime metric

* Use Prometheus best practices for uptime metric.
  * Use "start time" rather than "uptime".
  * Don't emit a start time if the process is down.
* Add changelog entry.
* Add example compatibility rules.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-08-06 16:54:46 +02:00
xginn8 140b8b85c3 Filter out uninstalled systemd units when collecting all units (#1011)
fixes #567

Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
2018-07-22 09:20:03 +02:00
Sven Lange 2ae8c1c7a7 Add systemd uptime metric collection (#952)
* Add systemd uptime metric collection

Signed-off-by: Sven Lange <tdl@hadiko.de>
2018-07-18 16:02:05 +02:00
xginn8 9b97f44a70 Add a counter for refused socket unit connections, available as of systemd 239 (#995)
Signed-off-by: xginn8 <mamcgi@gmail.com>
2018-07-16 16:01:42 +02:00
xginn8 ac5a981761 Adding socket stat collection for systemd socket units (#968)
Signed-off-by: xginn8 <mamcgi@gmail.com>
2018-07-05 16:26:48 +02:00
xginn8 8af84a215d Add support for NRestarts counter introduced in systemd 235 (#992)
* Add support for NRestarts counter introduced in systemd 235

`.service` units increment this counter any time the Restart= condition is
triggered.

Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
2018-07-05 13:31:45 +02:00
Ben Kochie 1882a08041 Release 0.16.0
Changes since 0.16.0-rc.3

* [CHANGE] align Darwin disk stat names with Linux #930

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-15 16:16:05 +02:00
Ben Kochie dc1972e9e3
Document upgrade options for v0.16.0
* Add an upgrade guide.
* Add an example recording rules.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-11 13:45:36 +02:00
Ben Kochie 7073dcdcb5
Fix 0.16.0-rc.3 release date. 2018-04-27 17:50:15 +02:00
Ben Kochie 11b60ac32f
Release v0.16.0-rc.3
Chaneges since v0.16.0-rc.2
* Remove gmond collector #852
* Build with Go 1.9[0]
* Fix /proc/net/dev/ interface name handling #910

[0]: https://github.com/prometheus/node_exporter/issues/870

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-27 16:50:48 +02:00
Ben Kochie 4a0fafcf06
Release v0.16.0-rc.2
* Update CHANGELOG.
* Bump VERSION.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-17 14:21:59 +02:00
mischief 693eb82139 update README.md and CHANGELOG.md to reflect new bsd boottime collector
Signed-off-by: mischief <mischief@offblast.org>
2018-04-15 08:38:47 +00:00
Karsten Weiss efc1fdb6d0 cpu: Add a 2nd label 'package' to metric node_cpu_core_throttles_total (#871)
* cpu: Add a 2nd label 'package' to metric node_cpu_core_throttles_total

This commit fixes the node_cpu_core_throttles_total metrics on
multi-socket systems as the core_ids are the same for each package.
I.e. we need to count them seperately.

Rename the node_package_throttles_total metric label `node` to `package`.

Reorganize the sys.ttar archive and use the same symlinks as the Linux
kernel. Also, the new fixtures now use a dual-socket dual-core cpu w/o
HT/SMT (node0: cpu0+1, node1: cpu2+3) as well as processor-less
(memory-only) NUMA node 'node2' (this is a very rare case).

Signed-off-by: Karsten Weiss <knweiss@gmail.com>

* cpu: Use the direct /sys path to the cpu files.

Use the direct path /sys/devices/system/cpu/cpu[0-9]* (without symlinks)
instead of /sys/bus/cpu/devices/cpu[0-9]*.

The latter path also does not exist e.g. on RHEL 6.9's kernel.

Signed-off-by: Karsten Weiss <knweiss@gmail.com>

* cpu: Reverse core+package throttle processing order

Signed-off-by: Karsten Weiss <knweiss@gmail.com>

* cpu: Add documentation URLs

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
2018-04-09 18:01:52 +02:00
Ben Kochie b8f25c87f1
Update for 0.16.0-rc.1
* Update VERSION.
* Update CHANGELOG.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-04 18:40:46 +02:00
Ben Kochie 7fc2489a59 Bump the release date for 0.16.0-rc.0 2018-03-09 14:04:33 +01:00
Ben Kochie 16e1bf7993
Update for v0.16.0-rc.0 (#848)
* Update CHANGELOG.
* Update VERSION.
2018-03-09 14:03:07 +01:00
Ben Kochie 2a80537547
Split out guest cpu metrics on Linux. (#744)
Linux "guest" metrics for VMs are already accounted for in node_cpu
`user` and `nice` metrics.  Separate these into their own metric to
avoid duplication of data.
2017-11-23 15:04:47 +01:00
Ben Kochie f84dd15be7 Release v0.15.0 (#686)
* Release v0.15.0

* Bump version.
* Update CHANGELOG.

* Update to Go 1.9 in circle.yml
2017-10-06 09:43:58 +02:00
Rene Treffer be6291adde Add changelog entry for node_cpu metrics move (#603) 2017-06-19 10:28:53 +02:00
Ben Kochie 6c1a2bb092 Release v0.14.0
* Update `VERSION`.
* Update `CHANGLOG.md`.
2017-03-21 12:54:53 +01:00
Ben Kochie 309b313162 Fix wording of megacli changelog entry. 2017-03-07 17:26:39 +01:00
Ben Kochie b3e924f00c Release v0.14.0-rc.2
* Update VERSION.
* Update CHANGELOG.
2017-03-07 15:26:39 +01:00
Ben Kochie 0d4e881389 Release v0.14.0-rc.1.
* Update CHANGELOG
* Update VERSION
2017-01-15 18:31:20 +01:00
Ben Kochie baa4492903 Release v0.13.0 2016-11-25 22:42:30 +01:00
Ben Kochie dfb22045d7 Release v0.13.0-rc.2
Update CHANGELOG with new features/bugfixes.
2016-11-17 21:19:40 +01:00
Ben Kochie 2ccc8bd1b1 Fixup: Remove ConstMetrics changelog entries. 2016-10-16 13:20:57 +02:00
Ben Kochie 0a9f1236ea Fixup: Adjust version in changelog. 2016-10-16 13:20:19 +02:00
Ben Kochie e40efa1914 Prepare for 0.13.0-rc.1 release.
* Update CHANGELOG.md.
* Update VERSION.
2016-10-16 13:07:22 +02:00
Tobias Schmidt 3ac6f866ef
Release 0.12.0 2016-05-05 17:55:36 -04:00
Ian Hansen 31ca1ae0a6 Cut version 0.11.0 2015-07-27 10:27:09 -04:00
Julius Volz 8b3cf08b03 Cut version 0.10.0. 2015-06-10 17:53:36 +02:00
Matthias Rampke c1992f18e5 Add date in Changelog entry. 2015-05-26 08:36:17 +00:00
Matthias Rampke 433e2c584f Cut release 0.9.0
This release adds the IPVS collector and removes the deprecated
attributes collector.
2015-05-24 09:45:20 +00:00
Julius Volz b3e5a8e046 Release version 0.8.0 and introduce changelog. 2015-03-09 19:16:10 +01:00