Commit graph

2195 commits

Author SHA1 Message Date
Ben Kochie a678362345
Apply v2.0.0 deprecations
* Remove deprecated collectors.
* Remove deprecated flags.
* Flip rapl label feature flag to true.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-09-11 12:00:58 +02:00
Ben Kochie 090957658e
Update logging (#3097)
Some checks failed
golangci-lint / lint (push) Has been cancelled
Switch from promlog/go-kit to promslog/slog for logging.
* Update Go build to 1.23.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-09-11 10:51:28 +02:00
tomvil 041d67d269
Add ifAlias label to netdev collector (#3087)
Signed-off-by: Tomas Vilemaitis <tomas.vilemaitis@gmail.com>
2024-09-11 09:26:34 +02:00
Ben Kochie f63b64ec63
Update Go (#3120)
Update to Go 1.23.
* Use Docker for Arm tests.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-09-11 09:17:14 +02:00
Miguel Oliveira b9d0932179
Add node_filesystem_mount_info metric (#2970)
* Add node_filesystem_mount_info metric

Fixes: #1384

---------

Signed-off-by: Miguel Oliveira <miguel.oliveira4224@gmail.com>
2024-07-14 16:33:12 +02:00
Ricardo F 8a3a0dea73
Add TCPRcvQDrop to default netstat metrics (#3021)
Signed-off-by: Ricardo F <r@rfmoz.eu>
Co-authored-by: Ricardo F <r@rfmoz.eu>
2024-07-14 16:18:22 +02:00
Ben Kochie e0c4a47a02
Add interrupts collector filtering (#3028)
In order to reduce cardinality of the interrupts collector add
filtering options
* Add include/exclude regexp filter flags.
* Add boolean flag to include zero values, enabled by default.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-07-14 16:17:20 +02:00
dependabot[bot] 2ce82ca8e8
build(deps): bump golang.org/x/sys from 0.21.0 to 0.22.0 (#3073)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.21.0 to 0.22.0.
- [Commits](https://github.com/golang/sys/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-14 14:50:21 +02:00
Pranshu Srivastava ff20a6ac48
collector/zfs: Prevent procfs integer underflow (#2961)
* collector/zfs: Prevent `procfs` integer underflow

Prevent integer underflow when parsing the `procfs` file as it used a
`ParseUint` to parse signed values.

Fixes: #2766
---------

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-07-14 14:36:30 +02:00
TJ Hoplock fdaa8fc00d
ref!: convert linux meminfo implementation to use procfs lib (#3049)
* ref!: convert linux meminfo implementation to use procfs lib

Part of #2957

Prometheus' procfs lib supports collecting memory info and we're using a
new enough version of the lib that has it available, so this converts
the meminfo collector for Linux to use data from procfs lib instead. The
bits I've touched for darwin/openbsd/netbsd are with intent to preserve
the original struct implementation/backwards compatibility.

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>

* fix: meminfo debug log unsupported value

Fixes:

```
ts=2024-06-11T19:04:55.591Z caller=meminfo.go:44 level=debug collector=meminfo msg="Set node_mem" memInfo="unsupported value type"
```

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>

* fix: don't coerce nil Meminfo entries to 0, leave out if nil

Nil entries in procfs.Meminfo fields indicate that the value isn't
present on the system. Coercing those nil values to `0` introduces new
metrics on systems that should not be present and can break some
queries.

Addresses PR feedback:
https://github.com/prometheus/node_exporter/pull/3049#discussion_r1637581536
https://github.com/prometheus/node_exporter/pull/3049#discussion_r1637584482

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>

---------

Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
2024-07-14 14:27:55 +02:00
Maarten van den Berg e8aa4de7c5
Add metrics for btrfs commit statistics (#3010)
Signed-off-by: Maarten van den Berg <maarten@channable.com>
2024-07-14 14:24:55 +02:00
Stefan Andres fe71568130
Add UIDs to dashboards (#3042)
Automatically add a uid to each dashboard.
This prevents changing URLs when restarting a grafana pod and
re-importing the dashboards via ConfigMaps.

Signed-off-by: Stefan Andres <sandres@anaconda.com>
2024-07-14 14:22:52 +02:00
Simon Krenger e11a4f0309
Add include and exclude filter for sensors in hwmon collector (#3072)
* Add include and exclude filter for sensors in hwmon collector
Fixes #2242

This commit adds two new flags (`collector.hwmon.sensor-include` and `collector.hwmon.sensor-exclude`) to the `hwmon` collector to allow inclusion or exclusion of specific sensors.

Some devices export nonsensical values for certain sensors. Here is an example:

```
node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp13"} 49.75
node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp15"} 3.892313987e+06
node_hwmon_temp_celsius{chip="platform_nct6775_656",sensor="temp16"} 3.892313987e+06
```

As a user I would like to only exclude these sensors, not necessarily the complete device (as is currently possible with the `--collector.hwmon.chip-exclude` flag) as other sensor values might be sensical or desired.

The new option filters based both on device name and sensor name, separated by a semicolon. For example, to exclude the two sensors above, the following regex can be used:

~~~
--collector.hwmon.sensor-exclude="platform_nct6775_656;temp1[5,6]"
~~~


---------

Signed-off-by: Simon Krenger <skrenger@redhat.com>
2024-07-14 13:50:06 +02:00
dependabot[bot] e0aa19aaef build(deps): bump github.com/prometheus/common from 0.53.0 to 0.55.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.53.0 to 0.55.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/RELEASE.md)
- [Commits](https://github.com/prometheus/common/compare/v0.53.0...v0.55.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-14 13:18:37 +02:00
myeunee 99dc91c1dd Fix: Change EXPERIMENTAL to Experimental in README.md
Signed-off-by: myeunee <myeunee@gmail.com>
2024-07-14 13:00:57 +02:00
mchtech ec5e4b50b8 add IRQ PSI test data
Signed-off-by: mchtech <michu_an@126.com>
2024-07-14 12:44:38 +02:00
mchtech d2a307ed93 change irq psi url
Signed-off-by: mchtech <michu_an@126.com>
2024-07-14 12:44:38 +02:00
mchtech fe5ffa916f add IRQ PSI metrics
Signed-off-by: mchtech <michu_an@126.com>
2024-07-14 12:44:38 +02:00
Pranshu Srivastava c0c1a8c572
chore: sync with latest procfs release (#3059)
Needed-for: https://github.com/prometheus/node_exporter/pull/3032

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-07-10 09:58:57 -04:00
dependabot[bot] 4cc1c177d0
build(deps): bump github.com/safchain/ethtool from 0.3.0 to 0.4.1 (#3066)
Bumps [github.com/safchain/ethtool](https://github.com/safchain/ethtool) from 0.3.0 to 0.4.1.
- [Release notes](https://github.com/safchain/ethtool/releases)
- [Commits](https://github.com/safchain/ethtool/compare/v0.3.0...v0.4.1)

---
updated-dependencies:
- dependency-name: github.com/safchain/ethtool
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-02 11:17:13 +02:00
PrometheusBot c6fa86ce90
Update common Prometheus files (#3060)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-06-25 20:01:44 +02:00
chengjoey 4f7bd3544d
fix pressure metric collection fails on systems that do not expose a full CPU stat #3051 (#3054)
Signed-off-by: joey <zchengjoey@gmail.com>
2024-06-19 11:16:10 +02:00
Benny Siegert 80859a9f18
Do not panic as much in Linux collector tests (#3050)
Running "go test" in the collector directory, without the fixtures
available, results in multiple panics, including `SIGSEGV`. Most of
these are due to incorrect error handling. This cleans them up.

Signed-off-by: Benny Siegert <bsiegert@gmail.com>
2024-06-13 20:53:25 +02:00
PrometheusBot dc185bc0f6
Update common Prometheus files (#3044)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-06-09 19:58:44 +02:00
PrometheusBot 8aaf6905df
Update common Prometheus files (#3040)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-06-09 12:01:48 +02:00
kangjie dae4c87f7d
slab-collector: add filter for slab name. (#3041)
Signed-off-by: Kangjie Xu <kanxu@ebay.com>
Co-authored-by: Kangjie Xu <kanxu@ebay.com>
2024-06-06 18:37:22 +02:00
dependabot[bot] 6603633c0e
build(deps): bump github.com/prometheus/client_golang (#3035)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 10:32:32 +02:00
dependabot[bot] 67579cd162
build(deps): bump github.com/beevik/ntp from 1.3.1 to 1.4.3 (#3036)
Bumps [github.com/beevik/ntp](https://github.com/beevik/ntp) from 1.3.1 to 1.4.3.
- [Release notes](https://github.com/beevik/ntp/releases)
- [Changelog](https://github.com/beevik/ntp/blob/main/RELEASE_NOTES.md)
- [Commits](https://github.com/beevik/ntp/compare/v1.3.1...v1.4.3)

---
updated-dependencies:
- dependency-name: github.com/beevik/ntp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 10:32:04 +02:00
dependabot[bot] 5b6b5d7541
build(deps): bump github.com/jsimonetti/rtnetlink from 1.4.1 to 1.4.2 (#3034)
Bumps [github.com/jsimonetti/rtnetlink](https://github.com/jsimonetti/rtnetlink) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/jsimonetti/rtnetlink/releases)
- [Commits](https://github.com/jsimonetti/rtnetlink/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/jsimonetti/rtnetlink
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 09:00:13 +02:00
dependabot[bot] 92d5a84ab2
build(deps): bump github.com/mdlayher/wifi from 0.1.0 to 0.2.0 (#3038)
Bumps [github.com/mdlayher/wifi](https://github.com/mdlayher/wifi) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/mdlayher/wifi/releases)
- [Commits](https://github.com/mdlayher/wifi/compare/v0.1.0...v0.2.0)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/wifi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-02 08:59:07 +02:00
prombot 40b32e64bc Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-05-29 13:04:28 +02:00
Ben Kochie 0d3400ebc9
Release v1.8.1 (#3018)
* [BUGFIX] Fix CPU seconds on Solaris #2963
* [BUGFIX] Sign Darwin/MacOS binaries #3008
* [BUGFIX] Fix pressure collector nil reference #3016

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-05-21 18:25:19 +02:00
Ben Kochie 3afc0a341e
Fix pressure collector nil reference (#3016)
Check that the PSI metrics are returned in order to avoid nil pointer
dereference.
* Update fixutre to match real-world samples.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-05-16 08:38:58 +02:00
Pranshu Srivastava 66fab10db4
collector/cpu: s/cpu_ticks*/cpu_nsec* for solaris (#2963)
Replace all cpu_ticks_* with cpu_nsec_*, since the former was off my a
magnitude of 10e6, and showed incorrect values for
node_cpu_seconds_total.

Fixes: #1837

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-05-15 09:13:32 +02:00
Alper Polat 2ecbe97066
Sign node exporter darwin binary with rcodesign (#3008)
* Sign node exporter darwin binary with rcodesign

Prevents SIGKILL issues on macs

Signed-off-by: Alper Polat <gitperr@gmail.com>

* Be explicit about checking for the binary

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Alper Polat <101826653+gitperr@users.noreply.github.com>

* Also attempt to sign darwin-amd64

Signed-off-by: Alper Polat <gitperr@gmail.com>

---------

Signed-off-by: Alper Polat <gitperr@gmail.com>
Signed-off-by: Alper Polat <101826653+gitperr@users.noreply.github.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2024-05-02 20:13:10 +02:00
PrometheusBot 5a4e691f35
Update common Prometheus files (#3009)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-05-02 20:12:32 +02:00
Sam Leiken 9572e7a07b
Add logging for ethtool device include/exclude and metrics include flags (#2979)
Signed-off-by: Sam Leiken <sam.k.leiken@gmail.com>
2024-04-29 19:38:29 +02:00
Ben Kochie cadb1d1190
Release v1.8.0 (#3002)
* [CHANGE] exec_bsd: Fix labels for `vm.stats.sys.v_syscall` sysctl #2895
* [CHANGE] diskstats: Ignore zram devices on linux systems #2898
* [CHANGE] textfile: Avoid inconsistent help-texts  #2962
* [CHANGE] os: Removed caching of modtime/filename of os-release file #2987
* [FEATURE] xfrm: Add new collector #2866
* [FEATURE] watchdog: Add new collector #2880
* [ENHANCEMENT] cpu_vulnerabilities: Add mitigation information label #2806
* [ENHANCEMENT] nfsd: Handle new `wdeleg_getattr` attribute #2810
* [ENHANCEMENT] netstat: Add TCPOFOQueue to default netstat metrics #2867
* [ENHANCEMENT] filesystem: surface device errors #2923
* [ENHANCEMENT] os: Add support end parsing #2982
* [ENHANCEMENT] zfs: Log mib when sysctl read fails on FreeBSD #2975
* [ENHANCEMENT] fibre_channel: update procfs to take into account optional attributes #2933
* [BUGFIX] cpu: Fix debug log in cpu collector #2857
* [BUGFIX] hwmon: Fix hwmon nil ptr #2873
* [BUGFIX] hwmon: Fix hwmon error capture #2915
* [BUGFIX] zfs: Revert "Add ZFS freebsd per dataset stats #2925
* [BUGFIX] ethtool: Sanitize ethtool metric name keys #2940
* [BUGFIX] fix: data race of NetClassCollector metrics initialization #2995

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-04-24 15:14:02 +02:00
Chris Cleeland d333366914
Fix watchdog_test lint and test failures on macos. (#3003)
Ensure identical build flags embedded in both files.

Signed-off-by: Chris Cleeland <chris.cleeland@gmail.com>
2024-04-22 22:34:00 +02:00
Ben Kochie acb36765b4
Update build (#3000)
* Update Go to 1.22.
* Update Go modules.
* Use new version collector.
* Use standard library slices package.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-04-20 12:32:49 +02:00
PrometheusBot 5c4f9e727d
Update common Prometheus files (#2992)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-04-19 17:16:11 +02:00
John Guo e9e27138a8
fix: data race of NetClassCollector metrics initialization when multiple requests happen (#2995)
Signed-off-by: John Guo <john@johng.cn>
2024-04-19 17:15:54 +02:00
dependabot[bot] dc5d3ca0ae
build(deps): bump golang.org/x/net from 0.20.0 to 0.23.0 (#2996)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 17:15:14 +02:00
Jonathan Davies 36e0d1f6d4
os_release.go: Removed caching of modtime/filename of os-release file. (#2987)
Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2024-04-17 21:27:47 +02:00
coderwander 0202220881
refactor: Optimize code by using built-in constants in the standard library (#2989)
Signed-off-by: coderwander <770732124@qq.com>
2024-04-16 09:43:16 +02:00
Ayoub Mrini bf67c859bb
fibre_channel: update procfs to take into account optional attributes (#2933)
Signed-off-by: machine424 <ayoubmrini424@gmail.com>
2024-04-15 11:52:59 +02:00
looklose 7d4103c089 chore: fix typo in comment
Signed-off-by: looklose <shishuaiqun@yeah.net>
2024-04-10 14:24:02 +02:00
Daniel Kimsey 29cdbd63fe zfs: Log mib when sysctl read fails on FreeBSD
When the zfs collector fails on FreeBSD it doesn't log which `mib` triggered the issue. This makes diagnostics hard.

Incompatibilities in the list of supported mibs is not uncommon with major os updates. By adding this change, it'll be easier for users to report the specific mib that is triggering the failure.

Related to #2847

Signed-off-by: Daniel Kimsey <90741+dekimsey@users.noreply.github.com>
2024-04-10 12:44:05 +02:00
Jonathan Davies b6227af54b
os_release.go: Added support end parsing support. (#2982)
* os_release.go: Added support end parsing support.

Fixes: #2977

Signed-off-by: Jonathan Davies <jpds@protonmail.com>

* os_release_test.go: Added TestParseOSSupportEnd.

Signed-off-by: Jonathan Davies <jpds@protonmail.com>

---------

Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2024-04-03 12:23:03 +02:00
PrometheusBot 3accd4cf82
Update common Prometheus files (#2973)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-03-24 15:00:46 +01:00