Commit Graph

618 Commits

Author SHA1 Message Date
Matt Layher 177ac7f50f collector: refactor textfile collector to avoid looping defer
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-11-22 13:22:01 -05:00
Sven Haardiek d089776e8b
Squashed commit of the following:
commit 5ef96388a978c54173e1b1ec8e7bcb41fc7d130d
Author: Sven Haardiek <sven@haardiek.de>
Date:   Wed Sep 18 20:45:23 2019 +0200

    block variables

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit c1177382e241994618a8ab7dd9842027d597b0df
Author: Sven Haardiek <sven@haardiek.de>
Date:   Wed Sep 18 20:38:33 2019 +0200

    Use SI Units

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 04e4f99c423872d3094f21f89a8235b233a01941
Merge: 5417c98 f3538e1
Author: Sven Haardiek <sven@haardiek.de>
Date:   Wed Sep 18 19:20:17 2019 +0200

    Merge branch 'master' into power_supply_class

commit 5417c9820a40b37b490caedeaa3526883380b9bf
Author: Sven Haardiek <sven@haardiek.de>
Date:   Wed Sep 4 23:02:39 2019 +0200

    Drop averages

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 1f1447dbe7bbdcdabebf4c968beb14c67d89dd9f
Author: Sven Haardiek <sven@haardiek.de>
Date:   Wed Sep 4 22:56:00 2019 +0200

    Update Copyright

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 9677425059a3bf61cd7498cf7b5f05d5af7a626b
Merge: 0b51589 d3478a2
Author: Sven Haardiek <sven@haardiek.de>
Date:   Mon Sep 2 22:02:53 2019 +0200

    Merge branch 'master' into power_supply_class

