Commit Graph

1695 Commits

Author SHA1 Message Date
Sergei Semenchuk a0c20d48db
add node_network_address_info collector (#2105)
* add node_network_address_info collector

emit (interface, addr, netmask, scope) labels for every network
interface

Signed-off-by: binjip978 <binjip978@gmail.com>
2021-09-08 14:50:25 +02:00
Johannes 'fish' Ziemke 6f1286b314 mixin: Drop mode label for num cpu metric
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2021-09-03 12:13:35 +02:00
Johannes 'fish' Ziemke fa9926c4eb mixin: Cheaper calculation for instance:node_num_cpu:sum
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2021-09-03 11:34:25 +02:00
Vladislav Rassokhin 4b9d7b63e6 Update CHANGELOG.md
Signed-off-by: Vladislav Rassokhin <vladislav.rassokhin@jetbrains.com>
2021-09-02 15:19:16 +02:00
Vladislav Rassokhin 647e84644c Update github.com/lufia/iostat to v1.1.1
New version contains fix for `panic`, see lufia/iostat#2

Signed-off-by: Vladislav Rassokhin <vladislav.rassokhin@jetbrains.com>
2021-09-02 15:19:16 +02:00
Benjamin Drung b6215e649c Add os release collector
Currently Node Exporter has a metric called `node_uname_info` which of
course exposes uname info. While this is nice, it does not help if you
are running different OSes which could have similar uname info.

Therefore parse `/etc/os-release` or `/usr/lib/os-release` and expose a
`node_os_info` metric which provide information regarding the OS
release/version of the node. Also expose the major.minor part of the OS
release version as `node_os_version`.

Since the os-release files will not change often, cache the parsed
content and only refresh the cache if the modification time changes.

This `os` collector will read files outside of `/proc` and `/sys`, but
the os-release file is widely used and the format is standardized:
https://www.freedesktop.org/software/systemd/man/os-release.html

Bug: https://github.com/prometheus/node_exporter/issues/1574
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-08-19 14:04:21 +02:00
Ben Kochie aea88e4dc5
Merge pull request #2126 from ventifus/update-safchain-ethtool
mod: update safchain/ethtool dependency.
2021-08-18 09:58:45 +02:00
W. Andrew Denton b1bb05ce25 mod: removed unused safchain/ethtool version
Signed-off-by: W. Andrew Denton <git@flying-snail.net>
2021-08-17 23:59:07 -07:00
W. Andrew Denton 31caa37b16 mod: update safchain/ethtool dependency. Closes #2125
Signed-off-by: W. Andrew Denton <git@flying-snail.net>
2021-08-17 23:49:49 -07:00
Ben Kochie 99567737c1
Merge pull request #2123 from prometheus/superq/cpuGuest
Add flag to disable guest CPU metrics
2021-08-17 14:06:43 +02:00
Ben Kochie 84b36c4fd8
Add flag to disable guest CPU metrics
In high scale virtualized / cloud environments there are typically
no guest VMs. Add a boolean flag to allow disabling the Linux guest
CPU metrics.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-08-17 13:04:46 +02:00
paulfantom 832909dd25 docs/node-mixin/alerts: make NodeFilesystemAlmostOutOfSpace fire earlier
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2021-08-16 16:35:58 +02:00
Benjamin Drung 26ca609183 ethtool: Expose node_ethtool_info metric
Add a `node_ethtool_info` metric to all ethtool devices to expose driver
information with following labels:

 * bus_info
 * driver
 * expansion_rom_version
 * firmware_version
 * version

This metric is useful to monitor the firmware version to be up-to-date.

Note: The version label might be malformed due to bug #39 in ethtool:
https://github.com/safchain/ethtool/issues/39

Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-08-16 16:09:35 +02:00
Benjamin Drung 6ac6ea2d13 ethtool: Sanitize metric names
OpenMetrics and the Prometheus exposition format require the metric name
to consist only of alphanumericals and "_", ":" and they must not start
with digits. The metric names from the ethtool stats might contain
spaces, brackets, and dots. Converting them directly to metric names
will produce invalid metric names.

Therefore sanitize the metric names and convert them to lower case.

Fixes: https://github.com/prometheus/node_exporter/issues/2083
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-08-16 15:28:27 +02:00
Ben Kochie d83d9bdfca
Merge pull request #2117 from prometheus/ethtool-metrics-include-flag
Add collector.ethtool.metrics-include
2021-08-16 12:01:18 +02:00
Johannes 'fish' Ziemke e6b5aaaff4 Add collector.ethtool.metrics-include
This adds a new flag --collector.ethtool.metrics-include to the ethtool
collector. Only metrics matching this regexp will be collected.

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2021-08-10 18:57:36 +02:00
Benjamin Drung 4356c09ebd ethtool: Use prometheus.BuildFQName
Use `prometheus.BuildFQName` everywhere in `ethtool` instead of
hard-coding the metric names.

Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-08-10 18:20:01 +02:00
Benjamin Drung 3afd382e75 Add --collector.ethtool.ignored-devices
Other network related collectors allow to filter out unwanted devices.
Add this support to the new ethtool collector as well.

Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-08-10 18:09:26 +02:00
Ben Kochie 4d0c1650b5
Merge pull request #2113 from prometheus/superq/release-1.2.2
Release 1.2.2
2021-08-06 15:41:47 +02:00
Ben Kochie 120b9b463e
Release 1.2.2
* [BUGFIX] Fix processes collector long int parsing #2112

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-08-06 14:41:30 +02:00
Ben Kochie 584972d01f
Merge pull request #2112 from prometheus/superq/debug_processes_errors
Fix processes collector long int parsing
2021-08-06 11:15:17 +02:00
Ben Kochie 5d2a4cf7fb
Fix processes collector long int parsing
Update procfs library to include ignored fields ParseInt handling.

Wrap error returns so that the user can know more about what failed.
Returns from getAllocatedThreads() are errors anyway.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-08-06 05:55:24 +02:00
Johannes 'fish' Ziemke 7fc5c6045a Read config from $
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2021-07-27 16:32:05 +02:00
ArthurSens 3731f93fd7 Refactor USE method mixin dashboards with grafonnet-lib, add multi-cluster support.
Aiming for cleaner code and following standards used on younger mixins.

Signed-off-by: ArthurSens <arthursens2005@gmail.com>
2021-07-27 16:32:05 +02:00
Ben Kochie 129b5f5b5f
Merge pull request #2098 from prometheus/superq/release-1.2.1
Release 1.2.1
2021-07-23 17:56:58 +02:00
Ben Kochie 1958a77add
Release 1.2.1
* [BUGFIX] Fix zoneinfo parsing prometheus/procfs#386
* [BUGFIX] Fix nvme collector log noise #2091
* [BUGFIX] Fix rapl collector log noise #2092

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-23 10:44:29 +02:00
Ben Kochie 747012c59a
Merge pull request #2092 from prometheus/superq/fix_energy_uj
Fix rapl collector log noise
2021-07-22 21:00:29 +02:00
Ben Kochie 3849221a8c
Merge pull request #2091 from prometheus/superq/bump_procfs_0.7.1
Bump prometheus/procfs library
2021-07-22 21:00:12 +02:00
Ben Kochie 97d4b01691
Bump prometheus/procfs library
Pull in bug fix for noisy logging.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-21 21:40:21 +02:00
Ben Kochie 502f287c96
Fix rapl collector log noise
Capture permission denied error for "energy_uj" file.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-21 19:28:54 +02:00
Frederic Hemberger 5bee84f30d docs: Replace `go get` with `go install` for command installation
`go get` is deprecated for installation of commands as of go v1.17
Ref: https://go.googlesource.com/go/+/ced0fdbad0655d63d535390b1a7126fd1fef8348

Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
2021-07-20 12:16:46 +02:00
Ben Kochie 12968948ae
Merge pull request #2078 from prometheus/superq/release_1.2
Release 1.2.0
2021-07-15 14:38:00 +02:00
Ben Kochie 138d4a20ee
Release 1.2.0
NOTE: Ignoring invalid network speed will be the default in 2.x
NOTE: Filesystem collector flags have been renamed. `--collector.filesystem.ignored-mount-points` is now `--collector.filesystem.mount-points-exclude` and `--collector.filesystem.ignored-fs-types` is now `--collector.filesystem.fs-types-exclude`. The old flags will be removed in 2.x.

* [CHANGE] Rename filesystem collector flags to match other collectors #2012
* [CHANGE] Make node_exporter print usage to STDOUT #2039
* [FEATURE] Add conntrack statistics metrics #1155
* [FEATURE] Add ethtool stats collector #1832
* [FEATURE] Add flag to ignore network speed if it is unknown #1989
* [FEATURE] Add tapestats collector for Linux #2044
* [FEATURE] Add nvme collector #2062
* [ENHANCEMENT] Add ErrorLog plumbing to promhttp #1887
* [ENHANCEMENT] Add more Infiniband counters #2019
* [ENHANCEMENT] netclass: retrieve interface names and filter before parsing #2033
* [ENHANCEMENT] Add time zone offset metric #2060
* [BUGFIX] Handle errors from disabled PSI subsystem #1983
* [BUGFIX] Fix panic when using backwards compatible flags #2000
* [BUGFIX] Fix wrong value for OpenBSD memory buffer cache #2015
* [BUGFIX] Only initiate collectors once #2048
* [BUGFIX] Handle small backwards jumps in CPU idle #2067

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-15 14:27:42 +02:00
Ben Kochie 9bd826501a
Merge pull request #2079 from prometheus/superq/fix_conntrack_error
Fix conntrack collector log noise
2021-07-15 14:27:23 +02:00
Ben Kochie 6ac7a53f45
Fix conntrack collector log noise
Fix un-handled file not found for conntrack stats.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-15 13:45:07 +02:00
Ben Kochie 6793e0e5a8
Merge pull request #2019 from treydock/ib-counters
Add more Infiniband counters
2021-07-14 13:17:31 +02:00
Ben Kochie 7029c71bcf
Merge pull request #2030 from nerzhul/patch-1
feat(rules): add NodeFileDescriptorLimit kernel exhaustion alert
2021-07-14 13:16:58 +02:00
Ben Kochie 40766fd3cc
Merge pull request #2015 from ston1th/openbsd_mem_cache_fix
Fix wrong value for OpenBSD memory buffer cache
2021-07-14 13:15:32 +02:00
Ben Kochie 371c8e4bd0
Merge pull request #2033 from jan--f/netclass-filter-before-parsing
netclass: retrieve interface names and filter before parsing
2021-07-14 13:14:20 +02:00
Ben Kochie f17a85d63d
Merge branch 'master' into netclass-filter-before-parsing 2021-07-13 11:22:46 +02:00
Ben Kochie c88ff9d07c
Merge pull request #2062 from bdrung/nvme
Add nvme collector
2021-07-12 20:02:39 +02:00
Ben Kochie a6ebe10455
Merge branch 'master' into nvme 2021-07-12 17:09:51 +02:00
Ben Kochie 84d46c069c
Merge pull request #2076 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2021-07-12 10:43:45 +02:00
Ben Kochie 59a4f3b50e
Merge pull request #2044 from luizluca/tapestats_master
Add tapestats to collect tape devices statistics
2021-07-12 10:43:11 +02:00
Luiz Angelo Daros de Luca 00aa2f34ce Add tapestats to collect tape devices statistics
It is based on diskstats to allow metrics reuse by simply
s/disk/tape/ the query.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2021-07-09 21:01:08 -03:00
prombot b673f9cfed Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-07-09 00:01:37 +00:00
Ben Kochie 2510378a56
Merge pull request #2067 from prometheus/superq/idle_jump
Handle small backwards jumps in CPU idle
2021-07-07 13:27:21 +02:00
Ben Kochie 73c9a10d37
Handle small backwards jumps in CPU idle
The Linux CPU idle stat can also jump backwards slightly in some cases.
Allow the jump back up to 3 seconds before we attempt to reset the CPU
counter cache.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-07-07 12:24:46 +02:00
Trey Dockendorf f0b2449d94 Add more IB counters
Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
2021-07-06 11:15:32 -04:00
Ben Kochie 35a2de21d4
Merge pull request #2071 from prometheus/superq/bump_procfs_0.7
Update Go modules
2021-07-06 17:10:37 +02:00