commit 0b51589f390cc1b33ea4728d85fca3a3b231cf3f
Author: PrometheusBot <prometheus-team@googlegroups.com>
Date:   Fri Aug 30 13:32:17 2019 +0200

    makefile: update Makefile.common with newer version (#1466)

    Signed-off-by: prombot <prometheus-team@googlegroups.com>

commit af2b9e849c7b69237b7fa0e9a289c929ec7173a0
Author: Boris Momčilović <boris.momcilovic@gmail.com>
Date:   Tue Aug 27 14:24:11 2019 +0200

    Ipvs firewall mark (#1455)

    * IPVS: include firewall mark label

    Signed-off-by: Boris Momčilović <boris@firstbeatmedia.com>

commit 773f99de7f699900a00b4d35340e356fe7098ee7
Author: Paul Gier <pgier@redhat.com>
Date:   Tue Aug 27 02:26:19 2019 -0500

    update procfs to v0.0.4 (#1457)

    Signed-off-by: Paul Gier <pgier@redhat.com>

commit 6f8a4f4348f62700cbf7eeb2657851237e13c35d
Author: beorn7 <beorn@grafana.com>
Date:   Tue Aug 20 18:49:12 2019 +0200

    Update legendLink

    This still had the 'k8s' in as it was copied and pasted from the
    kubernetes-mixin.

    Signed-off-by: beorn7 <beorn@grafana.com>

commit d758cf394cfbed9e87e116a24d72050066cd039a
Author: beorn7 <beorn@grafana.com>
Date:   Wed Aug 14 22:24:24 2019 +0200

    Make the severity of "critical" alerts configurable

    This addresses the blissful scenario where single-node failures are
    unproblematic. No reason to wake somebody up if a node is about to
    screw itself up by filling the disk.

    Signed-off-by: beorn7 <beorn@grafana.com>

commit 041b9e1e785f5f43bbef97c0c76d205181d08890
Author: beorn7 <beorn@grafana.com>
Date:   Thu Aug 15 16:43:57 2019 +0200

    Add line for number of cores to load graph

    Backported from the node dashboard in the kubernetes-mixin.

    Signed-off-by: beorn7 <beorn@grafana.com>

commit 5552bb3a6b2be1e3dd1a93dbdb9650bd0363a922
Author: beorn7 <beorn@grafana.com>
Date:   Thu Aug 15 16:36:10 2019 +0200

    Fix title of CPU panel to usage

    We use the `mode="idle"` metric, but we are inverting it, so this is
    usage, and that's intended.

    Signed-off-by: beorn7 <beorn@grafana.com>

commit db0571b402233323ed7e222e53f7ef7738520f49
Author: beorn7 <beorn@grafana.com>
Date:   Thu Aug 15 16:32:54 2019 +0200

    node-mixin: Improve disk usage panel

    - Use a stacked graph instead of a gauge as development over time is
      especially useful for disk space usage.

    - By only taking one metric per device into account, we avoid
      double-counting for devices that are mounted multiple times.

    Signed-off-by: beorn7 <beorn@grafana.com>

commit 3822e096c5d27d06b9c9a68beff81ef23f12eb36
Author: Björn Rabenstein <beorn@grafana.com>
Date:   Thu Aug 15 00:40:51 2019 +0200

    node-mxin: Improve nodes dashboard (#1448)

    * node-mixin: Improve nodes dashboard

    - Use stacking where it makes sense.
    - Normalize idle CPU so that stacking is more meaningful.
    - Consistently fill where stacking is used but don't fill where not.
    - Fix y axis max value for Idle CPU panel.
    - Fix y axis min value for memory usage panel.
    - Use `$__interval` for range where applicable (and set min step
      to 1m).
    - Make the right Y axis for disk I/O actually work.

    This is just an incremental improvements. It doesn't touch the more
    involved TODOs.

    Signed-off-by: beorn7 <beorn@grafana.com>

commit fbced86b9835e1b196c15ddcac01ba3cfcf369cc
Author: beorn7 <beorn@grafana.com>
Date:   Tue Aug 13 21:54:28 2019 +0200

    node-mixin: Fix various straight-forward issues in the USE dashboards

    - Normalize cluster memory utilisation.

    - Fix missing `1m` in memory saturation.

    - Have both disk-related row next to each other instead with the
      network row in between.

    - Correctly render transmit network traffic as negative, using
      `seriesOverrides` and `min: null` for the y-axis.

    - Make panel and row naming consistent.

    - Remove legend where it would just display a single entry with
      exactly the title of the panel.

    - Fix metric name in individual node CPU Saturation panel.

    - Break up disk space utilisation by device in the panel for an
      individual node.

    NB: All of that doesn't touch any more subtle issues captured in the
    various TODOs.

    Signed-off-by: beorn7 <beorn@grafana.com>

commit 5bdf0625023cf7d05e0f65c6b6a1303637772ca6
Author: Sandro Jäckel <sandro.jaeckel@gmail.com>
Date:   Wed Aug 7 09:19:20 2019 +0200

    Update rootfs syntax in Docker example (#1443)

    Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>

commit b59f081d45a3ca65957900ec33772dca25a3066f
Author: Phil Frost <phil@postmates.com>
Date:   Tue Aug 6 13:08:06 2019 -0400

    Fix seconds reported by schedstat (#1426)

    Upstream bugfix: https://github.com/prometheus/procfs/pull/191

    Signed-off-by: Phil Frost <phil@postmates.com>

commit ac9a059ae81fa31f9963614483af3b5e3bfd672c
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sun Aug 4 20:15:36 2019 +0200

    Try to make it work for PowerPC

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit c81acf3b009e8538783489d1468f33faf65d8b01
Merge: c064116 75462bf
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sun Aug 4 20:14:16 2019 +0200

    Merge remote-tracking branch 'upstream/master' into power_supply_class

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit c0641162c3a432f29df30c8d0632a7756d7d2bff
Merge: 06f6e3e 0b710bb
Author: Sven Haardiek <sven@haardiek.de>
Date:   Fri Aug 2 18:30:28 2019 +0200

    Merge branch 'master' into power_supply_class

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 06f6e3e8b2a9b2e3f345b6d312a777731bb4b403
Author: Sven Haardiek <sven.haardiek@iotec-gmbh.de>
Date:   Fri Mar 22 15:36:03 2019 +0100

    Fix Pull Request comments

    * concise metric conditions
    * combine info about power supply to one metric

    Signed-off-by: Sven Haardiek <sven.haardiek@iotec-gmbh.de>

commit 785c3735c4626de56f8341f800ab7bb5e2594d08
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 18:47:52 2019 +0100

    Use sys.ttar instead of uploading the files

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit e07bff5d938457147b9009aef7d42d763018cd66
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 18:34:50 2019 +0100

    Add information about from /sys/class/power_supply

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 55b3e34840c9dfc6513ae8e69b6479d5842a3091
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 18:09:45 2019 +0100

    Use cyclecount instead of cycle_count since it is a gauge

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 602350b333cf9353d2cd0ffd40206c96ffe29941
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 18:09:25 2019 +0100

    other build options

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 5aa38f678451d5b63ffdc32336345a1ff6703725
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 18:08:56 2019 +0100

    Update fixtures

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit c6acc474a4224b8d9f7b178d0d2e02636d8629ea
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 17:20:30 2019 +0100

    Update command line parameter flag

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit f5a329e6ae5ed3b16aa866d67b944f1a73edfe42
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 17:20:06 2019 +0100

    Update procfs dependency

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 38d5fa5165643d6a44dc863b3a1696774259ac0d
Merge: 5a7ce69 28f3582
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Mar 9 16:28:29 2019 +0100

    Merge branch 'power_supply_class' of github.com:shaardie/node_exporter into power_supply_class

commit 5a7ce69505079c9c090e44448cfbd7ffb2b04df7
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Oct 20 18:55:49 2018 +0200

    Updated Metrics of Power Supply Class

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 690ab1b9c1f2e183b7088cf81c7f266d85ee6df6
Author: Sven Haardiek <sven@haardiek.de>
Date:   Fri Oct 19 20:03:42 2018 +0200

    Start work on Power Supply Collector

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 28f358222bbac4315fbf44d94da36d4b0ff2ed55
Author: Sven Haardiek <sven@haardiek.de>
Date:   Sat Oct 20 18:55:49 2018 +0200

    Updated Metrics of Power Supply Class

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

commit 751d99b818503e9a4430b10c39760f180349b294
Author: Sven Haardiek <sven@haardiek.de>
Date:   Fri Oct 19 20:03:42 2018 +0200

    Start work on Power Supply Collector

    Signed-off-by: Sven Haardiek <sven@haardiek.de>

Signed-off-by: Sven Haardiek <sven@haardiek.de>
2019-10-27 16:03:35 +01:00
Ben Kochie 74a90e81c0
Merge pull request #1486 from mknapphrt/mount_timeout
Add a flag to adjust mount timeout
2019-10-23 13:34:18 +02:00
Mark Knapp c9603c6ea2 Add a flag to adjust mount timeout
Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
2019-10-22 14:47:59 -04:00
John Belmonte 15e36e2230 fix typo in cpufreq metric names (#1510)
Signed-off-by: John Belmonte <john@neggie.net>
2019-10-11 02:12:20 +09:00
Ben Kochie fb54f7f2e0
Merge pull request #1489 from pgier/cpuinfo
add node_cpu_info metric
2019-10-08 14:58:11 +02:00
Matt Layher ce693648d3
collector: clean up DRBD collector, less global state
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-10-04 10:40:18 -04:00
Matt Layher a1659da2e7
collector: remove commented-out import from bcache collector
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-10-01 11:47:25 -04:00
Paul Gier 4d72cb8059 add node_cpu_info metric
Contains information gathered from /proc/cpuinfo

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-09-25 14:38:57 -05:00
Benjamin Drung 27b8c93a5a Use InfiniBandClass from procfs library (#1396)
Parsing the sysfs files for InfiniBand was added to the procfs library
(see https://github.com/prometheus/procfs/pull/164).

Therefore use `InfiniBandClass` from the procfs library instead of
parsing sysfs itself.

If the port counter return `N/A (no PMA)` no metric will be returned
(instead of returning 0 for this metric.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2019-09-23 18:18:35 +02:00
Ben Kochie 82b7b1f732
Merge branch 'master' into coolingDevice 2019-09-09 17:44:03 +02:00
dt-rush 93fbb93a46 fix issue where rootfs path strips to the empty string (#1464)
Change-type: patch
Connects-to: #1463
Signed-off-by: dt-rush <nickp@balena.io>
2019-09-09 17:39:24 +02:00
Paul Gier 8c3de12c22 systemd: check version for availability of properties (#1413)
The dbus property 'SystemState' and the timer property 'LastTriggerUSec'
were added in version 212 of systemd.
Check that the version of systemd is higher than 212 before attempting
to query these properties

f755e3b74b
dedabea4b3

Resolves issue #291

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-09-04 16:27:25 +02:00
Alex Schmitz 664025d60c
Scrape cooling_device state
Signed-off-by: Alex Schmitz <alex.schmitz@gmail.com>
2019-08-30 08:58:47 -05:00
Boris Momčilović 93c12e03a1 Ipvs firewall mark (#1455)
* IPVS: include firewall mark label

Signed-off-by: Boris Momčilović <boris@firstbeatmedia.com>
2019-08-27 14:24:11 +02:00
Phil Frost 26d4fbdf07 Fix seconds reported by schedstat (#1426)
Upstream bugfix: https://github.com/prometheus/procfs/pull/191

Signed-off-by: Phil Frost <phil@postmates.com>
2019-08-06 19:08:06 +02:00
Richard Kojedzinszky 75462bf4fe Scrape thermal_zone temperatures (#1425)
* Scrape thermal_zone temperatures

Signed-off-by: Richard Kojedzinszky <richard@kojedz.in>
2019-08-04 12:56:36 +02:00
Philip Gough 2d95ecaa96 Extends uname collector to export on Darwin OS (#1433)
Adds uname collector support for Darwin and OpenBSD

Signed-off-by: Philip Gough <philip.p.gough@gmail.com>
2019-08-03 12:32:43 +02:00
Dipack P Panjabi a7452023db Added mountinfo changes to node_exporter (#1417)
Use the extra information gleaned from the mountinfo file to add
a 'mountaddr' field for NFS metrics. This helps prevent prometheus from
ignoring mounts that come from the same URL, but are actually from
different IP addresses.

This commit also rebases to current master

Signed-off-by: Dipack P Panjabi <dpanjabi@hudson-trading.com>
2019-07-28 11:32:40 +02:00
Matthias Rampke b133213c7a Report non-fatal collection errors in the exporter metric. (#1439)
As per prometheus/client_golang#543, pass the Registry for exporter
metrics when setting up the /metrics HTTP handler.

With this, the `promhttp_metric_handler_errors_total` metric will
increment on (possibly non-fatal) collection-time errors, such as
duplicate metrics from text files.

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
2019-07-28 10:37:10 +02:00
dt-rush 5d3e2ce2ef properly strip path.rootfs from mountpoint labels (#1421)
Change-type: patch
Connects-to: #1418
Signed-off-by: dt-rush <nickp@balena.io>
2019-07-19 16:51:17 +02:00
Steven Kreuzer d8e47a9f9f Expose additional XFS runtime statistics (#1423)
Include directory operation, read/write system call, and vnode runtime
statistics for XFS filesystems.

Signed-off-by: Steven Kreuzer <skreuzer@FreeBSD.org>
2019-07-15 16:28:09 +02:00
detailyang 7fe9713edf bugfix: avoid nil reference when ignore is nil (#1414)
Signed-off-by: detailyang <detailyang@gmail.com>
2019-07-12 14:23:54 +02:00
Phil Frost f693a71c06 Scrape CPU latency stats from /proc/schedstat (#1389)
These are useful as a direct indication of CPU contention and task
scheduler latency.

Handy references:
 - https://github.com/torvalds/linux/blob/master/Documentation/scheduler/sched-stats.txt
 - https://doc.opensuse.org/documentation/leap/tuning/html/book.sle.tuning/cha.tuning.taskscheduler.html

procfs is updated to pull in the enabling change:
https://github.com/prometheus/procfs/pull/186

Signed-off-by: Phil Frost <phil@postmates.com>
2019-07-10 09:16:24 +02:00
秋葉 777b751f90 read /proc/net files with a single read syscall (#1380)
Signed-off-by: Hanaasagi <ambiguous404@gmail.com>
2019-07-08 15:53:14 +02:00
Derek Marcotte 3d504bc5cb Added FreeBSD zfs support per #1063. (#1394)
Based on the solaris implementation.  There's a lot of other sysctls
available on FreeBSD that aren't reported here.  It'll be easy to add,
if they're useful.  All of the sysctls are uint64.

Signed-off-by: Derek Marcotte <554b8425@razorfever.net>
2019-07-03 15:47:39 +02:00
Advait Bhatwadekar 3f49b31101 Closes issue #261 on node_exporter. (#1403)
* Closes issue #261 on node_exporter.

Delegated mdstat parsing to procfs project. mdadm_linux.go now only exports the metrics.
-> Added disk labels: "fail", "spare", "active" to indicate disk status
-> hanged metric node_md_disks_total ==> node_md_disks_required
-> Removed test cases for mdadm_linux.go, as the functionality they tested for has been moved to procfs project.

Signed-off-by: Advait Bhatwadekar <advait123@ymail.com>
2019-07-01 11:56:06 +02:00
Ben Kochie ccf27426ad
Fix 64k page e2e fixture (#1404)
Update for change in https://github.com/prometheus/node_exporter/pull/1224

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-06-28 09:53:35 +02:00
mknapphrt 3108a50fb6 Fix systemd restart counter label from state to name (#1393)
Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
2019-06-25 09:37:48 +02:00
Leonid Evdokimov 22a7dbae08 Ignore iso9600 filesystem on Linux (#1355)
The filesystem is read-only and is often used for a virtual FS
with a configuration file for a virtual machine.

Signed-off-by: Leonid Evdokimov <leon@darkk.net.ru>
2019-06-18 17:47:05 +01:00
Paul Gier 2bc133cd48 update procfs to v0.0.2 (#1376)
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-06-12 20:47:16 +02:00
Ben Kochie 8146998945
Fix rollover bug in mountstats collector (#1364)
* Update procfs vendor to pull in github.com/prometheus/procfs/pull/165
* Update mountstats collector to use new types.
* Rollover counter automatically to avoid float64 accuracy issues.
* Update e2e test.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-05-31 18:30:37 +02:00
Noam Meltzer 501ccf9fb4 Add --collector.netdev.device-whitelist flag (#1279)
* Add --collector.netdev.device-whitelist flag

Sometimes it is desired to monitor only one netdev. The golang regexp
does not support a negated regex, so the ignored-devices flag is too
cumbersome for this task.
This change introduces a new flag: accept-devices, which is mutually
exclusive to ignored-devices. This flag allows specifying ONLY the
netdev you'd like.

Signed-off-by: Noam Meltzer <noam@cynerio.co>
2019-05-31 17:55:50 +02:00
David O'Rourke 814ef064c0 meminfo: Fix the size mismatch in the swapTotal check mib for BSD. (#1345)
Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2019-05-14 17:42:36 -05:00
Ben Kochie f10c665d33
Cleanup uname Update call (#1342)
Make collector a pointer for consistency.

Fixes: https://github.com/prometheus/node_exporter/issues/1300

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-05-13 11:44:12 -05:00
Paul Gier 8b13c130b7 log pid when there is a problem reading the process stats (#1341)
Signed-off-by: Paul Gier <pgier@redhat.com>
2019-05-10 13:04:26 -05:00
Paul Gier d0a66c4c40 use sys/unix package instead of syscall (#1340)
According to the golang docs, the syscall package is deprecated.
https://golang.org/pkg/syscall
This updates collectors to use the x/sys/unix package instead.
Also updates the vendored x/sys/unix module to latest.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-05-10 13:04:06 -05:00
Daniel Hodges 7882009870 Add perf exporter (#1274)
Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2019-05-07 13:21:41 +02:00
Paul Gier 86f9079429 update procfs to latest (#1335)
Updates for procfs refactoring

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-05-07 06:38:21 +02:00
Ben Kochie 78b9eb9c2c Use 64-bit Darwin netstat counters (#1319)
Avoid 32-bit counter rollovers.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-04-25 10:07:56 +02:00
Christian Hoffmann 36e3b2a923 textfile: use opened file's mtime as timestamp (#1326)
Previously, the node_textfile_mtime_seconds metric was based on the
Fileinfo.ModTime() of the ioutil.ReadDir() return value. This is based
on lstat() and therefore has unintended consequences for symlinks
(modification time of the symlink instead of the symlink target is
returned). It is also racy as the lstat() is performed before reading
the file.

This commit changes the node_textfile_mtime_seconds metric to be based
on a fresh Stat() call on the open file.  This eliminates the race and
works as expected for symlinks. Fixes #1324.

Signed-off-by: Christian Hoffmann <mail@hoffmann-christian.info>
2019-04-18 17:47:04 +02:00
Daniele Sluijters cc2fd82008 Expose /proc/pressure (#1261)
This enables the collection of pressure stall information as exposed
by the `/proc/pressure` interface added in the 4.20 release of the
Linux kernel.

Closes #1174

Signed-off-by: Daniele Sluijters <daenney@users.noreply.github.com>
2019-04-18 12:19:20 +02:00
Paul Gier b1298677aa Early init of procfs (#1315)
Minor change to match naming convention in other collectors.

Initialize the proc or sys FS instance once while initializing
each collector instead of re-creating for each metric update.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-04-10 18:16:12 +02:00
Paul Gier cc847f2f44 collector/cpu: split cpu freq metrics into separate collector (#1253)
The cpu frequency information is not always needed and/or available.
This change allows the cpu frequency metrics to be enabled/disabled
separately from the other cpu metrics, and also prevents a frequency
metric failure (such as a parse error) from failing the main cpu
collector.

Fixes #1241

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-02-19 17:22:54 +01:00
Ben Kochie f028b81615
Update systemd blacklist (#1255)
Include additional unit types in the default systemd collector
blacklist.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-02-17 17:57:15 +01:00
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