Compare commits

..

315 commits

Author SHA1 Message Date
Ben Kochie be19d537cd
Fix Go minimum version (#3378)
Update `github.com/safchain/ethtool` to fix Go 1.23.x backwards
compatibility.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-08-07 12:34:08 +02:00
dependabot[bot] e2f4986c64
build(deps): bump github.com/opencontainers/selinux (#3300)
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.11.1 to 1.12.0.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.11.1...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/selinux
  dependency-version: 1.12.0
  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>
2025-08-06 18:53:09 +02:00
dependabot[bot] 7a62ec931e
build(deps): bump github.com/prometheus/client_golang (#3370)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.21.1 to 1.23.0.
- [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.21.1...v1.23.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-version: 1.23.0
  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>
2025-08-06 18:15:11 +02:00
dependabot[bot] 2a25c1f8f8
build(deps): bump github.com/mdlayher/wifi from 0.5.0 to 0.6.0 (#3372)
Bumps [github.com/mdlayher/wifi](https://github.com/mdlayher/wifi) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/mdlayher/wifi/releases)
- [Commits](https://github.com/mdlayher/wifi/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/wifi
  dependency-version: 0.6.0
  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>
2025-08-06 18:14:57 +02:00
dependabot[bot] 744cee7e19
build(deps): bump github.com/prometheus/common from 0.64.0 to 0.65.0 (#3369)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.64.0 to 0.65.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.64.0...v0.65.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-version: 0.65.0
  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>
2025-08-06 17:52:32 +02:00
dependabot[bot] a8ec35353f
build(deps): bump golang.org/x/sys from 0.33.0 to 0.34.0 (#3371)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.33.0 to 0.34.0.
- [Commits](https://github.com/golang/sys/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.34.0
  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>
2025-08-06 17:51:21 +02:00
Bryan Boreham b57f5bab2d
Fix logging race in systemd_linux.go (#3364)
The same variable was used for timing every parallel operation.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-07-26 19:35:01 +02:00
Naoki MATSUMOTO 05c68e2040
Add collector for PCIe devices with link information (#3339)
* Add collector for PCIe devices with link information

The link status of PCIe devices sometimes changes,
like link or speed downgrades, and devices disappear.
This patch collects PCIe devices' link infromation  to detect such failures.

As a first step, this collector exports PCIe devices'
- Device information (vendor_id, device_id, etc.)
- Parent PCIe device (e.g. PCIe bridge, PCIe switch)
- Link status (max_link_{transfers_per_second|width}, current_link_{transfers_per_second|width})

---------

Signed-off-by: Naoki MATSUMOTO <m.naoki9911@gmail.com>
2025-07-25 15:58:50 +02:00
dependabot[bot] 581a9090e4
build(deps): bump github.com/jsimonetti/rtnetlink/v2 from 2.0.2 to 2.0.5 (#3353)
Bumps [github.com/jsimonetti/rtnetlink/v2](https://github.com/jsimonetti/rtnetlink) from 2.0.2 to 2.0.5.
- [Release notes](https://github.com/jsimonetti/rtnetlink/releases)
- [Commits](https://github.com/jsimonetti/rtnetlink/compare/v2.0.2...v2.0.5)

---
updated-dependencies:
- dependency-name: github.com/jsimonetti/rtnetlink/v2
  dependency-version: 2.0.5
  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>
2025-07-07 15:17:10 +02:00
dependabot[bot] ac8754aa82
build(deps): bump github.com/safchain/ethtool from 0.5.10 to 0.6.1 (#3342)
Bumps [github.com/safchain/ethtool](https://github.com/safchain/ethtool) from 0.5.10 to 0.6.1.
- [Release notes](https://github.com/safchain/ethtool/releases)
- [Commits](https://github.com/safchain/ethtool/compare/v0.5.10...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/safchain/ethtool
  dependency-version: 0.6.1
  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>
2025-07-07 15:15:46 +02:00
dependabot[bot] d704ad2886
build(deps): bump github.com/mdlayher/ethtool from 0.2.0 to 0.4.0 (#3343)
Bumps [github.com/mdlayher/ethtool](https://github.com/mdlayher/ethtool) from 0.2.0 to 0.4.0.
- [Release notes](https://github.com/mdlayher/ethtool/releases)
- [Commits](https://github.com/mdlayher/ethtool/compare/v0.2.0...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/ethtool
  dependency-version: 0.4.0
  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>
2025-07-07 15:03:07 +02:00
Ben Kochie 6588cc636b
Update procfs library (#3355)
Update procfs library and adjust fixtures for update.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-07-07 15:02:39 +02:00
mengxun 2179f0a34d
fix:use %w to wrap error (#3345)
Signed-off-by: mengxun <mengxun1122@163.com>
2025-06-11 17:00:43 +02:00
Manuel Rüger 2a2f16cd28
chore: Lint with golangci-lint v2 (#3301)
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2025-05-31 08:08:50 +02:00
Michael Fuller 3c96dfb981 go.mod: bump procfs to 0.16.1, go mod tidy
Signed-off-by: Michael Fuller <mfuller@lambdal.com>
2025-05-30 12:47:42 +02:00
dependabot[bot] c8e1789774 build(deps): bump github.com/prometheus/common from 0.62.0 to 0.63.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.62.0 to 0.63.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.62.0...v0.63.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-30 12:45:42 +02:00
Johannes Ziemke 7e801c90c3 AIX: Add netinterface collector
While having overlap with NetAdpter metrics, the metrics are slightly different
so need to be exposed as well.

Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 709388ed15 AIX: Fix disk blocks to bytes conversion
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 4d053b94a9 AIX: Remove redundant disk blocks metric, fix times
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 0e8817612a AIX: Fix physical cpu usage calculation
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 940e73b895 AIX: Add context switches to cpu collector
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 0cb7b61fd6 AIX: Add partition stats
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 430023e7e2 AIX: Add netadapter collision counters
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 481b824b08 AIX: Add transmit_queue_overflow metric to netdev collector
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 65d2538f14 AIX: Add paging memory metrics
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 2c33bc58ea AIX: Add more disk metrics
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Johannes Ziemke 853af0cec0 AIX: Add physical cpu, runqueue and flag metrics
Signed-off-by: Johannes Ziemke <github@5pi.de>
2025-05-28 19:19:02 +02:00
Nabil e942bae99f
chore: fix some typos (#3316)
Signed-off-by: Nabil <nabilcharaf37@gmail.com>
2025-05-21 19:53:59 +02:00
dependabot[bot] 467d1f3d7d
build(deps): bump golang.org/x/sys from 0.30.0 to 0.32.0 (#3324)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.30.0 to 0.32.0.
- [Commits](https://github.com/golang/sys/compare/v0.30.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.32.0
  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>
2025-05-19 11:48:03 +02:00
Guillaume E. 45eb59d29e
Fix ethtool returning 0 for sanitized metrics (#3335)
The ethtool_linux looks for ethtool stats with their sanitized name
which might be different from the name provisioned by ethtool.

This caused node-exporter to return a 0-value for sanitized metrics.

This patch works-around the missing key by copying ethtool stats
to another map under their sanitized name.

Signed-off-by: Guillaume Espanel <guillaume.espanel@ovhcloud.com>
Co-authored-by: Guillaume Espanel <guillaume.espanel@ovhcloud.com>
2025-05-19 11:41:17 +02:00
dependabot[bot] 67ebd4c4ff
build(deps): bump github.com/mdlayher/wifi from 0.3.1 to 0.5.0 (#3323)
Bumps [github.com/mdlayher/wifi](https://github.com/mdlayher/wifi) from 0.3.1 to 0.5.0.
- [Release notes](https://github.com/mdlayher/wifi/releases)
- [Commits](https://github.com/mdlayher/wifi/compare/v0.3.1...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/wifi
  dependency-version: 0.5.0
  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>
2025-05-18 11:54:03 +02:00
Siavash Safi 979a349637
fix: darwin netdev i/o bytes metric (#3336)
There is a bug in darwin kernel since macOS Ventura 13.2.1,
which results in interface i/o bytes values to be truncated at 4GiB.
This change uses a workaround to collect the same metrics,
taking advantage of another bug.

fixes #3333

Signed-off-by: Siavash Safi <git@hosted.run>
2025-05-18 11:53:48 +02:00
Charlie Chiang 43fb05c81d
Fix macos filesystem collector cgo memory leak (#3315)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2025-05-15 08:41:20 +02:00
Ben Kochie 38d32a3977
pressure: Fix missing IRQ on older kernels (#3263)
Fix "no data" error on kernels that support some PSI status, but don't
yet have IRQ presure metrics. Only report "no data" error if `pressure`
is enabled and no PSI metrics were found.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-03-31 17:52:53 +02:00
dependabot[bot] 2401158dd7
build(deps): bump golang.org/x/net from 0.33.0 to 0.36.0 (#3266)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.36.0.
- [Commits](https://github.com/golang/net/compare/v0.33.0...v0.36.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>
2025-03-31 12:47:56 +02:00
dependabot[bot] e44309c825
build(deps): bump github.com/prometheus/client_golang from 1.20.5 to 1.21.0 (#3262)
* build(deps): bump github.com/prometheus/client_golang

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.5 to 1.21.0.
- [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.20.5...v1.21.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update e2e fixtures for new client_golang.

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2025-03-31 12:47:39 +02:00
Manuel Rüger 8804ce1551
diskstats: Simplify condition (#3290)
As the comment says, this can be simplified now.

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2025-03-31 12:47:22 +02:00
Ben Kochie e5caa394c8
Sanitize darwin thermal strings (#3294)
Use `utils.SafeBytesToString()` to sanitize C strings the Darwin
thermal collector.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-03-31 12:46:39 +02:00
PrometheusBot 8c3f1a2da3
Update common Prometheus files (#3291)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2025-03-31 11:00:53 +02:00
Ben Kochie 729a03136f
Fix OpenBSD interrupt device parsing (#3288)
Sanitize zero terminated strings from OpenBSD device name parsing.
* Add byte-to-string util function.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-03-31 11:00:34 +02:00
Ben Kochie e768aad83d
Fix flaky Solaris test (#3289)
Ignore `node_cpu_frequency_max_hertz` to fix flaky Solaris end-to-end
test.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-03-28 10:48:44 +01:00
PrometheusBot 93b79b44bd
Update common Prometheus files (#3286)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2025-03-27 18:56:08 +01:00
PrometheusBot 9b898b8df4
Update common Prometheus files (#3264)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2025-03-27 11:45:52 +01:00
Ben Kochie 58ac08e216
Fix linter warning (#3280)
Fix S1009: should omit nil check; len() for nil maps is defined as zero (gosimple)

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-03-27 09:57:33 +01:00
Rolf Klemenz 47e2bb34ce
Avoid memory leak by using value rather than reference. (#3277)
Signed-off-by: Rolf Klemenz <tickez@madnet.ch>
2025-03-26 15:30:46 +01:00
Ben Kochie 5d458955be
Update Go to 1.24 (#3273)
* Update Go to 1.24 for all builds.
* Update minimum Go version to 1.23.
* Bump procfs library.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-03-26 09:46:27 +01:00
Pranshu Srivastava 0c10545e8d
collector/mdadm: Support RAID metrics (#3031)
Use `sysfs` for RAID stats.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-02-24 10:19:48 +01:00
Ibrahim Awwad 6cfb6437fc
feat: add SystemdVirtualization type (#3254)
* feat: add SystemdVirtualization type
---------

Signed-off-by: IbraAoad <Ibrahim.Awwad@canonical.com>
Signed-off-by: Ibrahim Awwad <ibraaoad@gmail.com>
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Signed-off-by: Alexander Soelberg Heidarsson <89837986+alex5517@users.noreply.github.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Co-authored-by: Alexander Soelberg Heidarsson <89837986+alex5517@users.noreply.github.com>
2025-02-23 13:26:37 +01:00
Alexander Soelberg Heidarsson ae746c8b1d bugfix: 🐛 remove invalid variable from cluster use dashboards
Signed-off-by: Alexander Soelberg Heidarsson <89837986+alex5517@users.noreply.github.com>
2025-02-20 08:25:48 +01:00
Mikel Olasagasti Uranga 7c69600661
build(deps): remove leftover from #3160 (#3255)
Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
2025-02-19 12:34:16 +01:00
Ben Kochie 8107c3f6c4
Fixup README formatting (#3251)
Remove formatting that doesn't render properly.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-02-17 18:45:49 +01:00
Ben Kochie d611fb2504 Update status badges
* Remove obsolete buildkite badge.
* Add GitHub actions workflow badges.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-02-17 12:07:51 +01:00
Ben Kochie 02afa5c53c
Release v1.9.0 (#3248)
* [CHANGE] meminfo: Convert linux implementation to use procfs lib #3049
* [CHANGE] Update logging to use Go log/slog #3097
* [FEATURE] filesystem: Add `node_filesystem_mount_info` metric #2970
* [FEATURE] btrfs: Add metrics for commit statistics #3010
* [FEATURE] interrupts: Add collector include/exclude filtering #3028
* [FEATURE] interrupts: Add "exclude zeros" filtering #3028
* [FEATURE] slabinfo: Add filters for slab name. #3041
* [FEATURE] pressure: add IRQ PSI metrics #3048
* [FEATURE] hwmon: Add include and exclude filter for sensors #3072
* [FEATURE] filesystem: Add NetBSD support #3082
* [FEATURE] netdev: Add ifAlias label #3087
* [FEATURE] hwmon: Add Support for GPU Clock Frequencies #3093
* [FEATURE] Add `exclude[]` URL parameter #3116
* [FEATURE] Add AIX support #3136
* [FEATURE] filesystem: Add fs-types/mount-points include flags #3171
* [FEATURE] netstat: Add collector for tcp packet counters for FreeBSD. #3177
* [ENHANCEMENT] ethtool: Add logging for filtering flags #2979
* [ENHANCEMENT] netstat: Add TCPRcvQDrop to default metrics #3021
* [ENHANCEMENT] diskstats: Add block device rotational #3022
* [ENHANCEMENT] cpu: Support CPU online status #3032
* [ENHANCEMENT] arp: optimize interface name resolution #3133
* [ENHANCEMENT] textfile: Allow specifiying multiple directory globs #3135
* [ENHANCEMENT] filesystem: Add reporting of purgeable space on MacOS #3206
* [ENHANCEMENT] ethtool: Skip full scan of NetClass directories #3239
* [BUGFIX] zfs: Prevent `procfs` integer underflow #2961
* [BUGFIX] pressure: Fix collection on systems that do not expose a full CPU stat #3054
* [BUGFIX] cpu: Fix FreeBSD 32-bit host support and plug memory leak #3083
* [BUGFIX] hwmon: Add safety check to hwmon read #3134
* [BUGFIX] zfs: Allow space in dataset name #3186

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-02-17 08:08:51 +01:00
dependabot[bot] 4d2912d49a
build(deps): bump golang.org/x/sys from 0.29.0 to 0.30.0 (#3247)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.29.0 to 0.30.0.
- [Commits](https://github.com/golang/sys/compare/v0.29.0...v0.30.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>
2025-02-16 16:21:59 +01:00
dependabot[bot] 8746b4e923
build(deps): bump github.com/safchain/ethtool from 0.5.9 to 0.5.10 (#3245)
Bumps [github.com/safchain/ethtool](https://github.com/safchain/ethtool) from 0.5.9 to 0.5.10.
- [Release notes](https://github.com/safchain/ethtool/releases)
- [Commits](https://github.com/safchain/ethtool/compare/v0.5.9...v0.5.10)

---
updated-dependencies:
- dependency-name: github.com/safchain/ethtool
  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>
2025-02-16 15:56:35 +01:00
dependabot[bot] 69817e0833
build(deps): bump github.com/prometheus/exporter-toolkit (#3246)
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.13.2 to 0.14.0.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.13.2...v0.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  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>
2025-02-16 12:04:24 +01:00
Tobias Nygren cab75a8011
collector/cpu_netbsd: fix 32-bit host support and plug memory leak (#3083)
Signed-off-by: Ben Kochie <superq@gmail.com>
2025-02-16 11:40:29 +01:00
v-zhuravlev f252c4616a
Add NodeSystemdServiceCrashlooping alert to mixin (#3039)
* Add NodeSystemdServiceCrashlooping alert

---------

Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2025-02-16 11:05:46 +01:00
Will Jordan edc40d1e0b
collector/ethtool: skip full scan of NetClass directories (#3239)
ethtool only uses the device names from `NetClassDevices()`,
not the whole NetClass data from `NetClass()`.
Improves ethtool collector performance on systems with lots of excluded devices.

Signed-off-by: Will Jordan <will.jordan@gmail.com>
2025-02-15 09:32:59 +01:00
Pranshu Srivastava 2f2113376f
chore: ignore/include metrics for FreeBSD (#3242)
* chore: ignore/include metrics for FreeBSD

Ignore non-deterministic metrics and include deterministic ones.

Use go123 for NetBSD from upstream release channel rather than the
package manager as that doesn't exist.
* https://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/10.0_2024Q4/All/

---------

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-02-15 09:31:59 +01:00
PrometheusBot 11365f97be
Update common Prometheus files (#3240)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2025-02-09 09:23:10 +01:00
Pranshu Srivastava 5340ad60c0 fixup! fixup! fixup! chore: add xBSD pipelines
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-02-04 10:45:56 +01:00
Pranshu Srivastava 84ba99722c fixup! fixup! chore: add xBSD pipelines
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-02-04 10:45:56 +01:00
Pranshu Srivastava 0cceb77065 fixup! chore: add xBSD pipelines
Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-02-04 10:45:56 +01:00
Pranshu Srivastava 3430dcfab8 chore: add xBSD pipelines
For integration tests.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

chore: support non-linux GOOS in e2e tests

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

chore: support e2e tests on freebsd

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

chore: support e2e tests on openbsd

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

chore: support e2e tests on netbsd

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

chore: support e2e tests on solaris

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

chore: support e2e tests on dragonfly

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>

chore: drop support for e2e tests on solaris

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-02-04 10:45:56 +01:00
Ben Kochie 38f71f576c
Fix unused value (#3236)
Remove unused `queueDescs` value from diskstats collector.

Signed-off-by: Ben Kochie <superq@gmail.com>
2025-02-04 09:57:00 +01:00
Pranshu Srivastava 9889bcd757
collector/diskstats: add block device rotational (#3022)
* collector/diskstats: add block device rotational

Add metric to indicate if a device is rotational or not.

Fixes: #2956

---------

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2025-02-04 09:39:42 +01:00
dependabot[bot] b6b8288211 build(deps): bump github.com/prometheus/common from 0.61.0 to 0.62.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.61.0 to 0.62.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.61.0...v0.62.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>
2025-02-02 11:55:05 +01:00
dependabot[bot] b50b9e9830 build(deps): bump golang.org/x/sys from 0.28.0 to 0.29.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.28.0 to 0.29.0.
- [Commits](https://github.com/golang/sys/compare/v0.28.0...v0.29.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>
2025-02-02 11:54:53 +01:00
khafatech e056e1b906
zfs: Allow space in dataset name (#3186)
* zfs: Allow space in dataset name

Signed-off-by: Mustafa Khafateh <m@khafateh.com>

* zfs: update fixture output for arm64

Signed-off-by: Mustafa Khafateh <m@khafateh.com>

* zfs: change pool3 name in fixture objsets

Signed-off-by: Mustafa Khafateh <m@khafateh.com>

* zfs: rename pool3 consistently in test case

Signed-off-by: Mustafa Khafateh <m@khafateh.com>

* zfs: Update amd64 e2e fixtures output

Signed-off-by: Mustafa Khafateh <m@khafateh.com>

---------

Signed-off-by: Mustafa Khafateh <m@khafateh.com>
2025-02-02 11:50:41 +01:00
K Rin 43dfdcea5c
Add collector for netstats tcp packet counters for FreeBSD. (#3177)
* Add collector for netstats tcp packet counters for FreeBSD.

Signed-off-by: K Rin <rin@sandb0x.tw>

* Update collector/netstat_freebsd.go to keep the naming convention

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: K Rin <sandb0x.tw0913@gmail.com>

---------

Signed-off-by: K Rin <rin@sandb0x.tw>
Signed-off-by: K Rin <sandb0x.tw0913@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2025-02-02 11:32:08 +01:00
Denis Fondras 963158df0a
Enable purgeable space reporting (#3206)
Signed-off-by: Denis <denis@jig-ai.ledeuns.net>
Co-authored-by: Denis <denis@jig-ai.ledeuns.net>
2025-02-02 11:16:00 +01:00
Vitaly Orlov 810510e12b
Export newUnameCollector function in uname.go (#3227)
Signed-off-by: Vitaly Orlov <orloff.v@gmail.com>
2025-01-25 20:52:46 +01:00
PrometheusBot c46d1f23d0
Update common Prometheus files (#3226)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2025-01-16 10:03:38 +01:00
Daniel Swarbrick acdd9b813d
arp: optimize netlink interface name resolution (#3133)
github.com/jsimonetti/rtnetlink provides a high level rtnl wrapper
around the lower level rtnetlink functions, which essentially does all
that we need. The rtnl.Conn.Neighbors uses an internal cache for
resolving interface indexes to names, so it makes at most one rtnetlink
call per interface to resolve the name.

Using this high level wrapper hugely simplifies our code and makes it
easier to understand and maintain.

Fixes: #3075

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2025-01-10 10:58:08 +01:00
Xuhui Zhu 8f9a914bee add arm test
Signed-off-by: Xuhui Zhu <simon.zhu@canonical.com>
2025-01-02 12:56:17 +01:00
Xuhui Zhu 0c1af8dfe0 add test
Signed-off-by: Xuhui Zhu <simon.zhu@canonical.com>
2025-01-02 12:56:17 +01:00
Xuhui Zhu 89a21a9c4c restruct code
Signed-off-by: Xuhui Zhu <simon.zhu@canonical.com>
2025-01-02 12:56:17 +01:00
Xuhui Zhu 6f3c345632 add gpu clk
Signed-off-by: Xuhui Zhu <simon.zhu@canonical.com>
2025-01-02 12:56:17 +01:00
dependabot[bot] 3ed9edfde7
build(deps): bump github.com/mdlayher/wifi from 0.3.0 to 0.3.1 (#3219)
Bumps [github.com/mdlayher/wifi](https://github.com/mdlayher/wifi) from 0.3.0 to 0.3.1.
- [Release notes](https://github.com/mdlayher/wifi/releases)
- [Commits](https://github.com/mdlayher/wifi/compare/v0.3.0...v0.3.1)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/wifi
  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>
2025-01-01 18:08:28 +01:00
PrometheusBot c3c8645923
Update common Prometheus files (#3218)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-12-29 19:18:49 +01:00
Pranshu Srivastava b8aac7c92e collector/cpu: Support CPU online status
Blocked by: https://github.com/prometheus/procfs/pull/644.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-12-23 11:37:39 +01:00
Pranshu Srivastava 2b5cef3561 fix: address master issues
Sync dependencies and log using the machinery introduced in #3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-12-23 11:37:39 +01:00
liyang 505363a67d chore: add instance label in NodeHighNumberConntrackEntriesUsed alert description
Signed-off-by: liyang <ly18846162402@163.com>
2024-12-23 11:25:05 +01:00
Duologic 2fccdf4e17 fix(docs): add node(Warning|Critical)WindowHours to node-mixin
Signed-off-by: Duologic <jeroen@simplistic.be>
2024-12-23 11:24:50 +01:00
Tom d0c1d00d18
Migrate dashboards to new grafonnet library (#3147)
Migrated away from deprecated Grafonnet library. This replaces panels using Angular JS which are disabled by default in Grafana 11 and will be unsupported in Grafana 12.

Fixes #3046

---------

Signed-off-by: Tom <12222103+critchtionary@users.noreply.github.com>
2024-12-19 16:49:22 +01:00
Ben Kochie ff97e35a71 Enable goimports linter
Enable `goimports` golangci-lint linter and fix issues.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-12-19 14:46:58 +01:00
dependabot[bot] 983e6345d5
build(deps): bump github.com/prometheus/exporter-toolkit (#3211)
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.13.1 to 0.13.2.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.13.1...v0.13.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  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-12-17 18:22:08 +01:00
Jan Breitkopf a38a5d7b48
alerts: exclude iowait from NodeCPUHighUsage alert (#3203)
Signed-off-by: Jan Breitkopf <jan.breitkopf@prorocketeers.com>
2024-12-17 14:11:26 +01:00
dependabot[bot] 2604d19246
build(deps): bump github.com/safchain/ethtool from 0.4.1 to 0.5.9 (#3195)
Bumps [github.com/safchain/ethtool](https://github.com/safchain/ethtool) from 0.4.1 to 0.5.9.
- [Release notes](https://github.com/safchain/ethtool/releases)
- [Commits](https://github.com/safchain/ethtool/compare/v0.4.1...v0.5.9)

---
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-12-17 14:04:22 +01:00
Ben Kochie 226c80c83c Add filesystem include flags
Add support for allow lists of filesystem mount points and filesystem
types. This allows for less messy regexps when you want to target only
specific lists of mount points or filesystem types.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-12-14 14:14:54 +01:00
PrometheusBot cf8c6891cc
Update common Prometheus files (#3188)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-26 12:17:19 +01:00
PrometheusBot 49d177bf95
Update common Prometheus files (#3182)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-12 19:21:23 +01:00
PrometheusBot a7b403a484
Update common Prometheus files (#3181)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-11 19:13:13 +01:00
dependabot[bot] 5122c7cc37
build(deps): bump github.com/prometheus/exporter-toolkit (#3168)
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.13.0 to 0.13.1.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.13.0...v0.13.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  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-11-11 08:45:18 +01:00
PrometheusBot c29cb9181b
Update common Prometheus files (#3173)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-11-11 08:44:55 +01:00
mknapphrt 0fddfd1ba5
Cache metricsfamily help text (#3175)
Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
2024-11-07 21:46:38 +01:00
dependabot[bot] 07ee8efaa4 build(deps): bump github.com/prometheus/common from 0.60.0 to 0.60.1
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.60.0 to 0.60.1.
- [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.60.0...v0.60.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-02 08:48:24 +00:00
dependabot[bot] 957fc53748 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.4 to 1.20.5.
- [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.20.4...v1.20.5)

---
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>
2024-11-02 08:48:10 +00:00
dependabot[bot] 0a7582f7c2 build(deps): bump golang.org/x/sys from 0.25.0 to 0.26.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.25.0 to 0.26.0.
- [Commits](https://github.com/golang/sys/compare/v0.25.0...v0.26.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>
2024-11-02 08:48:02 +00:00
dependabot[bot] 22e1b18f2e build(deps): bump github.com/opencontainers/selinux
Bumps [github.com/opencontainers/selinux](https://github.com/opencontainers/selinux) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/opencontainers/selinux/releases)
- [Commits](https://github.com/opencontainers/selinux/compare/v1.11.0...v1.11.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-02 08:47:55 +00:00
prombot f35a592dd6 Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-10-24 12:36:11 +02:00
PrometheusBot e6a9cfbdcd
Update common Prometheus files (#3144)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-10-08 14:39:30 +02:00
dependabot[bot] e647b99231
build(deps): bump github.com/mdlayher/wifi from 0.2.0 to 0.3.0 (#3140)
Bumps [github.com/mdlayher/wifi](https://github.com/mdlayher/wifi) from 0.2.0 to 0.3.0.
- [Release notes](https://github.com/mdlayher/wifi/releases)
- [Commits](https://github.com/mdlayher/wifi/compare/v0.2.0...v0.3.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-10-08 14:39:19 +02:00
dependabot[bot] 04db3ea7ea build(deps): bump github.com/prometheus/common from 0.59.1 to 0.60.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.59.1 to 0.60.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.59.1...v0.60.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-10-07 10:54:34 +02:00
Ben Kochie 1b332edfe8 Fix: Add safety check to hwmon read
Avoid panic for accessing slice out of range in hwmon.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-09-30 15:29:38 +02:00
Daniel Swarbrick ebf3cbfbb3 zfs: drop superfluous typecasting of test values
Drop superfluous and overly pedantic typecasting for values that fit
within 32 bits or where type comparison is already hinted.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2024-09-30 14:52:38 +02:00
Daniel Swarbrick 6c96239eaa zfs: rename zfs.go to zfs_common.go
Also add build-tags to ensure it is ignored on non-relevant archs.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2024-09-30 14:52:38 +02:00
Daniel Swarbrick 770bd551db zfs: standardize case spelling of NewZFSCollector
Ensure identical factory function name across arch-specific files so
that the common init() function in zfs.go works.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2024-09-30 14:52:38 +02:00
Daniel Swarbrick b2dfaeb146 zfs: make zfsPoolStatesName an array
Code does not modify zfsPoolStatesName slice, so make it an array.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2024-09-30 14:52:38 +02:00
Daniel Swarbrick 8ea822f67a zfs: move common init function out of arch-specific files
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2024-09-30 14:52:38 +02:00
Daniel Swarbrick fafc973e94 zfs: move Linux-specific code out of zfs.go
Avoid Linux-specific code scattered in two places by moving it to the
already-existing zfs_linux.go.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2024-09-30 14:52:38 +02:00
eduarrrd 11f93d3da1
textfile: Allow specifiying multiple directory globs. (#3135)
We already support reading from multiple directories though only using globs. Now we can specify them outright.

Example use case is exporting both static info on a RO FS generated during image building and traditional uses of textfiles (e.g. for R/W service metrics files) without scripting a file copy.

* keep flag name for compatibility
* clarify flag help text
* add test case (replicating the glob one)

Signed-off-by: eduarrrd <eduarrrd@users.noreply.github.com>
2024-09-30 09:40:03 +02:00
Johannes Ziemke b5ce6bcc4d Disable osrelease collector on aix
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke 92c10f9fd1 Add AIX dashboard
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke b9e14055c1 Enable uname collector on AIX
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke 3c7109826a Add AIX netdev collector
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke 0a2a54ff2d Add AIX filesystem collector
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke 8fff2f7c67 Add AIX diskstats
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke dfd1f08739 Add AIX loadavg collector
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke 808c1a515b Add AIX meminfo
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Johannes Ziemke 2ebd807584 Add AIX CPU collector
Signed-off-by: Johannes Ziemke <github@5pi.de>
2024-09-28 15:58:02 +02:00
Steve Wills 71d9b6c061
build fix on FreeBSD (#3132)
Signed-off-by: Steve Wills <steve@mouf.net>
2024-09-24 04:25:48 +02:00
PrometheusBot a37174eccf
Update common Prometheus files (#3130)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-09-23 01:33:13 +02:00
Pranshu Srivastava 2023349c77
fix: address master issues (#3131)
Log using the machinery introduced in #3097.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-09-23 01:32:59 +02:00
Tobias Nygren a5543cc0d4
collector: add NetBSD support for filesystem (#3082)
Signed-off-by: Tobias Nygren <tnn@NetBSD.org>
2024-09-22 19:51:29 +02:00
Nils K 715a2ed674
Gracefully handle absence of environment configuration file (#3062)
node_exporter has reasonable defaults so it is able to start without explicit config.
Such a setup is common in /usr/-only images where /etc/ is an empty tmpfs upon boot.

Signed-off-by: Nils K <24257556+septatrix@users.noreply.github.com>
2024-09-22 19:34:41 +02:00
prombot 076cc405d9 Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-09-22 14:21:52 +02:00
Daniel Swarbrick 6253b08814
Bump jsimonetti/rtnetlink dependency to v2.0.2 (#3089)
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2024-09-20 19:23:06 +02:00
Siavash Safi 7a97429e57
Add exclude[] parameter (#3116)
This PR adds a `exclude[]` URL parameter to exclude specific enabled collectors.
Compared to `collect[]` parameter, the `exclude[]` parameter results in a filtered list which equals enabled collectors minus excluded ones.

Signed-off-by: Siavash Safi <git@hosted.run>
2024-09-14 19:45:47 +02:00
Ben Kochie 090957658e
Update logging (#3097)
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
Pranshu Srivastava ebddab47e1
collector/textfile: Avoid inconsistent help-texts (#2962)
Avoid metrics with inconsistent help-texts. The earlier behaviour has
been preserved in the sense that the first encountered instance is still
used to generate metrics, whereas the subsequent inconsistent ones are
ignored along with a few peripheral changes.

```
 # HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
 #TYPE node_scrape_collector_duration_seconds gauge
 node_scrape_collector_duration_seconds{collector="textfile"} 0.0004005
 # HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
 # TYPE node_scrape_collector_success gauge
 node_scrape_collector_success{collector="textfile"} 1
 # HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
 # TYPE node_textfile_mtime_seconds gauge
 node_textfile_mtime_seconds{file="/Users/rexagod/repositories/misc/node_exporter/ne-bar.prom"} 1.710812009e+09
 node_textfile_mtime_seconds{file="/Users/rexagod/repositories/misc/node_exporter/ne-foo.prom"} 1.710811982e+09
 # HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
 # TYPE node_textfile_scrape_error gauge
 node_textfile_scrape_error 1
 # HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
 # TYPE promhttp_metric_handler_errors_total counter
 promhttp_metric_handler_errors_total{cause="encoding"} 0
 promhttp_metric_handler_errors_total{cause="gathering"} 0
 # HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
 # TYPE promhttp_metric_handler_requests_in_flight gauge
 promhttp_metric_handler_requests_in_flight 1
 # HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
 # TYPE promhttp_metric_handler_requests_total counter
 promhttp_metric_handler_requests_total{code="200"} 0
 promhttp_metric_handler_requests_total{code="500"} 0
 promhttp_metric_handler_requests_total{code="503"} 0
 # HELP tau_infrastructure_performing_maintenance_task At what timestamp a given task started or stopped, the last time it was run.
 # TYPE tau_infrastructure_performing_maintenance_task gauge
 tau_infrastructure_performing_maintenance_task{main_task="nightly",start_or_stop="start",sub_task="main"} 1.64728080198446e+09
```

Fixes: #2317

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2024-03-24 06:43:03 +01:00
occupyhabit 641cf2c6b1
chore: fix some typos (#2974)
Signed-off-by: occupyhabit <wangmengjiao@outlook.com>
2024-03-23 16:22:21 +01:00
prombot 6425f079d1 Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-03-22 12:35:21 +01:00
Ben Kochie b3bbd1f52c Sanitize ethtool metric name keys
Apply the same metric name sanitization to the keys as to the metric
names. This avoids conflicting help strings in the metric registry.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-03-21 12:09:01 +01:00
PrometheusBot 274cd51ce7
Update common Prometheus files (#2964)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-03-21 09:15:02 +01:00
PrometheusBot 32ac7f4811
Update common Prometheus files (#2959)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-03-18 19:32:49 +01:00
dependabot[bot] 9d359d082f
build(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (#2955)
Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-17 16:32:11 +01:00
PrometheusBot 666a5d7193
Update common Prometheus files (#2954)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-03-17 16:32:01 +01:00
Gavin Lam 94ef5cc666
Enable watchdog module by default; Add no data error (#2953)
Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2024-03-14 07:50:55 +01:00
Gavin Lam 95efb86f6b
Add new collector and metrics for watchdog (#2309) (#2880)
Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2024-03-09 10:00:06 +01:00
linuxgcc 5e412a689a
disable selinux,fix end-to-end-test.sh error(#2934) (#2937)
Signed-off-by: heyitao <heyitao@uniontech.com>
Co-authored-by: heyitao <heyitao@uniontech.com>
2024-03-08 15:06:03 +01:00
Adrian Berger cc49133321
Add multi-cluster support for Nodes dashboard (#2945)
Signed-off-by: Adrian Berger <adria.berger94@gmail.com>
2024-03-08 14:41:36 +01:00
dependabot[bot] 8dbeac961e
build(deps): bump github.com/prometheus/procfs from 0.12.0 to 0.13.0 (#2952)
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/procfs
  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-03-08 10:01:54 +01:00
PrometheusBot 90c7f0f279
Update common Prometheus files (#2949)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-03-08 09:49:22 +01:00
dependabot[bot] 4ec07ee08c
build(deps): bump golang.org/x/sys from 0.17.0 to 0.18.0 (#2948)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.17.0 to 0.18.0.
- [Commits](https://github.com/golang/sys/compare/v0.17.0...v0.18.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-03-06 11:16:50 +01:00
dependabot[bot] d502a147c3
build(deps): bump github.com/prometheus/client_model from 0.5.0 to 0.6.0 (#2944)
Bumps [github.com/prometheus/client_model](https://github.com/prometheus/client_model) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](https://github.com/prometheus/client_model/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  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-03-06 11:06:12 +01:00
dependabot[bot] 762f15ea97
build(deps): bump github.com/prometheus/client_golang (#2942)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.18.0 to 1.19.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.19.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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-03-06 10:57:55 +01:00
dependabot[bot] cdb1e4c7e2
build(deps): bump golang.org/x/sys from 0.16.0 to 0.17.0 (#2943)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/sys/compare/v0.16.0...v0.17.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-03-06 10:57:44 +01:00
PrometheusBot 3866d2a829
Update common Prometheus files (#2946)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-03-04 18:55:14 +01:00
PrometheusBot c371a7f582
Update common Prometheus files (#2939)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-02-26 19:30:39 +01:00
Ben Kochie 3a02ab1cf0
Revert "filesystem: fix mountTimeout not working issue (#2903)" (#2932)
This reverts commit 9f1f791ac2.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-02-20 10:31:08 +01:00
Pamela Mei 12192475c8
filesystem: surface device errors (#2923)
filesystem: surface filesystem device error

Fixes: #2918
---------

Signed-off-by: Pamela Mei i540369 <pamela.mei@sap.com>
2024-02-18 12:04:30 +01:00
Ben Kochie 09014c0c5c
Enforce no subprocess policy (#2926)
Add depguard to golangci-lint to enforce the no-os/exec policy.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-02-16 09:41:06 +01:00
Taylor Sly 9f9473859b
Fix description for NodeDiskIOSaturation alert (#2929)
NodeDiskIOSaturation description should say 30m per the "for" clause

Signed-off-by: Taylor Sly <slyt@users.noreply.github.com>
2024-02-16 08:58:22 +01:00
DongWei 9f1f791ac2
filesystem: fix mountTimeout not working issue (#2903)
Signed-off-by: DongWei <jiangxuege@hotmail.com>
2024-02-14 15:36:16 +01:00
Caleb Webber 6d18ce7bca
Revert "Add ZFS freebsd per dataset stats (#2753)" (#2925)
This reverts commit f34aaa6109.

Signed-off-by: Caleb Webber <caleb@codingthemsoftly.com>
2024-02-14 09:13:18 +01:00
PrometheusBot d54744a555
Update common Prometheus files (#2917)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-02-07 22:57:18 +01:00
Ben Kochie 29fca60a45
Fix hwmon error capture (#2915)
Fix golangci-lint "ineffectual assignment" by correctly capturing any
errors within the hwmon gathering loop.

Signed-off-by: Ben Kochie <superq@gmail.com>
2024-02-07 15:06:24 +01:00
TaoGe fe78e7e51a
fix hwmon nil ptr (#2873)
* fix hwmon nil ptr

syslink maybe lost in some cases.

---------

Signed-off-by: TaoGe <6657718+yowenter@users.noreply.github.com>
2024-02-03 10:13:12 +01:00
dependabot[bot] 14949db87f
build(deps): bump github.com/jsimonetti/rtnetlink from 1.4.0 to 1.4.1 (#2909)
Bumps [github.com/jsimonetti/rtnetlink](https://github.com/jsimonetti/rtnetlink) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/jsimonetti/rtnetlink/releases)
- [Commits](https://github.com/jsimonetti/rtnetlink/compare/v1.4.0...v1.4.1)

---
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-02-02 09:03:01 +01:00
dependabot[bot] 1ae329e393
build(deps): bump github.com/prometheus/common from 0.45.0 to 0.46.0 (#2910)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.45.0 to 0.46.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.45.0...v0.46.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-01 17:59:31 +01:00
tyltr 34467b1d7a
chore:remove constant from function (#2884)
Signed-off-by: tyltr <tylitianrui@126.com>
2024-01-29 13:09:38 +01:00
David O'Rourke 94ddad4dec
exec_bsd: Fix labels for vm.stats.sys.v_syscall sysctl (#2895)
Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2024-01-29 13:08:53 +01:00
Alper Polat 4db443e5a6
Bump golang-builder version (#2908)
Signed-off-by: Alper Polat <gitperr@gmail.com>
2024-01-27 17:06:25 +01:00
DBS-ST-VIT e22174ca8e
diskstats: ignore zram devices on linux systems by default (#2898)
Signed-off-by: DBS-ST-VIT <dbs-st-vit@users.noreply.github.com>
Co-authored-by: DBS-ST-VIT <dbs-st-vit@users.noreply.github.com>
2024-01-15 09:32:58 +01:00
PrometheusBot f18cd07fff
Update common Prometheus files (#2897)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2024-01-08 19:20:34 +01:00
dependabot[bot] d8e2be1e88
build(deps): bump github.com/prometheus/client_golang (#2887)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.17.0 to 1.18.0.
- [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.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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-01-01 22:18:54 +01:00
dependabot[bot] bd99fb09c5
build(deps): bump github.com/beevik/ntp from 1.3.0 to 1.3.1 (#2886)
Bumps [github.com/beevik/ntp](https://github.com/beevik/ntp) from 1.3.0 to 1.3.1.
- [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.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/beevik/ntp
  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-01-01 22:18:41 +01:00
dependabot[bot] 683d2cd81f
build(deps): bump github.com/prometheus/exporter-toolkit (#2885)
Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  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-01-01 20:42:54 +01:00
PrometheusBot 73d95309e9
Update common Prometheus files (#2879)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-12-19 21:23:28 +01:00
dependabot[bot] 95d419dd09
build(deps): bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#2877)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 10:08:34 +01:00
PrometheusBot 120c481210
Update common Prometheus files (#2872)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-12-19 10:08:17 +01:00
João Pedro Lima 16f7122d31
Add mitigation information to the linux vulnerabilities collector (#2806)
While the CPU vulnerabilities collector has been added in https://github.com/prometheus/node_exporter/pull/2721 , it's currently not including information regarding the mitigation strategy used for a given vulnerability.

This information can be quite valuable, as often times different mitigation strategies come with a different performance impact.

This commit adds a third label to the cpu_vulnerabilities_info metric, to include the "mitigation" used for a given vulnerability - if a given vulnerability is not affecting a node or the node is still vulnerable, the mitigation is expected to be empty.

Signed-off-by: João Lima <jlima@cloudflare.com>
2023-12-14 13:15:27 +01:00
PrometheusBot c2dcc798d5
Update common Prometheus files (#2870)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-12-10 15:17:40 +01:00
frigo 0550ab3f04
Add TCPOFOQueue to default netstat metrics (#2867)
Adds a count for TCP packets received out of orders. This can be an
indication that there is packet loss on the way packets travel towards
this server. In that case, the sender will retransmit (and we can
already monitor the Tcp_RetransSegs there), but we have no way to
monitor the packet loss on the receiver side. When a packet is received
and the receiver detects previous one missing, it will increase the
TCPOFOQueue counter and reply with selective ACK to the sender, both
possible indications of packet loss. Confirmation of packet loss can be
achieved by taking packet captures, ignoring wireshark analysis, and
carefully looking at data being retransmitted based on the TCP seq.

Just like RetransSegs, TCPOFOQueue should be interesting for any
deployment as a mean to detect packet loss, so here suggesting adding it
to the default list.

Signed-off-by: François Rigault <frigo@amadeus.com>
Co-authored-by: François Rigault <frigo@amadeus.com>
2023-12-08 18:24:07 +01:00
dependabot[bot] 9666d00248
build(deps): bump golang.org/x/sys from 0.13.0 to 0.15.0 (#2863)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.13.0 to 0.15.0.
- [Commits](https://github.com/golang/sys/compare/v0.13.0...v0.15.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>
2023-12-04 23:17:23 +01:00
dependabot[bot] 12d5add3f5
build(deps): bump github.com/jsimonetti/rtnetlink from 1.3.5 to 1.4.0 (#2864)
Bumps [github.com/jsimonetti/rtnetlink](https://github.com/jsimonetti/rtnetlink) from 1.3.5 to 1.4.0.
- [Release notes](https://github.com/jsimonetti/rtnetlink/releases)
- [Commits](https://github.com/jsimonetti/rtnetlink/compare/v1.3.5...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/jsimonetti/rtnetlink
  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>
2023-12-04 23:05:51 +01:00
Gavin Lam 332232c22c
Add new collector and metrics for XFRM (#2544) (#2866)
Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
2023-12-03 17:10:59 +01:00
dependabot[bot] e508aff0d6
build(deps): bump howett.net/plist from 1.0.0 to 1.0.1 (#2862)
Bumps [howett.net/plist](https://github.com/DHowett/go-plist) from 1.0.0 to 1.0.1.
- [Commits](https://github.com/DHowett/go-plist/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: howett.net/plist
  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>
2023-12-01 18:08:09 +01:00
dependabot[bot] e1724b3c34
build(deps): bump github.com/alecthomas/kingpin/v2 from 2.3.2 to 2.4.0 (#2865)
Bumps [github.com/alecthomas/kingpin/v2](https://github.com/alecthomas/kingpin) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/alecthomas/kingpin/releases)
- [Commits](https://github.com/alecthomas/kingpin/compare/v2.3.2...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/alecthomas/kingpin/v2
  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>
2023-12-01 18:07:31 +01:00
Simon Pasquier 12f1744e79
Fix debug log in cpu collector (#2857)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2023-11-24 16:37:27 +01:00
Ben Kochie 4abf2c972e
Update containerization warnings (#2855)
Running node_exporter in containers is now a fairly well understood
problem. Replace the warnings with something less dire and more
prescriptive.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-11-23 13:23:18 +01:00
PrometheusBot 97029a20a8
Update common Prometheus files (#2851)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-11-19 01:20:49 +01:00
Tobias Klausmann 78af952e63
NFSd: handle new wdeleg_getattr attribute in /proc/net/rpc/nfsd (#2810)
This attribute was introduced it v6.6-rc1.

The relevant changes in procfs were merged here:

https://github.com/prometheus/procfs/pull/574

and are part of procfs v0.11.2

I have also figured out that the stat should be part of the v4 ops
counters struct, but that will need changes to both procfs and this
code. Since people are already using 6.6-rc1, I think it's better to get
the code out there --- even if they don't care about wdeleg_getattr,
currently they get _no_ nfsd stats with 6.6-rc1.

I will make two follow-up PRs to clean this up in the next releases of
procfs and node-exporter.

Signed-off-by: Tobias Klausmann <klausman@schwarzvogel.de>
2023-11-14 03:54:11 +01:00
Anton Lugovoi 81fc05c45f
Make filesystem space prediction window configurable (#2844)
Signed-off-by: fitz123 <alugovoi@ordercapital.com>
2023-11-13 02:10:56 +01:00
Ayoub NASR 7333465abf
Add NodeBondingDegraded alert (#2843)
Signed-off-by: Ayoub Nasr <ayoub.nasr@scality.com>
2023-11-13 00:36:30 +01:00
Ben Kochie 74ff1c6937
Release 1.7.0 (#2845)
* [FEATURE] Add ZFS freebsd per dataset stats #2753
* [FEATURE] Add cpu vulnerabilities reporting from sysfs #2721
* [ENHANCEMENT] Parallelize stat calls in Linux filesystem collector #1772
* [ENHANCEMENT] Add missing linkspeeds to ethtool collector 2711
* [ENHANCEMENT] Add CPU MHz as the value for `node_cpu_info` metric #2778
* [ENHANCEMENT] Improve qdisc collector performance #2779
* [ENHANCEMENT] Add include and exclude filter for hwmon collector #2699
* [ENHANCEMENT] Optionally fetch ARP stats via rtnetlink instead of procfs #2777
* [BUFFIX] Fix ZFS arcstats on FreeBSD 14.0+ 2754
* [BUGFIX] Fallback to 32-bit stats in netdev #2757
* [BUGFIX] Close btrfs.FS handle after use #2780
* [BUGFIX] Move RO status before error return #2807
* [BUFFIX] Fix `promhttp_metric_handler_errors_total` being always active #2808
* [BUGFIX] Fix nfsd v4 index miss #2824

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-11-13 00:30:06 +01:00
dependabot[bot] ed1b8e3d88
build(deps): bump github.com/prometheus/client_model (#2838)
Bumps [github.com/prometheus/client_model](https://github.com/prometheus/client_model) from 0.4.1-0.20230718164431-9a2bf3000d16 to 0.5.0.
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](https://github.com/prometheus/client_model/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  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>
2023-11-06 12:16:37 +01:00
dependabot[bot] 5ffc733af3
build(deps): bump github.com/prometheus/common from 0.44.0 to 0.45.0 (#2837)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.44.0...v0.45.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 05:36:33 +01:00
PrometheusBot 47ccad51df
Update common Prometheus files (#2840)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-11-06 05:36:06 +01:00
nemobis d39e5aa48d
Fix typo in CHANGELOG.md (#2836)
Use # consistently for PR number.

Signed-off-by: nemobis <federicoleva@tiscali.it>
2023-10-31 15:50:00 +01:00
joey 6122cee47a fix readme about expose memory statistics
Signed-off-by: joey <zchengjoey@gmail.com>
2023-10-19 11:43:16 +02:00
dongjiang 86ed8cdc6b
NFSd: fix nfsd v4 index miss (#2824)
* fix nfsd v4 index miss

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2023-10-16 18:14:21 +02:00
Ben Kochie 0f6a4d8c39
Merge pull request #2808 from ToMe25/fix_error_total_disabling
Fix promhttp_metric_handler_errors_total being always active
2023-10-16 13:37:51 +01:00
Ben Kochie 63844996e8
Merge pull request #2816 from prometheus/dependabot/go_modules/github.com/prometheus/procfs-0.12.0
build(deps): bump github.com/prometheus/procfs from 0.11.1 to 0.12.0
2023-10-16 12:47:53 +01:00
Ben Kochie 31a9cca551
Update e2e fixtures
Update for fixes in https://github.com/prometheus/procfs/pull/543

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-10-16 13:37:17 +02:00
dependabot[bot] fd799e4287
build(deps): bump github.com/prometheus/procfs from 0.11.1 to 0.12.0
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.11.1 to 0.12.0.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.11.1...v0.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 14:48:54 +00:00
dependabot[bot] d108e55b17 build(deps): bump golang.org/x/net from 0.11.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.11.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.11.0...v0.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-13 11:51:08 +02:00
prombot d52c047abb Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-10-13 11:46:26 +02:00
yang-stressfree 7dd2f0dc4f
Update README.md: update the 'more details' url in the section 'TLS endpoint' (#2814)
* Update README.md: correct the wrong url(link to exporter-toolkit web-config) in the section 'TLS endpoint'

Signed-off-by: yang-stressfree <68363665+yang-stressfree@users.noreply.github.com>

* Update README.md

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: yang-stressfree <68363665+yang-stressfree@users.noreply.github.com>

---------

Signed-off-by: yang-stressfree <68363665+yang-stressfree@users.noreply.github.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-10-07 10:20:44 +02:00
Conall O'Brien 60c86ab218
Fix inconsistent variable name, to address compilation issue (#2820)
https://github.com/prometheus/node_exporter/issues/2819

Signed-off-by: Conall O'Brien <conall@conall.net>
2023-10-04 21:16:58 +02:00
dependabot[bot] 8ff3c43922
build(deps): bump github.com/prometheus/client_golang (#2815)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.16.0 to 1.17.0.
- [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.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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>
2023-10-02 12:43:31 +02:00
ToMe25 db3a43783a Fix promhttp_metric_handler_errors_total metric not being disabled by flag
Signed-off-by: ToMe25 <ToMe25@gmx.de>
2023-09-22 18:07:18 +02:00
dongjiang e8c5110ada
fix(zfs) zfs arcstats.p on FreeBSD 14.0+ (#2754)
* dongjiang, fix zfs arcstats.p

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* dongjiang, fix gofmt -s

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* change warn log to debug log by code review

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2023-09-20 11:49:56 +02:00
prombot 446b3e64ff Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-09-20 11:28:40 +02:00
Metbog e387997e4c Move RO status before error return
Signed-off-by: Metbog <metbog@gmail.com>
2023-09-20 11:26:39 +02:00
Conall O'Brien f34aaa6109
Add ZFS freebsd per dataset stats (#2753)
* Rename parsePoolObjsetFile to parseLinuxPoolObjsetFile to better reflect
it's scope
* Create a new parseFreeBSDPoolObjsetStats function, to generate a list
of per pool metrics to be queried via sysctl


---------

Signed-off-by: Conall O'Brien <conall@conall.net>
2023-09-11 06:33:21 +02:00
PrometheusBot 5ae22fa2c0
Update common Prometheus files (#2798)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-09-09 20:42:39 +02:00
dependabot[bot] e590476dc7
build(deps): bump golang.org/x/sys from 0.10.0 to 0.12.0 (#2797)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.10.0 to 0.12.0.
- [Commits](https://github.com/golang/sys/compare/v0.10.0...v0.12.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>
2023-09-09 17:09:30 +02:00
Daniel Swarbrick 685b98ec7f
Optionally fetch ARP stats via rtnetlink instead of procfs (#2777)
* Optionally fetch ARP stats via rtnetlink instead of procfs

Implement collection of ARP stats via rtnetlink to work around
shortcomings in the output of /proc/net/arp, which truncates InfiniBand
link-layer addresses.

Fixes: #2776

---------

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-09-09 16:41:09 +02:00
Ben Kochie cda1d820bb
Update to Go 1.21 (#2796)
* Update Go build to 1.21.
* Update machine images to Ubuntu 22.04 current.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-09-09 15:44:48 +02:00
Daniel Swarbrick 381f32b1c5 btrfs: close btrfs.FS handle after use
Despite being quite hard to provoke (< 10% in my testing), the btrfs
collector would occasionally leave stale FDs relating to btrfs
mountpoints, making the filesystems unable to be unmounted.

Fixes: #2772.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-08-21 16:00:00 +02:00
Josh Bradley f2b274350a
fix(qdisc) flag naming corrected for consistency (#2782)
* fix collector qdisc flag naming for consistency

---------

Signed-off-by: jbradleynh <jbradley@fastly.com>
2023-08-21 07:48:09 +02:00
John Kordich e120d958f5 Change log message from Warn to Debug
Signed-off-by: John Kordich <jkordich@gmail.com>

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: John Kordich <jkordich@gmail.com>
2023-08-20 13:38:47 +02:00
John Kordich 933b1c1797 Add new node_cpu_frequency_hertz metric
Revert changes to node_cpu_info and add new node_cpu_frequency_hertz
metric for measuring CPU frequency from /proc/cpuinfo

Signed-off-by: John Kordich <jkordich@gmail.com>
2023-08-20 13:38:47 +02:00
John Kordich e84c278107 Update e2e-output.txt with new expected metric values
Changes the e2e-output.txt file to have the expected CPU MHz values
for the node_cpu_info metric.

Signed-off-by: John Kordich <jkordich@gmail.com>
2023-08-20 13:38:47 +02:00
John Kordich 223ebbd50c Add CPU MHz as the value for "node_cpu_info" metric
For CPUs which don't have an available (or insertable) cpufreq driver,
the /proc/cpuinfo file can sometimes have accurate CPU core frequency
measurements. This change replaces the constant value of "1" for the
"node_cpu_info" metric with the parsed CPU MHz value from
/proc/cpuinfo for each core.

Signed-off-by: John Kordich <jkordich@gmail.com>
2023-08-20 13:38:47 +02:00
takt 6225435677
Upgrade github.com/ema/qdisc to v1.0.0 to improve qdisc collector (#2779)
performance

Signed-off-by: Oliver Geiselhardt-Herms <ogh@deepl.com>
Co-authored-by: Oliver Geiselhardt-Herms <ogh@deepl.com>
2023-08-18 15:20:22 +02:00
Daniel Swarbrick 37ce0bab8c
Sync build tags in *_test.go (#2767)
Ensure that unwanted tests are correctly excluded when various build
tags are specified, i.e. when the code that they test would be excluded
from compilation.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-08-15 11:38:13 +02:00
Daniel Swarbrick 3fb5f70b0c Drop redundant GOOS build tags if already in filename
Drop redundant GOOS build tags at start of file if the constraint is
already specified by the filename, e.g. foo_GOOS.go or
foo_GOOS_GOARCH.go, avoiding potential confusion in future.

cf. https://pkg.go.dev/cmd/go#hdr-Build_constraints

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2023-08-08 14:30:39 +02:00
dependabot[bot] c6c28d915c
build(deps): bump github.com/jsimonetti/rtnetlink from 1.3.3 to 1.3.4 (#2765)
Bumps [github.com/jsimonetti/rtnetlink](https://github.com/jsimonetti/rtnetlink) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/jsimonetti/rtnetlink/releases)
- [Commits](https://github.com/jsimonetti/rtnetlink/compare/v1.3.3...v1.3.4)

---
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>
2023-08-02 18:13:53 +02:00
dependabot[bot] 60f08e0aac
build(deps): bump github.com/prometheus/procfs from 0.11.0 to 0.11.1 (#2763)
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.11.0...v0.11.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/procfs
  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>
2023-08-02 18:13:17 +02:00
dependabot[bot] 35278b94f8
build(deps): bump github.com/beevik/ntp from 1.1.1 to 1.3.0 (#2762)
Signed-off-by: Ben Kochie <superq@gmail.com>
2023-08-02 17:49:21 +02:00
Benoît Knecht 3b9613cfae
collector/netdev_linux.go: Fallback to 32-bit stats (#2757)
On some platforms, `msg.Attributes.Stats64` is `nil` because the kernel doesn't
expose 64-bit stats. In that case, return `msg.Attributes.Stats` instead, which
are the 32-bit equivalent.

Note that `RXOtherhostDropped` isn't available in that case, so we hardcode it
to zero.

Fixes #2756.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2023-08-01 15:58:53 +02:00
L 5d1b96c936 Include drm collector in README
The DRM collector was missing in the README, this change includes it together with a short description.

Signed-off-by: L <3177243+LukeLR@users.noreply.github.com>
2023-07-31 13:14:13 +01:00
PrometheusBot 8fb4f78ce5
Update common Prometheus files (#2752)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-07-18 21:08:19 +02:00
PrometheusBot fa481315b5
Synchronize common files from prometheus/prometheus (#2736)
* Update common Prometheus files

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

* Fixup linting issues

* Disbale unused-parameter check.
* Fixup minor linting issues.

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

---------

Signed-off-by: prombot <prometheus-team@googlegroups.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-07-18 10:46:59 +02:00
Ben Kochie 2d8069208c
Release v1.6.1 (#2747)
Rebuild with latest Go compiler bugfix release.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-07-17 13:58:44 +02:00
Ben Kochie 7c564bcbef
Fixup hwmon chip include (#2739)
Use the correct include value to the device filter function.
* Add new bogus hwmon fixture.
* Update end-to-end test to use hwmon chip include flag.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-07-10 12:46:30 +02:00
Conall O'Brien c241ecf8bd
Update all Include and Exclude variables to use the systemdUnit naming (#2740)
prefix.

Leave an annotation about using regexps instead of device_filter.go, so
@SuperQ doesn't need to remember everything.

Signed-off-by: Conall O'Brien <conall@conall.net>
2023-07-10 12:25:18 +02:00
Gabi Davar f4344579d5
Add missing ethtool flag documentation (#2743)
Signed-off-by: Gabi Davar <grizzly.nyo@gmail.com>
2023-07-08 09:36:36 +02:00
Conall O'Brien 8b4dc82488
Add include and exclude filter for hwmon collector (#2699)
* Add include and exclude flags chip name flags to hwmon collector, following example in systemd collector

---------

Signed-off-by: Conall O'Brien <conall@conall.net>
Co-authored-by: Ben Kochie <superq@gmail.com>
2023-07-07 10:30:24 +02:00
Ben Kochie ed57c15e2c
Merge pull request #2644 from v-zhuravlev/mixin_alerts
Mixin: Add and update alerts
2023-07-04 09:12:00 +02:00
dependabot[bot] a24344d4a8 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [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.15.1...v1.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 11:57:59 +02:00
dependabot[bot] 74da9f9d85 build(deps): bump github.com/beevik/ntp from 1.0.0 to 1.1.1
Bumps [github.com/beevik/ntp](https://github.com/beevik/ntp) from 1.0.0 to 1.1.1.
- [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.0.0...v1.1.1)

---
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>
2023-07-03 11:57:04 +02:00
Michal c31ebb4359
Add cpu vulnerabilities reporting from sysfs (#2721)
* Add cpu vulnerabilities reporting from sysfs

---------

Signed-off-by: Michal Wasilewski <michal@mwasilewski.net>
2023-07-01 14:21:49 +02:00
prombot 3e3ab1778b Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-07-01 13:14:03 +02:00
Vitaly Zhuravlev e8d7f4e8b3 Revert alerts pending durtions
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly 3e250a95a0 Update NodeSystemSaturation severity
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev b7dfb32bfc Set severity to NodeCPUHighUsage to info
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 6bdc1d9c98 Add thresholds for memory, disk and system alerts
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 77ae769179 Add thresholds for memory alerts
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 2111e70ac7 Add comma after 'mounted on'
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev e48e7909f4 Extend alert description
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev da32f8de17 Decrease NodeSystemdServiceFailed severity to warning
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 580c497261 Add NodeSystemSaturation and NodeMemoryMajorPagesFaults
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev e15e7d6a7b Fix NodeMemoryHighUtilization alert
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev c3ec6e8af1 Add diskDevice selector
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 962de6c921 Add %(nodeExporterSelector)s to Network and conntrack alerts
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 94fc82e418 Add NodeDiskIOSaturation alert
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 614030bb80 Set 'at' everywhere as preposition for instance
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:52 +08:00
Vitaly Zhuravlev 3d8075da7d Decrease NodeNetwork*Errs pending period
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:51 +08:00
Vitaly Zhuravlev 74794182a7 Add failed systemd service alert
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:51 +08:00
Vitaly Zhuravlev fd2d62af63 Add CPU and memory alerts
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:51 +08:00
Vitaly Zhuravlev 0e0399d41e Decrease NodeFilesystem pending time to 15m
30m is too long and there is a risk of running out of disk space/inodes completely if something is filling up disk very fast (like log file).

Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:51 +08:00
Vitaly Zhuravlev fc967aa992 Add mountpoint to NodeFilesystem alerts
This helps to identify alerting filesystem.

Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
2023-06-29 23:26:51 +08:00
Ben Kochie a11de2ede5
Update golangci-lint config (#2722)
* Migrate from Python codespell to golangci-lint misspell.
* Inline errcheck exclude list in the golangci-lint config.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-06-21 10:07:30 +02:00
PrometheusBot d1b634fb80
Update common Prometheus files (#2723)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2023-06-18 10:20:37 +02:00
Cam Cope 2346fd9b06
add missing linkspeeds (#2711)
Signed-off-by: Cam Cope <ccope@crusoeenergy.com>
2023-06-18 09:01:53 +02:00
Ben Kochie 742ec0970a
Bump ethtool library (#2720)
Update to latest release.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-06-14 16:23:01 +02:00
Ben Kochie 6fb78f70b3
Bump wifi Go module (#2719)
Update github.com/mdlayher/wifi to the latest commit.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-06-14 15:49:23 +02:00
Junqi Zhao 107ca037c4
fix misspel in CHANGELOG.md (#2717)
Signed-off-by: juzhao <juzhao@redhat.com>
2023-06-13 16:34:41 +02:00
Erica Mays bdc430af2b Parallelize stat calls in Linux filesystem collector.
This change adds the ability to process multiple stat calls in parallel.
Processing is rate-limited based on the new flag
`collector.filesystem.stat-workers` (default 4).

Caveat: filesystem stats information is no longer in the same order as
returned by `/proc/1/mounts`.  This should not be an issue.

Caveat: This change currently uses unbuffered channels to prove
correctness without reliance on buffers.  Buffered channels will yield
superior performance.

Signed-off-by: Erica Mays <erica@emays.dev>
2023-06-09 12:31:31 +02:00
dependabot[bot] 75d951d47a build(deps): bump github.com/jsimonetti/rtnetlink from 1.3.2 to 1.3.3
Bumps [github.com/jsimonetti/rtnetlink](https://github.com/jsimonetti/rtnetlink) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/jsimonetti/rtnetlink/releases)
- [Commits](https://github.com/jsimonetti/rtnetlink/compare/v1.3.2...v1.3.3)

---
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>
2023-06-02 15:50:48 +02:00
dependabot[bot] fc686da10a build(deps): bump github.com/prometheus/procfs from 0.10.0 to 0.10.1
Bumps [github.com/prometheus/procfs](https://github.com/prometheus/procfs) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/prometheus/procfs/releases)
- [Commits](https://github.com/prometheus/procfs/compare/v0.10.0...v0.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-02 15:50:34 +02:00
dependabot[bot] 386c4086dd build(deps): bump github.com/beevik/ntp from 0.3.0 to 1.0.0
Bumps [github.com/beevik/ntp](https://github.com/beevik/ntp) from 0.3.0 to 1.0.0.
- [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/v0.3.0...v1.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-02 15:50:17 +02:00
215 changed files with 12625 additions and 2771 deletions

View file

@ -7,10 +7,10 @@ executors:
# should also be updated.
golang:
docker:
- image: cimg/go:1.20
- image: cimg/go:1.24
arm:
machine:
image: ubuntu-2004:current
docker:
- image: cimg/go:1.24
resource_class: arm.medium
jobs:
@ -25,16 +25,9 @@ jobs:
test-arm:
executor: arm
steps:
- checkout
- prometheus/setup_environment
- run: uname -a
- run: make test-e2e
codespell:
docker:
- image: circleci/python
steps:
- checkout
- run: sudo pip install codespell
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem,./collector/fixtures" -I scripts/codespell_ignore.txt
test_mixins:
executor: golang
steps:
@ -49,13 +42,23 @@ jobs:
- run: git diff --exit-code
build:
machine:
image: ubuntu-2004:202101-01
image: ubuntu-2404:current
parallelism: 3
steps:
- prometheus/setup_environment
- run: docker run --privileged linuxkit/binfmt:v0.8
- run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97
- run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
# sign the darwin build so it doesn't get SIGKILLed on start, see: https://github.com/prometheus/node_exporter/issues/2539
- run:
command: |
if [[ -f "$(pwd)/.build/darwin-arm64/node_exporter" ]]; then
promu codesign "$(pwd)/.build/darwin-arm64/node_exporter"
fi
if [[ -f "$(pwd)/.build/darwin-amd64/node_exporter" ]]; then
promu codesign "$(pwd)/.build/darwin-amd64/node_exporter"
fi
- persist_to_workspace:
root: .
paths:
@ -65,9 +68,9 @@ jobs:
destination: /build
test_docker:
machine:
image: ubuntu-2204:2022.04.2
image: ubuntu-2404:current
environment:
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.24-base
REPO_PATH: github.com/prometheus/node_exporter
steps:
- prometheus/setup_environment
@ -105,10 +108,6 @@ workflows:
filters:
tags:
only: /.*/
- codespell:
filters:
tags:
only: /.*/
- test_docker:
requires:
- test

313
.github/workflows/bsd.yml vendored Normal file
View file

@ -0,0 +1,313 @@
name: bsd
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
env:
GNU_TAR_VERSION: "1.35"
GO_VERSION_DRAGONFLY: "1.24.1"
GO_VERSION_FREEBSD: "123"
GO_VERSION_NETBSD: "1.24.1"
GO_VERSION_OPENBSD: "1.23.1"
GO_VERSION_SOLARIS: "1.24.1"
# To spin up one of the VMs below, see the "Debug Shell" section here: https://github.com/vmactions
jobs:
test_freebsd:
name: Run end-to-end tests on FreeBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: test-e2e
uses: vmactions/freebsd-vm@8873d98fd1413b5977cb2f7348fe329775159892 # v1.1.9
with:
copyback: false
envs: 'GO_VERSION_FREEBSD GNU_TAR_VERSION'
usesh: true
prepare: |
pkg update -f
pkg install -y \
bash \
git \
gmake \
gnugrep \
go${GO_VERSION_FREEBSD} \
gsed \
gtar \
python \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
ln -s $(which go${GO_VERSION_FREEBSD}) $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
gmake test-e2e
echo "::endgroup::"
test_openbsd:
name: Run end-to-end tests on OpenBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: test-e2e
uses: vmactions/openbsd-vm@7ac70b6de6f33efc74a90c1964afa3bcf0ee4401 # v1.1.6
with:
copyback: false
envs: 'GO_VERSION_OPENBSD GNU_TAR_VERSION'
usesh: true
prepare: |
pkg_add -u
pkg_add \
bash \
ggrep \
git \
gmake \
go-${GO_VERSION_OPENBSD} \
gsed \
gtar-${GNU_TAR_VERSION}p0-static \
python \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e
echo "::endgroup::"
test_netbsd:
name: Run end-to-end tests on NetBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: test-e2e
uses: vmactions/netbsd-vm@46a58bbf03682b4cb24142b97fa315ae52bed573 # v1.1.8
with:
copyback: false
envs: 'GO_VERSION_NETBSD GNU_TAR_VERSION'
usesh: true
prepare: |
/usr/sbin/pkg_add -u
/usr/sbin/pkg_add \
git \
gmake \
grep \
gsed \
gtar-base-${GNU_TAR_VERSION}\
python312 \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOGZ="go${GO_VERSION_NETBSD}.netbsd-amd64.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e
echo "::endgroup::"
test_dragonfly:
name: Run end-to-end tests on DragonFly
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: test-e2e
uses: vmactions/dragonflybsd-vm@e3c420e8a2362c2496fca6e76a291abd46f5d8e7 # v1.1.0
with:
copyback: false
envs: 'GO_VERSION_DRAGONFLY'
usesh: true
prepare: |
pkg update && pkg upgrade -y
pkg install -y \
bash \
git \
gmake \
gnugrep \
gsed \
gtar \
python3 \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOGZ="go${GO_VERSION_DRAGONFLY}.dragonfly-amd64.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
ln -s $(which python3) $(pwd)/bin/python
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
gmake test-e2e
echo "::endgroup::"
test_solaris:
name: Run end-to-end tests on Solaris
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: test-e2e
uses: vmactions/solaris-vm@cc8f82fa1a7cc746153ec3f71bf11f311f16e225 # v1.1.1
with:
copyback: false
envs: 'GO_VERSION_SOLARIS'
usesh: true
prepare: |
pkg update
pkg install \
bash \
curl \
gcc \
git \
gnu-grep \
gnu-make \
gnu-sed \
gnu-tar
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOGZ="go${GO_VERSION_SOLARIS}.solaris-amd64.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo ">> building promu as it is not shipped for Solaris"
git clone https://github.com/prometheus/promu.git
cd promu
go build .
cd -
mkdir -p $(go env GOPATH)/bin
ln -s $(pwd)/promu/promu $(go env GOPATH)/bin/promu
export PATH=$(go env GOPATH)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e
echo "::endgroup::"
test_macos:
name: Run end-to-end tests on macOS
runs-on: macos-latest
steps:
- name: Checkout the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies
run: |
brew install \
bash \
curl \
git \
grep \
make \
gnu-sed \
gnu-tar \
go \
python3
- name: test-e2e
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e
echo "::endgroup::"

View file

@ -0,0 +1,57 @@
---
name: Push README to Docker Hub
on:
push:
paths:
- "README.md"
- "README-containers.md"
- ".github/workflows/container_description.yml"
branches: [ main, master ]
permissions:
contents: read
jobs:
PushDockerHubReadme:
runs-on: ubuntu-latest
name: Push README to Docker Hub
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
steps:
- name: git checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set docker hub repo name
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
- name: Push README to Dockerhub
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
env:
DOCKER_USER: ${{ secrets.DOCKER_HUB_LOGIN }}
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
with:
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
provider: dockerhub
short_description: ${{ env.DOCKER_REPO_NAME }}
# Empty string results in README-containers.md being pushed if it
# exists. Otherwise, README.md is pushed.
readme_file: ''
PushQuayIoReadme:
runs-on: ubuntu-latest
name: Push README to quay.io
if: github.repository_owner == 'prometheus' || github.repository_owner == 'prometheus-community' # Don't run this workflow on forks.
steps:
- name: git checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set quay.io org name
run: echo "DOCKER_REPO=$(echo quay.io/${GITHUB_REPOSITORY_OWNER} | tr -d '-')" >> $GITHUB_ENV
- name: Set quay.io repo name
run: echo "DOCKER_REPO_NAME=$(make docker-repo-name)" >> $GITHUB_ENV
- name: Push README to quay.io
uses: christian-korneck/update-container-description-action@d36005551adeaba9698d8d67a296bd16fa91f8e8 # v1
env:
DOCKER_APIKEY: ${{ secrets.QUAY_IO_API_TOKEN }}
with:
destination_container_repo: ${{ env.DOCKER_REPO_NAME }}
provider: quay
# Empty string results in README-containers.md being pushed if it
# exists. Otherwise, README.md is pushed.
readme_file: ''

View file

@ -1,3 +1,5 @@
---
# This action is synced from https://github.com/prometheus/prometheus
name: golangci-lint
on:
push:
@ -10,21 +12,28 @@ on:
- ".golangci.yml"
pull_request:
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
golangci:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: install Go
uses: actions/setup-go@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
with:
go-version: 1.20.x
go-version: 1.24.x
- name: Install snmp_exporter/generator dependencies
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
if: github.repository == 'prometheus/snmp_exporter'
- name: Lint
uses: golangci/golangci-lint-action@v3.4.0
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
with:
version: v1.51.2
args: --verbose
version: v1.64.6

2
.gitignore vendored
View file

@ -27,6 +27,8 @@ dependencies-stamp
/.release
/.tarballs
tools/tools
# Intellij
/.idea

View file

@ -1,15 +1,9 @@
linters:
enable:
- depguard
- goimports
- misspell
- revive
disable:
# Disable soon to deprecated[1] linters that lead to false
# positives when build tags disable certain files[2]
# 1: https://github.com/golangci/golangci-lint/issues/1841
# 2: https://github.com/prometheus/node_exporter/issues/1545
- deadcode
- unused
- structcheck
- varcheck
issues:
exclude-rules:
@ -18,5 +12,21 @@ issues:
- errcheck
linters-settings:
depguard:
rules:
no_exec_policy:
files:
- "!$test"
deny:
- pkg: "os/exec"
desc: "Using os/exec to run sub processes it not allowed by policy"
errcheck:
exclude: scripts/errcheck_excludes.txt
exclude-functions:
# Used in HTTP handlers, any error is handled by the server itself.
- (net/http.ResponseWriter).Write
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter
- name: unused-parameter
severity: warning
disabled: true

View file

@ -1,14 +1,13 @@
go:
# Whenever the Go version is updated here, .circle/config.yml and
# .promu.yml should also be updated.
version: 1.20
version: 1.24
cgo: true
repository:
path: github.com/prometheus/node_exporter
build:
binaries:
- name: node_exporter
flags: -a -tags 'netgo osusergo static_build'
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}

View file

@ -1,13 +1,12 @@
go:
# Whenever the Go version is updated here, .circle/config.yml and
# .promu-cgo.yml should also be updated.
version: 1.20
version: 1.24
repository:
path: github.com/prometheus/node_exporter
build:
binaries:
- name: node_exporter
flags: -a -tags 'netgo osusergo static_build'
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}

View file

@ -1,5 +1,7 @@
---
extends: default
ignore: |
**/node_modules
rules:
braces:
@ -20,5 +22,4 @@ rules:
config/testdata/section_key_dup.bad.yml
line-length: disable
truthy:
ignore: |
.github/workflows/*.yml
check-keys: false

View file

@ -5,6 +5,87 @@
* [ENHANCEMENT]
* [BUGFIX]
## 1.9.0 / 2025-02-17
* [CHANGE] meminfo: Convert linux implementation to use procfs lib #3049
* [CHANGE] Update logging to use Go log/slog #3097
* [FEATURE] filesystem: Add `node_filesystem_mount_info` metric #2970
* [FEATURE] btrfs: Add metrics for commit statistics #3010
* [FEATURE] interrupts: Add collector include/exclude filtering #3028
* [FEATURE] interrupts: Add "exclude zeros" filtering #3028
* [FEATURE] slabinfo: Add filters for slab name. #3041
* [FEATURE] pressure: add IRQ PSI metrics #3048
* [FEATURE] hwmon: Add include and exclude filter for sensors #3072
* [FEATURE] filesystem: Add NetBSD support #3082
* [FEATURE] netdev: Add ifAlias label #3087
* [FEATURE] hwmon: Add Support for GPU Clock Frequencies #3093
* [FEATURE] Add `exclude[]` URL parameter #3116
* [FEATURE] Add AIX support #3136
* [FEATURE] filesystem: Add fs-types/mount-points include flags #3171
* [FEATURE] netstat: Add collector for tcp packet counters for FreeBSD. #3177
* [ENHANCEMENT] ethtool: Add logging for filtering flags #2979
* [ENHANCEMENT] netstat: Add TCPRcvQDrop to default metrics #3021
* [ENHANCEMENT] diskstats: Add block device rotational #3022
* [ENHANCEMENT] cpu: Support CPU online status #3032
* [ENHANCEMENT] arp: optimize interface name resolution #3133
* [ENHANCEMENT] textfile: Allow specifiying multiple directory globs #3135
* [ENHANCEMENT] filesystem: Add reporting of purgeable space on MacOS #3206
* [ENHANCEMENT] ethtool: Skip full scan of NetClass directories #3239
* [BUGFIX] zfs: Prevent `procfs` integer underflow #2961
* [BUGFIX] pressure: Fix collection on systems that do not expose a full CPU stat #3054
* [BUGFIX] cpu: Fix FreeBSD 32-bit host support and plug memory leak #3083
* [BUGFIX] hwmon: Add safety check to hwmon read #3134
* [BUGFIX] zfs: Allow space in dataset name #3186
## 1.8.1 / 2024-05-16
* [BUGFIX] Fix CPU seconds on Solaris #2963
* [BUGFIX] Sign Darwin/MacOS binaries #3008
* [BUGFIX] Fix pressure collector nil reference #3016
## 1.8.0 / 2024-04-24
* [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
## 1.7.0 / 2023-11-11
* [FEATURE] Add ZFS freebsd per dataset stats #2753
* [FEATURE] Add cpu vulnerabilities reporting from sysfs #2721
* [ENHANCEMENT] Parallelize stat calls in Linux filesystem collector #1772
* [ENHANCEMENT] Add missing linkspeeds to ethtool collector 2711
* [ENHANCEMENT] Add CPU MHz as the value for `node_cpu_info` metric #2778
* [ENHANCEMENT] Improve qdisc collector performance #2779
* [ENHANCEMENT] Add include and exclude filter for hwmon collector #2699
* [ENHANCEMENT] Optionally fetch ARP stats via rtnetlink instead of procfs #2777
* [BUFFIX] Fix ZFS arcstats on FreeBSD 14.0+ 2754
* [BUGFIX] Fallback to 32-bit stats in netdev #2757
* [BUGFIX] Close btrfs.FS handle after use #2780
* [BUGFIX] Move RO status before error return #2807
* [BUFFIX] Fix `promhttp_metric_handler_errors_total` being always active #2808
* [BUGFIX] Fix nfsd v4 index miss #2824
## 1.6.1 / 2023-06-17
Rebuild with latest Go compiler bugfix release.
## 1.6.0 / 2023-05-27
* [CHANGE] Fix cpustat when some cpus are offline #2318
@ -29,8 +110,8 @@
* [ENHANCEMENT] Use `SCSI_IDENT_SERIAL` as serial in diskstats #2612
* [ENHANCEMENT] Read missing from netlink netclass attributes from sysfs #2669
* [BUGFIX] perf: fixes for automatically detecting the correct tracefs mountpoints #2553
* [BUGFIX] Fix `thermal_zone` collector noise @2554
* [BUGFIX] Fix a problem fetching the user wire count on FreeBSD 2584
* [BUGFIX] Fix `thermal_zone` collector noise #2554
* [BUGFIX] Fix a problem fetching the user wire count on FreeBSD #2584
* [BUGFIX] interrupts: Fix fields on linux aarch64 #2631
* [BUGFIX] Remove metrics of offline CPUs in CPU collector #2605
* [BUGFIX] Fix OpenBSD filesystem collector string parsing #2637
@ -130,9 +211,9 @@ NOTE: In order to support globs in the textfile collector path, filenames expose
* [ENHANCEMENT] Add flag to disable guest CPU metrics #2123
* [ENHANCEMENT] Add DMI collector #2131
* [ENHANCEMENT] Add threads metrics to processes collector #2164
* [ENHANCMMENT] Reduce timer GC delays in the Linux filesystem collector #2169
* [ENHANCMMENT] Add TCPTimeouts to netstat default filter #2189
* [ENHANCMMENT] Use SysctlTimeval for boottime collector on BSD #2208
* [ENHANCEMENT] Reduce timer GC delays in the Linux filesystem collector #2169
* [ENHANCEMENT] Add TCPTimeouts to netstat default filter #2189
* [ENHANCEMENT] Use SysctlTimeval for boottime collector on BSD #2208
* [BUGFIX] ethtool: Sanitize metric names #2093
* [BUGFIX] Fix ethtool collector for multiple interfaces #2126
* [BUGFIX] Fix possible panic on macOS #2133
@ -462,7 +543,7 @@ Other breaking changes:
**Breaking changes**
This release contains major breaking changes to flag handling.
* The flag library has been changed, all flags now require double-dashs. (`-foo` becomes `--foo`).
* The flag library has been changed, all flags now require double-dashes. (`-foo` becomes `--foo`).
* The collector selection flag has been replaced by individual boolean flags.
* The `-collector.procfs` and `-collector.sysfs` flags have been renamed to `--path.procfs` and `--path.sysfs` respectively.

View file

@ -113,9 +113,13 @@ update_fixtures:
rm -vf collector/fixtures/udev/.unpacked
./ttar -C collector/fixtures -c -f collector/fixtures/udev.ttar udev
.PHONY: tools
tools:
@rm ./tools/tools >/dev/null 2>&1 || true
@$(GO) build -o tools ./tools/...
.PHONY: test-e2e
test-e2e: build collector/fixtures/sys/.unpacked collector/fixtures/udev/.unpacked
test-e2e: build collector/fixtures/sys/.unpacked collector/fixtures/udev/.unpacked tools
@echo ">> running end-to-end tests"
./end-to-end-test.sh

View file

@ -49,23 +49,23 @@ endif
GOTEST := $(GO) test
GOTEST_DIR :=
ifneq ($(CIRCLE_JOB),)
ifneq ($(shell which gotestsum),)
ifneq ($(shell command -v gotestsum 2> /dev/null),)
GOTEST_DIR := test-results
GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml --
endif
endif
PROMU_VERSION ?= 0.14.0
PROMU_VERSION ?= 0.17.0
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.51.2
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
GOLANGCI_LINT_VERSION ?= v1.64.6
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386))
ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386 arm64))
# If we're in CI and there is an Actions file, that means the linter
# is being run in Actions, so we don't need to run it here.
ifneq (,$(SKIP_GOLANGCI_LINT))
@ -169,16 +169,20 @@ common-vet:
common-lint: $(GOLANGCI_LINT)
ifdef GOLANGCI_LINT
@echo ">> running golangci-lint"
# 'go list' needs to be executed before staticcheck to prepopulate the modules cache.
# Otherwise staticcheck might fail randomly for some reason not yet explained.
$(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
endif
.PHONY: common-lint-fix
common-lint-fix: $(GOLANGCI_LINT)
ifdef GOLANGCI_LINT
@echo ">> running golangci-lint fix"
$(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs)
endif
.PHONY: common-yamllint
common-yamllint:
@echo ">> running yamllint on all YAML files in the repository"
ifeq (, $(shell which yamllint))
ifeq (, $(shell command -v yamllint 2> /dev/null))
@echo "yamllint not installed so skipping"
else
yamllint .
@ -204,6 +208,10 @@ common-tarball: promu
@echo ">> building release tarball"
$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
.PHONY: common-docker-repo-name
common-docker-repo-name:
@echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)"
.PHONY: common-docker $(BUILD_DOCKER_ARCHS)
common-docker: $(BUILD_DOCKER_ARCHS)
$(BUILD_DOCKER_ARCHS): common-docker-%:
@ -267,3 +275,9 @@ $(1)_precheck:
exit 1; \
fi
endef
govulncheck: install-govulncheck
govulncheck ./...
install-govulncheck:
command -v govulncheck > /dev/null || go install golang.org/x/vuln/cmd/govulncheck@latest

View file

@ -1,7 +1,8 @@
# Node exporter
[![CircleCI](https://circleci.com/gh/prometheus/node_exporter/tree/master.svg?style=shield)][circleci]
[![Buildkite status](https://badge.buildkite.com/94a0c1fb00b1f46883219c256efe9ce01d63b6505f3a942f9b.svg)](https://buildkite.com/prometheus/node-exporter)
![bsd workflow](https://github.com/prometheus/node_exporter/actions/workflows/bsd.yml/badge.svg)
![golangci-lint workflow](https://github.com/prometheus/node_exporter/actions/workflows/golangci-lint.yml/badge.svg)
[![Docker Repository on Quay](https://quay.io/repository/prometheus/node-exporter/status)][quay]
[![Docker Pulls](https://img.shields.io/docker/pulls/prom/node-exporter.svg?maxAge=604800)][hub]
[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/node_exporter)][goreportcard]
@ -26,10 +27,10 @@ For automated installs with [Ansible](https://www.ansible.com/), there is the [P
### Docker
The `node_exporter` is designed to monitor the host system. It's not recommended
to deploy it as a Docker container because it requires access to the host system.
The `node_exporter` is designed to monitor the host system. Deploying in containers requires
extra care in order to avoid monitoring the container itself.
For situations where Docker deployment is needed, some extra flags must be used to allow
For situations where containerized deployment is needed, some extra flags must be used to allow
the `node_exporter` access to the host namespaces.
Be aware that any non-root mount points you want to monitor will need to be bind-mounted
@ -97,12 +98,16 @@ arp | device | --collector.arp.device-include | --collector.arp.device-exclude
cpu | bugs | --collector.cpu.info.bugs-include | N/A
cpu | flags | --collector.cpu.info.flags-include | N/A
diskstats | device | --collector.diskstats.device-include | --collector.diskstats.device-exclude
ethtool | device | N/A | --collector.ethtool.device-exclude
ethtool | device | --collector.ethtool.device-include | --collector.ethtool.device-exclude
ethtool | metrics | --collector.ethtool.metrics-include | N/A
filesystem | fs-types | N/A | --collector.filesystem.fs-types-exclude
filesystem | mount-points | N/A | --collector.filesystem.mount-points-exclude
filesystem | fs-types | --collector.filesystem.fs-types-include | --collector.filesystem.fs-types-exclude
filesystem | mount-points | --collector.filesystem.mount-points-include | --collector.filesystem.mount-points-exclude
hwmon | chip | --collector.hwmon.chip-include | --collector.hwmon.chip-exclude
hwmon | sensor | --collector.hwmon.sensor-include | --collector.hwmon.sensor-exclude
interrupts | name | --collector.interrupts.name-include | --collector.interrupts.name-exclude
netdev | device | --collector.netdev.device-include | --collector.netdev.device-exclude
qdisk | device | --collector.qdisk.device-include | --collector.qdisk.device-exclude
slabinfo | slab-names | --collector.slabinfo.slabs-include | --collector.slabinfo.slabs-exclude
sysctl | all | --collector.sysctl.include | N/A
systemd | unit | --collector.systemd.unit-include | --collector.systemd.unit-exclude
@ -157,6 +162,7 @@ timex | Exposes selected adjtimex(2) system call stats. | Linux
udp_queues | Exposes UDP total lengths of the rx_queue and tx_queue from `/proc/net/udp` and `/proc/net/udp6`. | Linux
uname | Exposes system information as provided by the uname system call. | Darwin, FreeBSD, Linux, OpenBSD
vmstat | Exposes statistics from `/proc/vmstat`. | Linux
watchdog | Exposes statistics from `/sys/class/watchdog` | Linux
xfs | Exposes XFS runtime statistics. | Linux (kernel 4.4+)
zfs | Exposes [ZFS](http://open-zfs.org/) performance statistics. | FreeBSD, [Linux](http://zfsonlinux.org/), Solaris
@ -183,16 +189,19 @@ Name | Description | OS
---------|-------------|----
buddyinfo | Exposes statistics of memory fragments as reported by /proc/buddyinfo. | Linux
cgroups | A summary of the number of active and enabled cgroups | Linux
cpu\_vulnerabilities | Exposes CPU vulnerability information from sysfs. | Linux
devstat | Exposes device statistics | Dragonfly, FreeBSD
drm | Expose GPU metrics using sysfs / DRM, `amdgpu` is the only driver which exposes this information through DRM | Linux
drbd | Exposes Distributed Replicated Block Device statistics (to version 8.4) | Linux
ethtool | Exposes network interface information and network driver statistics equivalent to `ethtool`, `ethtool -S`, and `ethtool -i`. | Linux
interrupts | Exposes detailed interrupts statistics. | Linux, OpenBSD
ksmd | Exposes kernel and system statistics from `/sys/kernel/mm/ksm`. | Linux
lnstat | Exposes stats from `/proc/net/stat/`. | Linux
logind | Exposes session counts from [logind](http://www.freedesktop.org/wiki/Software/systemd/logind/). | Linux
meminfo\_numa | Exposes memory statistics from `/proc/meminfo_numa`. | Linux
meminfo\_numa | Exposes memory statistics from `/sys/devices/system/node/node[0-9]*/meminfo`, `/sys/devices/system/node/node[0-9]*/numastat`. | Linux
mountstats | Exposes filesystem statistics from `/proc/self/mountstats`. Exposes detailed NFS client statistics. | Linux
network_route | Exposes the routing table as metrics | Linux
pcidevice | Exposes pci devices' information including their link status and parent devices. | Linux
perf | Exposes perf based metrics (Warning: Metrics are dependent on kernel configuration and settings). | Linux
processes | Exposes aggregate process statistics from `/proc`. | Linux
qdisc | Exposes [queuing discipline](https://en.wikipedia.org/wiki/Network_scheduler#Linux_kernel) statistics | Linux
@ -202,6 +211,7 @@ sysctl | Expose sysctl values from `/proc/sys`. Use `--collector.sysctl.include(
systemd | Exposes service and system status from [systemd](http://www.freedesktop.org/wiki/Software/systemd/). | Linux
tcpstat | Exposes TCP connection status information from `/proc/net/tcp` and `/proc/net/tcp6`. (Warning: the current version has potential performance issues in high load situations.) | Linux
wifi | Exposes WiFi device and station statistics. | Linux
xfrm | Exposes statistics from `/proc/net/xfrm_stat` | Linux
zoneinfo | Exposes NUMA memory zone metrics. | Linux
### Deprecated
@ -331,13 +341,21 @@ mv /path/to/directory/role.prom.$$ /path/to/directory/role.prom
The `node_exporter` will expose all metrics from enabled collectors by default. This is the recommended way to collect metrics to avoid errors when comparing metrics of different families.
For advanced use the `node_exporter` can be passed an optional list of collectors to filter metrics. The `collect[]` parameter may be used multiple times. In Prometheus configuration you can use this syntax under the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<scrape_config>).
For advanced use the `node_exporter` can be passed an optional list of collectors to filter metrics. The parameters `collect[]` and `exclude[]` can be used multiple times (but cannot be combined). In Prometheus configuration you can use this syntax under the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<scrape_config>).
Collect only `cpu` and `meminfo` collector metrics:
```
params:
collect[]:
- foo
- bar
- cpu
- meminfo
```
Collect all enabled collector metrics but exclude `netdev`:
```
params:
exclude[]:
- netdev
```
This can be useful for having different Prometheus servers collect specific metrics from nodes.
@ -366,7 +384,7 @@ To see all available configuration flags:
## TLS endpoint
** EXPERIMENTAL **
**EXPERIMENTAL**
The exporter supports TLS via a new web configuration file.
@ -374,7 +392,7 @@ The exporter supports TLS via a new web configuration file.
./node_exporter --web.config.file=web-config.yml
```
See the [exporter-toolkit https package](https://github.com/prometheus/exporter-toolkit/blob/v0.1.0/https/README.md) for more details.
See the [exporter-toolkit web-configuration](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md) for more details.
[travis]: https://travis-ci.org/prometheus/node_exporter
[hub]: https://hub.docker.com/r/prom/node-exporter/

View file

@ -1 +1 @@
1.6.0
1.9.0

View file

@ -18,22 +18,26 @@ package collector
import (
"fmt"
"log/slog"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/jsimonetti/rtnetlink/v2/rtnl"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
"golang.org/x/sys/unix"
)
var (
arpDeviceInclude = kingpin.Flag("collector.arp.device-include", "Regexp of arp devices to include (mutually exclusive to device-exclude).").String()
arpDeviceExclude = kingpin.Flag("collector.arp.device-exclude", "Regexp of arp devices to exclude (mutually exclusive to device-include).").String()
arpNetlink = kingpin.Flag("collector.arp.netlink", "Use netlink to gather stats instead of /proc/net/arp.").Default("true").Bool()
)
type arpCollector struct {
fs procfs.FS
deviceFilter deviceFilter
entries *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -41,7 +45,7 @@ func init() {
}
// NewARPCollector returns a new Collector exposing ARP stats.
func NewARPCollector(logger log.Logger) (Collector, error) {
func NewARPCollector(logger *slog.Logger) (Collector, error) {
fs, err := procfs.NewFS(*procPath)
if err != nil {
return nil, fmt.Errorf("failed to open procfs: %w", err)
@ -69,13 +73,51 @@ func getTotalArpEntries(deviceEntries []procfs.ARPEntry) map[string]uint32 {
return entries
}
func getTotalArpEntriesRTNL() (map[string]uint32, error) {
conn, err := rtnl.Dial(nil)
if err != nil {
return nil, err
}
defer conn.Close()
// Neighbors will also contain IPv6 neighbors, but since this is purely an ARP collector,
// restrict to AF_INET.
neighbors, err := conn.Neighbours(nil, unix.AF_INET)
if err != nil {
return nil, err
}
// Map of interface name to ARP neighbor count.
entries := make(map[string]uint32)
for _, n := range neighbors {
// Skip entries which have state NUD_NOARP to conform to output of /proc/net/arp.
if n.State&unix.NUD_NOARP == 0 {
entries[n.Interface.Name]++
}
}
return entries, nil
}
func (c *arpCollector) Update(ch chan<- prometheus.Metric) error {
var enumeratedEntry map[string]uint32
if *arpNetlink {
var err error
enumeratedEntry, err = getTotalArpEntriesRTNL()
if err != nil {
return fmt.Errorf("could not get ARP entries: %w", err)
}
} else {
entries, err := c.fs.GatherARPEntries()
if err != nil {
return fmt.Errorf("could not get ARP entries: %w", err)
}
enumeratedEntry := getTotalArpEntries(entries)
enumeratedEntry = getTotalArpEntries(entries)
}
for device, entryCount := range enumeratedEntry {
if c.deviceFilter.ignored(device) {

View file

@ -18,9 +18,9 @@ package collector
import (
"fmt"
"log/slog"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/bcache"
)
@ -36,12 +36,12 @@ func init() {
// A bcacheCollector is a Collector which gathers metrics from Linux bcache.
type bcacheCollector struct {
fs bcache.FS
logger log.Logger
logger *slog.Logger
}
// NewBcacheCollector returns a newly allocated bcacheCollector.
// It exposes a number of Linux bcache statistics.
func NewBcacheCollector(logger log.Logger) (Collector, error) {
func NewBcacheCollector(logger *slog.Logger) (Collector, error) {
fs, err := bcache.NewFS(*sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)

View file

@ -19,18 +19,17 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"os"
"path/filepath"
"strings"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
)
type bondingCollector struct {
slaves, active typedDesc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -39,7 +38,7 @@ func init() {
// NewBondingCollector returns a newly allocated bondingCollector.
// It exposes the number of configured and active slave of linux bonding interfaces.
func NewBondingCollector(logger log.Logger) (Collector, error) {
func NewBondingCollector(logger *slog.Logger) (Collector, error) {
return &bondingCollector{
slaves: typedDesc{prometheus.NewDesc(
prometheus.BuildFQName(namespace, "bonding", "slaves"),
@ -61,7 +60,7 @@ func (c *bondingCollector) Update(ch chan<- prometheus.Metric) error {
bondingStats, err := readBondingStats(statusfile)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
level.Debug(c.logger).Log("msg", "Not collecting bonding, file does not exist", "file", statusfile)
c.logger.Debug("Not collecting bonding, file does not exist", "file", statusfile)
return ErrNoData
}
return err

View file

@ -11,6 +11,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nobonding
// +build !nobonding
package collector
import (

View file

@ -18,13 +18,13 @@
package collector
import (
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
"log/slog"
)
type bootTimeCollector struct {
logger log.Logger
logger *slog.Logger
}
func init() {
@ -32,7 +32,7 @@ func init() {
}
// newBootTimeCollector returns a new Collector exposing system boot time on BSD systems.
func newBootTimeCollector(logger log.Logger) (Collector, error) {
func newBootTimeCollector(logger *slog.Logger) (Collector, error) {
return &bootTimeCollector{
logger: logger,
}, nil

View file

@ -11,27 +11,27 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build solaris && !noboottime
// +build solaris,!noboottime
//go:build !noboottime
// +build !noboottime
package collector
import (
"github.com/go-kit/log"
"github.com/illumos/go-kstat"
"github.com/prometheus/client_golang/prometheus"
"log/slog"
)
type bootTimeCollector struct {
boottime typedDesc
logger log.Logger
logger *slog.Logger
}
func init() {
registerCollector("boottime", defaultEnabled, newBootTimeCollector)
}
func newBootTimeCollector(logger log.Logger) (Collector, error) {
func newBootTimeCollector(logger *slog.Logger) (Collector, error) {
return &bootTimeCollector{
boottime: typedDesc{
prometheus.NewDesc(

View file

@ -18,13 +18,12 @@ package collector
import (
"fmt"
"log/slog"
"path"
"strings"
"syscall"
dennwc "github.com/dennwc/btrfs"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/btrfs"
)
@ -32,7 +31,7 @@ import (
// A btrfsCollector is a Collector which gathers metrics from Btrfs filesystems.
type btrfsCollector struct {
fs btrfs.FS
logger log.Logger
logger *slog.Logger
}
func init() {
@ -40,7 +39,7 @@ func init() {
}
// NewBtrfsCollector returns a new Collector exposing Btrfs statistics.
func NewBtrfsCollector(logger log.Logger) (Collector, error) {
func NewBtrfsCollector(logger *slog.Logger) (Collector, error) {
fs, err := btrfs.NewFS(*sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)
@ -62,15 +61,15 @@ func (c *btrfsCollector) Update(ch chan<- prometheus.Metric) error {
ioctlStatsMap, err := c.getIoctlStats()
if err != nil {
level.Debug(c.logger).Log(
"msg", "Error querying btrfs device stats with ioctl",
c.logger.Debug(
"Error querying btrfs device stats with ioctl",
"err", err)
ioctlStatsMap = make(map[string]*btrfsIoctlFsStats)
}
for _, s := range stats {
// match up procfs and ioctl info by filesystem UUID (without dashes)
var fsUUID = strings.Replace(s.UUID, "-", "", -1)
var fsUUID = strings.ReplaceAll(s.UUID, "-", "")
ioctlStats := ioctlStatsMap[fsUUID]
c.updateBtrfsStats(ch, s, ioctlStats)
}
@ -129,19 +128,20 @@ func (c *btrfsCollector) getIoctlStats() (map[string]*btrfsIoctlFsStats, error)
if err != nil {
// Failed to open this mount point, maybe we didn't have permission
// maybe we'll find another mount point for this FS later.
level.Debug(c.logger).Log(
"msg", "Error inspecting btrfs mountpoint",
c.logger.Debug(
"Error inspecting btrfs mountpoint",
"mountPoint", mountPath,
"err", err)
continue
}
defer fs.Close()
fsInfo, err := fs.Info()
if err != nil {
// Failed to get the FS info for some reason,
// perhaps it'll work with a different mount point
level.Debug(c.logger).Log(
"msg", "Error querying btrfs filesystem",
c.logger.Debug(
"Error querying btrfs filesystem",
"mountPoint", mountPath,
"err", err)
continue
@ -155,8 +155,8 @@ func (c *btrfsCollector) getIoctlStats() (map[string]*btrfsIoctlFsStats, error)
deviceStats, err := c.getIoctlDeviceStats(fs, &fsInfo)
if err != nil {
level.Debug(c.logger).Log(
"msg", "Error querying btrfs device stats",
c.logger.Debug(
"Error querying btrfs device stats",
"mountPoint", mountPath,
"err", err)
continue
@ -274,6 +274,30 @@ func (c *btrfsCollector) getMetrics(s *btrfs.Stats, ioctlStats *btrfsIoctlFsStat
metricType: prometheus.GaugeValue,
value: float64(s.Allocation.GlobalRsvSize),
},
{
name: "commits_total",
desc: "The total number of commits that have occurred.",
metricType: prometheus.CounterValue,
value: float64(s.CommitStats.Commits),
},
{
name: "last_commit_seconds",
desc: "Duration of the most recent commit, in seconds.",
metricType: prometheus.GaugeValue,
value: float64(s.CommitStats.LastCommitMs) / 1000,
},
{
name: "max_commit_seconds",
desc: "Duration of the slowest commit, in seconds.",
metricType: prometheus.GaugeValue,
value: float64(s.CommitStats.MaxCommitMs) / 1000,
},
{
name: "commit_seconds_total",
desc: "Sum of the duration of all commits, in seconds.",
metricType: prometheus.CounterValue,
value: float64(s.CommitStats.TotalCommitMs) / 1000,
},
}
// Information about data, metadata and system data.

View file

@ -27,6 +27,10 @@ var expectedBtrfsMetrics = [][]btrfsMetric{
{
{name: "info", value: 1, extraLabel: []string{"label"}, extraLabelValue: []string{"fixture"}},
{name: "global_rsv_size_bytes", value: 1.6777216e+07},
{name: "commits_total", value: 258051, metricType: 1},
{name: "last_commit_seconds", value: 1.0},
{name: "max_commit_seconds", value: 51.462},
{name: "commit_seconds_total", value: 47836.090, metricType: 1},
{name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"data"}},
{name: "used_bytes", value: 8.08189952e+08, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid0"}},
{name: "size_bytes", value: 2.147483648e+09, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid0"}},
@ -45,6 +49,10 @@ var expectedBtrfsMetrics = [][]btrfsMetric{
{
{name: "info", value: 1, extraLabel: []string{"label"}, extraLabelValue: []string{""}},
{name: "global_rsv_size_bytes", value: 1.6777216e+07},
{name: "commits_total", value: 0, metricType: 1},
{name: "last_commit_seconds", value: 0},
{name: "max_commit_seconds", value: 0},
{name: "commit_seconds_total", value: 0, metricType: 1},
{name: "reserved_bytes", value: 0, extraLabel: []string{"block_group_type"}, extraLabelValue: []string{"data"}},
{name: "used_bytes", value: 0, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid5"}},
{name: "size_bytes", value: 6.44087808e+08, extraLabel: []string{"block_group_type", "mode"}, extraLabelValue: []string{"data", "raid5"}},
@ -92,7 +100,10 @@ func checkMetric(exp, got *btrfsMetric) bool {
}
func TestBtrfs(t *testing.T) {
fs, _ := btrfs.NewFS("fixtures/sys")
fs, err := btrfs.NewFS("fixtures/sys")
if err != nil {
t.Fatal(err)
}
collector := &btrfsCollector{fs: fs}
stats, err := collector.fs.Stats()

View file

@ -18,10 +18,9 @@ package collector
import (
"fmt"
"log/slog"
"strconv"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
)
@ -33,7 +32,7 @@ const (
type buddyinfoCollector struct {
fs procfs.FS
desc *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -41,7 +40,7 @@ func init() {
}
// NewBuddyinfoCollector returns a new Collector exposing buddyinfo stats.
func NewBuddyinfoCollector(logger log.Logger) (Collector, error) {
func NewBuddyinfoCollector(logger *slog.Logger) (Collector, error) {
desc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, buddyInfoSubsystem, "blocks"),
"Count of free blocks according to size.",
@ -62,7 +61,7 @@ func (c *buddyinfoCollector) Update(ch chan<- prometheus.Metric) error {
return fmt.Errorf("couldn't get buddyinfo: %w", err)
}
level.Debug(c.logger).Log("msg", "Set node_buddy", "buddyInfo", buddyInfo)
c.logger.Debug("Set node_buddy", "buddyInfo", buddyInfo)
for _, entry := range buddyInfo {
for size, value := range entry.Sizes {
ch <- prometheus.MustNewConstMetric(

View file

@ -18,8 +18,8 @@ package collector
import (
"fmt"
"log/slog"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
)
@ -30,7 +30,7 @@ type cgroupSummaryCollector struct {
fs procfs.FS
cgroups *prometheus.Desc
enabled *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -38,7 +38,7 @@ func init() {
}
// NewCgroupSummaryCollector returns a new Collector exposing a summary of cgroups.
func NewCgroupSummaryCollector(logger log.Logger) (Collector, error) {
func NewCgroupSummaryCollector(logger *slog.Logger) (Collector, error) {
fs, err := procfs.NewFS(*procPath)
if err != nil {
return nil, fmt.Errorf("failed to open procfs: %w", err)

View file

@ -17,12 +17,11 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"sync"
"time"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
)
@ -50,14 +49,14 @@ const (
)
var (
factories = make(map[string]func(logger log.Logger) (Collector, error))
factories = make(map[string]func(logger *slog.Logger) (Collector, error))
initiatedCollectorsMtx = sync.Mutex{}
initiatedCollectors = make(map[string]Collector)
collectorState = make(map[string]*bool)
forcedCollectors = map[string]bool{} // collectors which have been explicitly enabled or disabled
)
func registerCollector(collector string, isDefaultEnabled bool, factory func(logger log.Logger) (Collector, error)) {
func registerCollector(collector string, isDefaultEnabled bool, factory func(logger *slog.Logger) (Collector, error)) {
var helpDefaultState string
if isDefaultEnabled {
helpDefaultState = "enabled"
@ -78,7 +77,7 @@ func registerCollector(collector string, isDefaultEnabled bool, factory func(log
// NodeCollector implements the prometheus.Collector interface.
type NodeCollector struct {
Collectors map[string]Collector
logger log.Logger
logger *slog.Logger
}
// DisableDefaultCollectors sets the collector state to false for all collectors which
@ -104,7 +103,7 @@ func collectorFlagAction(collector string) func(ctx *kingpin.ParseContext) error
}
// NewNodeCollector creates a new NodeCollector.
func NewNodeCollector(logger log.Logger, filters ...string) (*NodeCollector, error) {
func NewNodeCollector(logger *slog.Logger, filters ...string) (*NodeCollector, error) {
f := make(map[string]bool)
for _, filter := range filters {
enabled, exist := collectorState[filter]
@ -126,7 +125,7 @@ func NewNodeCollector(logger log.Logger, filters ...string) (*NodeCollector, err
if collector, ok := initiatedCollectors[key]; ok {
collectors[key] = collector
} else {
collector, err := factories[key](log.With(logger, "collector", key))
collector, err := factories[key](logger.With("collector", key))
if err != nil {
return nil, err
}
@ -156,7 +155,7 @@ func (n NodeCollector) Collect(ch chan<- prometheus.Metric) {
wg.Wait()
}
func execute(name string, c Collector, ch chan<- prometheus.Metric, logger log.Logger) {
func execute(name string, c Collector, ch chan<- prometheus.Metric, logger *slog.Logger) {
begin := time.Now()
err := c.Update(ch)
duration := time.Since(begin)
@ -164,13 +163,13 @@ func execute(name string, c Collector, ch chan<- prometheus.Metric, logger log.L
if err != nil {
if IsNoDataError(err) {
level.Debug(logger).Log("msg", "collector returned no data", "name", name, "duration_seconds", duration.Seconds(), "err", err)
logger.Debug("collector returned no data", "name", name, "duration_seconds", duration.Seconds(), "err", err)
} else {
level.Error(logger).Log("msg", "collector failed", "name", name, "duration_seconds", duration.Seconds(), "err", err)
logger.Error("collector failed", "name", name, "duration_seconds", duration.Seconds(), "err", err)
}
success = 0
} else {
level.Debug(logger).Log("msg", "collector succeeded", "name", name, "duration_seconds", duration.Seconds())
logger.Debug("collector succeeded", "name", name, "duration_seconds", duration.Seconds())
success = 1
}
ch <- prometheus.MustNewConstMetric(scrapeDurationDesc, prometheus.GaugeValue, duration.Seconds(), name)

View file

@ -19,10 +19,9 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"os"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
)
@ -38,7 +37,7 @@ type conntrackCollector struct {
drop *prometheus.Desc
earlyDrop *prometheus.Desc
searchRestart *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
type conntrackStatistics struct {
@ -57,7 +56,7 @@ func init() {
}
// NewConntrackCollector returns a new Collector exposing conntrack stats.
func NewConntrackCollector(logger log.Logger) (Collector, error) {
func NewConntrackCollector(logger *slog.Logger) (Collector, error) {
return &conntrackCollector{
current: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "nf_conntrack_entries"),
@ -154,7 +153,7 @@ func (c *conntrackCollector) Update(ch chan<- prometheus.Metric) error {
func (c *conntrackCollector) handleErr(err error) error {
if errors.Is(err, os.ErrNotExist) {
level.Debug(c.logger).Log("msg", "conntrack probably not loaded")
c.logger.Debug("conntrack probably not loaded")
return ErrNoData
}
return fmt.Errorf("failed to retrieve conntrack stats: %w", err)

132
collector/cpu_aix.go Normal file
View file

@ -0,0 +1,132 @@
// Copyright 2024 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nocpu
// +build !nocpu
package collector
/*
#include <unistd.h> // Include the standard Unix header
#include <errno.h> // For errno
*/
import "C"
import (
"fmt"
"log/slog"
"strconv"
"github.com/power-devops/perfstat"
"github.com/prometheus/client_golang/prometheus"
)
var (
nodeCPUPhysicalSecondsDesc = prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "physical_seconds_total"),
"Seconds the physical CPUs spent in each mode.",
[]string{"cpu", "mode"}, nil,
)
nodeCPUSRunQueueDesc = prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "runqueue"),
"Length of the run queue.", []string{"cpu"}, nil,
)
nodeCPUFlagsDesc = prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "flags"),
"CPU flags.",
[]string{"cpu", "flag"}, nil,
)
nodeCPUContextSwitchDesc = prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "context_switches_total"),
"Number of context switches.",
[]string{"cpu"}, nil,
)
)
type cpuCollector struct {
cpu typedDesc
cpuPhysical typedDesc
cpuRunQueue typedDesc
cpuFlags typedDesc
cpuContextSwitch typedDesc
logger *slog.Logger
tickPerSecond float64
purrTicksPerSecond float64
}
func init() {
registerCollector("cpu", defaultEnabled, NewCpuCollector)
}
func tickPerSecond() (float64, error) {
ticks, err := C.sysconf(C._SC_CLK_TCK)
if ticks == -1 || err != nil {
return 0, fmt.Errorf("failed to get clock ticks per second: %v", err)
}
return float64(ticks), nil
}
func NewCpuCollector(logger *slog.Logger) (Collector, error) {
ticks, err := tickPerSecond()
if err != nil {
return nil, err
}
pconfig, err := perfstat.PartitionStat()
if err != nil {
return nil, err
}
return &cpuCollector{
cpu: typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},
cpuPhysical: typedDesc{nodeCPUPhysicalSecondsDesc, prometheus.CounterValue},
cpuRunQueue: typedDesc{nodeCPUSRunQueueDesc, prometheus.GaugeValue},
cpuFlags: typedDesc{nodeCPUFlagsDesc, prometheus.GaugeValue},
cpuContextSwitch: typedDesc{nodeCPUContextSwitchDesc, prometheus.CounterValue},
logger: logger,
tickPerSecond: ticks,
purrTicksPerSecond: float64(pconfig.ProcessorMhz * 1e6),
}, nil
}
func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
stats, err := perfstat.CpuStat()
if err != nil {
return err
}
for n, stat := range stats {
// LPAR metrics
ch <- c.cpu.mustNewConstMetric(float64(stat.User)/c.tickPerSecond, strconv.Itoa(n), "user")
ch <- c.cpu.mustNewConstMetric(float64(stat.Sys)/c.tickPerSecond, strconv.Itoa(n), "system")
ch <- c.cpu.mustNewConstMetric(float64(stat.Idle)/c.tickPerSecond, strconv.Itoa(n), "idle")
ch <- c.cpu.mustNewConstMetric(float64(stat.Wait)/c.tickPerSecond, strconv.Itoa(n), "wait")
// Physical CPU metrics
ch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PIdle)/c.purrTicksPerSecond, strconv.Itoa(n), "pidle")
ch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PUser)/c.purrTicksPerSecond, strconv.Itoa(n), "puser")
ch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PSys)/c.purrTicksPerSecond, strconv.Itoa(n), "psys")
ch <- c.cpuPhysical.mustNewConstMetric(float64(stat.PWait)/c.purrTicksPerSecond, strconv.Itoa(n), "pwait")
// Run queue length
ch <- c.cpuRunQueue.mustNewConstMetric(float64(stat.RunQueue), strconv.Itoa(n))
// Flags
ch <- c.cpuFlags.mustNewConstMetric(float64(stat.SpurrFlag), strconv.Itoa(n), "spurr")
// Context switches
ch <- c.cpuContextSwitch.mustNewConstMetric(float64(stat.CSwitches), strconv.Itoa(n))
}
return nil
}

View file

@ -23,10 +23,10 @@ import (
"bytes"
"encoding/binary"
"fmt"
"log/slog"
"strconv"
"unsafe"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)
@ -53,7 +53,7 @@ const ClocksPerSec = float64(C.CLK_TCK)
type statCollector struct {
cpu *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -61,7 +61,7 @@ func init() {
}
// NewCPUCollector returns a new Collector exposing CPU stats.
func NewCPUCollector(logger log.Logger) (Collector, error) {
func NewCPUCollector(logger *slog.Logger) (Collector, error) {
return &statCollector{
cpu: nodeCPUSecondsDesc,
logger: logger,

View file

@ -18,10 +18,10 @@ package collector
import (
"errors"
"log/slog"
"strconv"
"unsafe"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)
@ -78,7 +78,7 @@ const maxCPUTimesLen = C.MAXCPU * C.CPUSTATES
type statCollector struct {
cpu *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -86,7 +86,7 @@ func init() {
}
// NewStatCollector returns a new Collector exposing CPU stats.
func NewStatCollector(logger log.Logger) (Collector, error) {
func NewStatCollector(logger *slog.Logger) (Collector, error) {
return &statCollector{
cpu: nodeCPUSecondsDesc,
logger: logger,

View file

@ -18,12 +18,11 @@ package collector
import (
"fmt"
"log/slog"
"math"
"strconv"
"unsafe"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
)
@ -85,7 +84,7 @@ func getCPUTimes() ([]cputime, error) {
type statCollector struct {
cpu typedDesc
temp typedDesc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -93,7 +92,7 @@ func init() {
}
// NewStatCollector returns a new Collector exposing CPU stats.
func NewStatCollector(logger log.Logger) (Collector, error) {
func NewStatCollector(logger *slog.Logger) (Collector, error) {
return &statCollector{
cpu: typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},
temp: typedDesc{prometheus.NewDesc(
@ -134,11 +133,11 @@ func (c *statCollector) Update(ch chan<- prometheus.Metric) error {
if err != nil {
if err == unix.ENOENT {
// No temperature information for this CPU
level.Debug(c.logger).Log("msg", "no temperature information for CPU", "cpu", cpu)
c.logger.Debug("no temperature information for CPU", "cpu", cpu)
} else {
// Unexpected error
ch <- c.temp.mustNewConstMetric(math.NaN(), lcpu)
level.Error(c.logger).Log("msg", "failed to query CPU temperature for CPU", "cpu", cpu, "err", err)
c.logger.Error("failed to query CPU temperature for CPU", "cpu", cpu, "err", err)
}
continue
}

View file

@ -17,34 +17,38 @@
package collector
import (
"errors"
"fmt"
"log/slog"
"os"
"path/filepath"
"regexp"
"slices"
"strconv"
"sync"
"golang.org/x/exp/maps"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
"github.com/prometheus/procfs/sysfs"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
)
type cpuCollector struct {
fs procfs.FS
procfs procfs.FS
sysfs sysfs.FS
cpu *prometheus.Desc
cpuInfo *prometheus.Desc
cpuFrequencyHz *prometheus.Desc
cpuFlagsInfo *prometheus.Desc
cpuBugsInfo *prometheus.Desc
cpuGuest *prometheus.Desc
cpuCoreThrottle *prometheus.Desc
cpuPackageThrottle *prometheus.Desc
cpuIsolated *prometheus.Desc
logger log.Logger
logger *slog.Logger
cpuOnline *prometheus.Desc
cpuStats map[int64]procfs.CPUStat
cpuStatsMutex sync.Mutex
isolatedCpus []uint16
@ -69,33 +73,39 @@ func init() {
}
// NewCPUCollector returns a new Collector exposing kernel/system statistics.
func NewCPUCollector(logger log.Logger) (Collector, error) {
fs, err := procfs.NewFS(*procPath)
func NewCPUCollector(logger *slog.Logger) (Collector, error) {
pfs, err := procfs.NewFS(*procPath)
if err != nil {
return nil, fmt.Errorf("failed to open procfs: %w", err)
}
sysfs, err := sysfs.NewFS(*sysPath)
sfs, err := sysfs.NewFS(*sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)
}
isolcpus, err := sysfs.IsolatedCPUs()
isolcpus, err := sfs.IsolatedCPUs()
if err != nil {
if !os.IsNotExist(err) {
return nil, fmt.Errorf("Unable to get isolated cpus: %w", err)
return nil, fmt.Errorf("unable to get isolated cpus: %w", err)
}
level.Debug(logger).Log("msg", "Could not open isolated file", "error", err)
logger.Debug("Could not open isolated file", "error", err)
}
c := &cpuCollector{
fs: fs,
procfs: pfs,
sysfs: sfs,
cpu: nodeCPUSecondsDesc,
cpuInfo: prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "info"),
"CPU information from /proc/cpuinfo.",
[]string{"package", "core", "cpu", "vendor", "family", "model", "model_name", "microcode", "stepping", "cachesize"}, nil,
),
cpuFrequencyHz: prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "frequency_hertz"),
"CPU frequency in hertz from /proc/cpuinfo.",
[]string{"package", "core", "cpu"}, nil,
),
cpuFlagsInfo: prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "flag_info"),
"The `flags` field of CPU information from /proc/cpuinfo taken from the first core.",
@ -126,6 +136,11 @@ func NewCPUCollector(logger log.Logger) (Collector, error) {
"Whether each core is isolated, information from /sys/devices/system/cpu/isolated.",
[]string{"cpu"}, nil,
),
cpuOnline: prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "online"),
"CPUs that are online and being scheduled.",
[]string{"cpu"}, nil,
),
logger: logger,
isolatedCpus: isolcpus,
cpuStats: make(map[int64]procfs.CPUStat),
@ -140,7 +155,7 @@ func NewCPUCollector(logger log.Logger) (Collector, error) {
func (c *cpuCollector) compileIncludeFlags(flagsIncludeFlag, bugsIncludeFlag *string) error {
if (*flagsIncludeFlag != "" || *bugsIncludeFlag != "") && !*enableCPUInfo {
*enableCPUInfo = true
level.Info(c.logger).Log("msg", "--collector.cpu.info has been set to `true` because you set the following flags, like --collector.cpu.info.flags-include and --collector.cpu.info.bugs-include")
c.logger.Info("--collector.cpu.info has been set to `true` because you set the following flags, like --collector.cpu.info.flags-include and --collector.cpu.info.bugs-include")
}
var err error
@ -172,12 +187,21 @@ func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
if c.isolatedCpus != nil {
c.updateIsolated(ch)
}
return c.updateThermalThrottle(ch)
err := c.updateThermalThrottle(ch)
if err != nil {
return err
}
err = c.updateOnline(ch)
if err != nil {
return err
}
return nil
}
// updateInfo reads /proc/cpuinfo
func (c *cpuCollector) updateInfo(ch chan<- prometheus.Metric) error {
info, err := c.fs.CPUInfo()
info, err := c.procfs.CPUInfo()
if err != nil {
return err
}
@ -197,6 +221,20 @@ func (c *cpuCollector) updateInfo(ch chan<- prometheus.Metric) error {
cpu.CacheSize)
}
cpuFreqEnabled, ok := collectorState["cpufreq"]
if !ok || cpuFreqEnabled == nil {
c.logger.Debug("cpufreq key missing or nil value in collectorState map")
} else if !*cpuFreqEnabled {
for _, cpu := range info {
ch <- prometheus.MustNewConstMetric(c.cpuFrequencyHz,
prometheus.GaugeValue,
cpu.CPUMHz*1e6,
cpu.PhysicalID,
cpu.CoreID,
strconv.Itoa(int(cpu.Processor)))
}
}
if len(info) != 0 {
cpu := info[0]
if err := updateFieldInfo(cpu.Flags, c.cpuFlagsIncludeRegexp, c.cpuFlagsInfo, ch); err != nil {
@ -249,12 +287,12 @@ func (c *cpuCollector) updateThermalThrottle(ch chan<- prometheus.Metric) error
// topology/physical_package_id
if physicalPackageID, err = readUintFromFile(filepath.Join(cpu, "topology", "physical_package_id")); err != nil {
level.Debug(c.logger).Log("msg", "CPU is missing physical_package_id", "cpu", cpu)
c.logger.Debug("CPU is missing physical_package_id", "cpu", cpu)
continue
}
// topology/core_id
if coreID, err = readUintFromFile(filepath.Join(cpu, "topology", "core_id")); err != nil {
level.Debug(c.logger).Log("msg", "CPU is missing core_id", "cpu", cpu)
c.logger.Debug("CPU is missing core_id", "cpu", cpu)
continue
}
@ -272,7 +310,7 @@ func (c *cpuCollector) updateThermalThrottle(ch chan<- prometheus.Metric) error
if coreThrottleCount, err := readUintFromFile(filepath.Join(cpu, "thermal_throttle", "core_throttle_count")); err == nil {
packageCoreThrottles[physicalPackageID][coreID] = coreThrottleCount
} else {
level.Debug(c.logger).Log("msg", "CPU is missing core_throttle_count", "cpu", cpu)
c.logger.Debug("CPU is missing core_throttle_count", "cpu", cpu)
}
}
@ -282,7 +320,7 @@ func (c *cpuCollector) updateThermalThrottle(ch chan<- prometheus.Metric) error
if packageThrottleCount, err := readUintFromFile(filepath.Join(cpu, "thermal_throttle", "package_throttle_count")); err == nil {
packageThrottles[physicalPackageID] = packageThrottleCount
} else {
level.Debug(c.logger).Log("msg", "CPU is missing package_throttle_count", "cpu", cpu)
c.logger.Debug("CPU is missing package_throttle_count", "cpu", cpu)
}
}
}
@ -314,9 +352,31 @@ func (c *cpuCollector) updateIsolated(ch chan<- prometheus.Metric) {
}
}
// updateOnline reads /sys/devices/system/cpu/cpu*/online through sysfs and exports online status metrics.
func (c *cpuCollector) updateOnline(ch chan<- prometheus.Metric) error {
cpus, err := c.sysfs.CPUs()
if err != nil {
return err
}
// No-op if the system does not support CPU online stats.
cpu0 := cpus[0]
if _, err := cpu0.Online(); err != nil && errors.Is(err, os.ErrNotExist) {
return nil
}
for _, cpu := range cpus {
setOnline := float64(0)
if online, _ := cpu.Online(); online {
setOnline = 1
}
ch <- prometheus.MustNewConstMetric(c.cpuOnline, prometheus.GaugeValue, setOnline, cpu.Number())
}
return nil
}
// updateStat reads /proc/stat through procfs and exports CPU-related metrics.
func (c *cpuCollector) updateStat(ch chan<- prometheus.Metric) error {
stats, err := c.fs.Stat()
stats, err := c.procfs.Stat()
if err != nil {
return err
}
@ -360,68 +420,68 @@ func (c *cpuCollector) updateCPUStats(newStats map[int64]procfs.CPUStat) {
// If idle jumps backwards by more than X seconds, assume we had a hotplug event and reset the stats for this CPU.
if (cpuStats.Idle - n.Idle) >= jumpBackSeconds {
level.Debug(c.logger).Log("msg", jumpBackDebugMessage, "cpu", i, "old_value", cpuStats.Idle, "new_value", n.Idle)
c.logger.Debug(jumpBackDebugMessage, "cpu", i, "old_value", cpuStats.Idle, "new_value", n.Idle)
cpuStats = procfs.CPUStat{}
}
if n.Idle >= cpuStats.Idle {
cpuStats.Idle = n.Idle
} else {
level.Debug(c.logger).Log("msg", "CPU Idle counter jumped backwards", "cpu", i, "old_value", cpuStats.Idle, "new_value", n.Idle)
c.logger.Debug("CPU Idle counter jumped backwards", "cpu", i, "old_value", cpuStats.Idle, "new_value", n.Idle)
}
if n.User >= cpuStats.User {
cpuStats.User = n.User
} else {
level.Debug(c.logger).Log("msg", "CPU User counter jumped backwards", "cpu", i, "old_value", cpuStats.User, "new_value", n.User)
c.logger.Debug("CPU User counter jumped backwards", "cpu", i, "old_value", cpuStats.User, "new_value", n.User)
}
if n.Nice >= cpuStats.Nice {
cpuStats.Nice = n.Nice
} else {
level.Debug(c.logger).Log("msg", "CPU Nice counter jumped backwards", "cpu", i, "old_value", cpuStats.Nice, "new_value", n.Nice)
c.logger.Debug("CPU Nice counter jumped backwards", "cpu", i, "old_value", cpuStats.Nice, "new_value", n.Nice)
}
if n.System >= cpuStats.System {
cpuStats.System = n.System
} else {
level.Debug(c.logger).Log("msg", "CPU System counter jumped backwards", "cpu", i, "old_value", cpuStats.System, "new_value", n.System)
c.logger.Debug("CPU System counter jumped backwards", "cpu", i, "old_value", cpuStats.System, "new_value", n.System)
}
if n.Iowait >= cpuStats.Iowait {
cpuStats.Iowait = n.Iowait
} else {
level.Debug(c.logger).Log("msg", "CPU Iowait counter jumped backwards", "cpu", i, "old_value", cpuStats.Iowait, "new_value", n.Iowait)
c.logger.Debug("CPU Iowait counter jumped backwards", "cpu", i, "old_value", cpuStats.Iowait, "new_value", n.Iowait)
}
if n.IRQ >= cpuStats.IRQ {
cpuStats.IRQ = n.IRQ
} else {
level.Debug(c.logger).Log("msg", "CPU IRQ counter jumped backwards", "cpu", i, "old_value", cpuStats.IRQ, "new_value", n.IRQ)
c.logger.Debug("CPU IRQ counter jumped backwards", "cpu", i, "old_value", cpuStats.IRQ, "new_value", n.IRQ)
}
if n.SoftIRQ >= cpuStats.SoftIRQ {
cpuStats.SoftIRQ = n.SoftIRQ
} else {
level.Debug(c.logger).Log("msg", "CPU SoftIRQ counter jumped backwards", "cpu", i, "old_value", cpuStats.SoftIRQ, "new_value", n.SoftIRQ)
c.logger.Debug("CPU SoftIRQ counter jumped backwards", "cpu", i, "old_value", cpuStats.SoftIRQ, "new_value", n.SoftIRQ)
}
if n.Steal >= cpuStats.Steal {
cpuStats.Steal = n.Steal
} else {
level.Debug(c.logger).Log("msg", "CPU Steal counter jumped backwards", "cpu", i, "old_value", cpuStats.Steal, "new_value", n.Steal)
c.logger.Debug("CPU Steal counter jumped backwards", "cpu", i, "old_value", cpuStats.Steal, "new_value", n.Steal)
}
if n.Guest >= cpuStats.Guest {
cpuStats.Guest = n.Guest
} else {
level.Debug(c.logger).Log("msg", "CPU Guest counter jumped backwards", "cpu", i, "old_value", cpuStats.Guest, "new_value", n.Guest)
c.logger.Debug("CPU Guest counter jumped backwards", "cpu", i, "old_value", cpuStats.Guest, "new_value", n.Guest)
}
if n.GuestNice >= cpuStats.GuestNice {
cpuStats.GuestNice = n.GuestNice
} else {
level.Debug(c.logger).Log("msg", "CPU GuestNice counter jumped backwards", "cpu", i, "old_value", cpuStats.GuestNice, "new_value", n.GuestNice)
c.logger.Debug("CPU GuestNice counter jumped backwards", "cpu", i, "old_value", cpuStats.GuestNice, "new_value", n.GuestNice)
}
c.cpuStats[i] = cpuStats

View file

@ -17,10 +17,11 @@
package collector
import (
"io"
"log/slog"
"reflect"
"testing"
"github.com/go-kit/log"
"github.com/prometheus/procfs"
)
@ -35,7 +36,7 @@ func makeTestCPUCollector(s map[int64]procfs.CPUStat) *cpuCollector {
dup := make(map[int64]procfs.CPUStat, len(s))
copyStats(dup, s)
return &cpuCollector{
logger: log.NewNopLogger(),
logger: slog.New(slog.NewTextHandler(io.Discard, nil)),
cpuStats: dup,
}
}

View file

@ -18,6 +18,7 @@ package collector
import (
"errors"
"log/slog"
"math"
"regexp"
"sort"
@ -25,14 +26,21 @@ import (
"strings"
"unsafe"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
"howett.net/plist"
)
const (
_IOC_OUT = uint(0x40000000)
_IOC_IN = uint(0x80000000)
_IOC_INOUT = (_IOC_IN | _IOC_OUT)
_IOCPARM_MASK = uint(0x1fff)
_IOCPARM_SHIFT = uint(16)
_IOCGROUP_SHIFT = uint(8)
)
type clockinfo struct {
hz int32 // clock frequency
tick int32 // micro-seconds per hz tick
@ -51,7 +59,7 @@ type cputime struct {
type plistref struct {
pref_plist unsafe.Pointer
pref_len uint64
pref_len uint
}
type sysmonValues struct {
@ -65,25 +73,19 @@ type sysmonProperty []sysmonValues
type sysmonProperties map[string]sysmonProperty
func readBytes(ptr unsafe.Pointer, length uint64) []byte {
buf := make([]byte, length-1)
var i uint64
for ; i < length-1; i++ {
buf[i] = *(*byte)(unsafe.Pointer(uintptr(ptr) + uintptr(i)))
}
return buf
func _IOC(inout uint, group byte, num uint, len uintptr) uint {
return ((inout) | ((uint(len) & _IOCPARM_MASK) << _IOCPARM_SHIFT) | (uint(group) << _IOCGROUP_SHIFT) | (num))
}
func ioctl(fd int, nr int64, typ byte, size uintptr, retptr unsafe.Pointer) error {
func _IOWR(group byte, num uint, len uintptr) uint {
return _IOC(_IOC_INOUT, group, num, len)
}
func ioctl(fd int, nr uint, typ byte, size uintptr, retptr unsafe.Pointer) error {
_, _, errno := unix.Syscall(
unix.SYS_IOCTL,
uintptr(fd),
// Some magicks derived from sys/ioccom.h.
uintptr((0x40000000|0x80000000)|
((int64(size)&(1<<13-1))<<16)|
(int64(typ)<<8)|
nr,
),
uintptr(_IOWR(typ, nr, size)),
uintptr(retptr),
)
if errno != 0 {
@ -93,7 +95,7 @@ func ioctl(fd int, nr int64, typ byte, size uintptr, retptr unsafe.Pointer) erro
}
func readSysmonProperties() (sysmonProperties, error) {
fd, err := unix.Open(rootfsFilePath("/dev/sysmon"), unix.O_RDONLY, 0777)
fd, err := unix.Open(rootfsFilePath("/dev/sysmon"), unix.O_RDONLY, 0)
if err != nil {
return nil, err
}
@ -104,8 +106,8 @@ func readSysmonProperties() (sysmonProperties, error) {
if err = ioctl(fd, 0, 'E', unsafe.Sizeof(retptr), unsafe.Pointer(&retptr)); err != nil {
return nil, err
}
bytes := readBytes(retptr.pref_plist, retptr.pref_len)
defer unix.Syscall(unix.SYS_MUNMAP, uintptr(retptr.pref_plist), uintptr(retptr.pref_len), uintptr(0))
bytes := unsafe.Slice((*byte)(unsafe.Pointer(retptr.pref_plist)), retptr.pref_len-1)
var props sysmonProperties
if _, err = plist.Unmarshal(bytes, &props); err != nil {
@ -153,7 +155,7 @@ func getCPUTemperatures() (map[int]float64, error) {
}
keys := sortFilterSysmonProperties(props, "coretemp")
for idx, _ := range keys {
for idx := range keys {
convertTemperatures(props[keys[idx]], res)
}
@ -180,7 +182,7 @@ func getCPUTimes() ([]cputime, error) {
if err != nil {
return nil, err
}
ncpus := *(*int)(unsafe.Pointer(&ncpusb[0]))
ncpus := int(*(*uint32)(unsafe.Pointer(&ncpusb[0])))
if ncpus < 1 {
return nil, errors.New("Invalid cpu number")
@ -192,10 +194,10 @@ func getCPUTimes() ([]cputime, error) {
if err != nil {
return nil, err
}
for len(cpb) >= int(unsafe.Sizeof(int(0))) {
t := *(*int)(unsafe.Pointer(&cpb[0]))
for len(cpb) >= int(unsafe.Sizeof(uint64(0))) {
t := *(*uint64)(unsafe.Pointer(&cpb[0]))
times = append(times, float64(t)/cpufreq)
cpb = cpb[unsafe.Sizeof(int(0)):]
cpb = cpb[unsafe.Sizeof(uint64(0)):]
}
}
@ -214,7 +216,7 @@ func getCPUTimes() ([]cputime, error) {
type statCollector struct {
cpu typedDesc
temp typedDesc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -222,7 +224,7 @@ func init() {
}
// NewStatCollector returns a new Collector exposing CPU stats.
func NewStatCollector(logger log.Logger) (Collector, error) {
func NewStatCollector(logger *slog.Logger) (Collector, error) {
return &statCollector{
cpu: typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},
temp: typedDesc{prometheus.NewDesc(
@ -269,7 +271,7 @@ func (c *statCollector) Update(ch chan<- prometheus.Metric) error {
if temp, ok := cpuTemperatures[cpu]; ok {
ch <- c.temp.mustNewConstMetric(temp, lcpu)
} else {
level.Debug(c.logger).Log("msg", "no temperature information for CPU", "cpu", cpu)
c.logger.Debug("no temperature information for CPU", "cpu", cpu)
ch <- c.temp.mustNewConstMetric(math.NaN(), lcpu)
}
}

View file

@ -17,10 +17,10 @@
package collector
import (
"log/slog"
"strconv"
"unsafe"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
)
@ -45,14 +45,14 @@ const (
type cpuCollector struct {
cpu typedDesc
logger log.Logger
logger *slog.Logger
}
func init() {
registerCollector("cpu", defaultEnabled, NewCPUCollector)
}
func NewCPUCollector(logger log.Logger) (Collector, error) {
func NewCPUCollector(logger *slog.Logger) (Collector, error) {
return &cpuCollector{
cpu: typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},
logger: logger,

View file

@ -11,15 +11,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build solaris && !nocpu
// +build solaris,!nocpu
//go:build !nocpu
// +build !nocpu
package collector
import (
"log/slog"
"strconv"
"github.com/go-kit/log"
"github.com/illumos/go-kstat"
"github.com/prometheus/client_golang/prometheus"
)
@ -29,14 +29,14 @@ import "C"
type cpuCollector struct {
cpu typedDesc
logger log.Logger
logger *slog.Logger
}
func init() {
registerCollector("cpu", defaultEnabled, NewCpuCollector)
}
func NewCpuCollector(logger log.Logger) (Collector, error) {
func NewCpuCollector(logger *slog.Logger) (Collector, error) {
return &cpuCollector{
cpu: typedDesc{nodeCPUSecondsDesc, prometheus.CounterValue},
logger: logger,
@ -60,17 +60,17 @@ func (c *cpuCollector) Update(ch chan<- prometheus.Metric) error {
}
for k, v := range map[string]string{
"idle": "cpu_ticks_idle",
"kernel": "cpu_ticks_kernel",
"user": "cpu_ticks_user",
"wait": "cpu_ticks_wait",
"idle": "cpu_nsec_idle",
"kernel": "cpu_nsec_kernel",
"user": "cpu_nsec_user",
"wait": "cpu_nsec_wait",
} {
kstatValue, err := ksCPU.GetNamed(v)
if err != nil {
return err
}
ch <- c.cpu.mustNewConstMetric(float64(kstatValue.UintVal), strconv.Itoa(cpu), k)
ch <- c.cpu.mustNewConstMetric(float64(kstatValue.UintVal)/1e9, strconv.Itoa(cpu), k)
}
}
return nil

View file

@ -0,0 +1,69 @@
// Copyright 2023 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package collector
import (
"fmt"
"log/slog"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/sysfs"
)
const (
cpuVulnerabilitiesCollectorSubsystem = "cpu_vulnerabilities"
)
var (
vulnerabilityDesc = prometheus.NewDesc(
prometheus.BuildFQName(namespace, cpuVulnerabilitiesCollectorSubsystem, "info"),
"Details of each CPU vulnerability reported by sysfs. The value of the series is an int encoded state of the vulnerability. The same state is stored as a string in the label",
[]string{"codename", "state", "mitigation"},
nil,
)
)
type cpuVulnerabilitiesCollector struct{}
func init() {
registerCollector(cpuVulnerabilitiesCollectorSubsystem, defaultDisabled, NewVulnerabilitySysfsCollector)
}
func NewVulnerabilitySysfsCollector(logger *slog.Logger) (Collector, error) {
return &cpuVulnerabilitiesCollector{}, nil
}
func (v *cpuVulnerabilitiesCollector) Update(ch chan<- prometheus.Metric) error {
fs, err := sysfs.NewFS(*sysPath)
if err != nil {
return fmt.Errorf("failed to open sysfs: %w", err)
}
vulnerabilities, err := fs.CPUVulnerabilities()
if err != nil {
return fmt.Errorf("failed to get vulnerabilities: %w", err)
}
for _, vulnerability := range vulnerabilities {
ch <- prometheus.MustNewConstMetric(
vulnerabilityDesc,
prometheus.GaugeValue,
1.0,
vulnerability.CodeName,
sysfs.VulnerabilityHumanEncoding[vulnerability.State],
vulnerability.Mitigation,
)
}
return nil
}

View file

@ -18,15 +18,16 @@ package collector
import (
"fmt"
"github.com/go-kit/log"
"log/slog"
"strings"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/sysfs"
"strings"
)
type cpuFreqCollector struct {
fs sysfs.FS
logger log.Logger
logger *slog.Logger
}
func init() {
@ -34,7 +35,7 @@ func init() {
}
// NewCPUFreqCollector returns a new Collector exposing kernel/system statistics.
func NewCPUFreqCollector(logger log.Logger) (Collector, error) {
func NewCPUFreqCollector(logger *slog.Logger) (Collector, error) {
fs, err := sysfs.NewFS(*sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)

View file

@ -11,16 +11,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build solaris && !nocpu
// +build solaris,!nocpu
//go:build !nocpu
// +build !nocpu
package collector
import (
"fmt"
"log/slog"
"strconv"
"github.com/go-kit/log"
"github.com/illumos/go-kstat"
"github.com/prometheus/client_golang/prometheus"
)
@ -29,14 +29,14 @@ import (
import "C"
type cpuFreqCollector struct {
logger log.Logger
logger *slog.Logger
}
func init() {
registerCollector("cpufreq", defaultEnabled, NewCpuFreqCollector)
}
func NewCpuFreqCollector(logger log.Logger) (Collector, error) {
func NewCpuFreqCollector(logger *slog.Logger) (Collector, error) {
return &cpuFreqCollector{
logger: logger,
}, nil

View file

@ -19,8 +19,8 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)
@ -98,7 +98,7 @@ type devstatCollector struct {
bytesDesc *prometheus.Desc
transfersDesc *prometheus.Desc
blocksDesc *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -106,7 +106,7 @@ func init() {
}
// NewDevstatCollector returns a new Collector exposing Device stats.
func NewDevstatCollector(logger log.Logger) (Collector, error) {
func NewDevstatCollector(logger *slog.Logger) (Collector, error) {
return &devstatCollector{
bytesDesc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, devstatSubsystem, "bytes_total"),

View file

@ -19,10 +19,10 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"sync"
"unsafe"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)
@ -43,7 +43,7 @@ type devstatCollector struct {
duration typedDesc
busyTime typedDesc
blocks typedDesc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -51,7 +51,7 @@ func init() {
}
// NewDevstatCollector returns a new Collector exposing Device stats.
func NewDevstatCollector(logger log.Logger) (Collector, error) {
func NewDevstatCollector(logger *slog.Logger) (Collector, error) {
return &devstatCollector{
devinfo: &C.struct_devinfo{},
bytes: typedDesc{prometheus.NewDesc(

145
collector/diskstats_aix.go Normal file
View file

@ -0,0 +1,145 @@
// Copyright 2024 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nodiskstats
// +build !nodiskstats
package collector
import (
"fmt"
"log/slog"
"github.com/power-devops/perfstat"
"github.com/prometheus/client_golang/prometheus"
)
const diskstatsDefaultIgnoredDevices = ""
type diskstatsCollector struct {
rbytes typedDesc
wbytes typedDesc
time typedDesc
bsize typedDesc
qdepth typedDesc
rserv typedDesc
wserv typedDesc
xfers typedDesc
xrate typedDesc
deviceFilter deviceFilter
logger *slog.Logger
tickPerSecond float64
}
func init() {
registerCollector("diskstats", defaultEnabled, NewDiskstatsCollector)
}
// NewDiskstatsCollector returns a new Collector exposing disk device stats.
func NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {
ticks, err := tickPerSecond()
if err != nil {
return nil, err
}
deviceFilter, err := newDiskstatsDeviceFilter(logger)
if err != nil {
return nil, fmt.Errorf("failed to parse device filter flags: %w", err)
}
return &diskstatsCollector{
rbytes: typedDesc{readBytesDesc, prometheus.CounterValue},
wbytes: typedDesc{writtenBytesDesc, prometheus.CounterValue},
time: typedDesc{ioTimeSecondsDesc, prometheus.CounterValue},
bsize: typedDesc{
prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "block_size_bytes"),
"Size of the block device in bytes.",
diskLabelNames, nil,
),
prometheus.GaugeValue,
},
qdepth: typedDesc{
prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "queue_depth"),
"Number of requests in the queue.",
diskLabelNames, nil,
),
prometheus.GaugeValue,
},
rserv: typedDesc{
prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "read_time_seconds_total"),
"The total time spent servicing read requests.",
diskLabelNames, nil,
),
prometheus.CounterValue,
},
wserv: typedDesc{
prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "write_time_seconds_total"),
"The total time spent servicing write requests.",
diskLabelNames, nil,
),
prometheus.CounterValue,
},
xfers: typedDesc{
prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "transfers_total"),
"The total number of transfers to/from disk.",
diskLabelNames, nil,
),
prometheus.CounterValue,
},
xrate: typedDesc{
prometheus.NewDesc(
prometheus.BuildFQName(namespace, diskSubsystem, "transfers_to_disk_total"),
"The total number of transfers from disk.",
diskLabelNames, nil,
),
prometheus.CounterValue,
},
deviceFilter: deviceFilter,
logger: logger,
tickPerSecond: ticks,
}, nil
}
func (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {
stats, err := perfstat.DiskStat()
if err != nil {
return err
}
for _, stat := range stats {
if c.deviceFilter.ignored(stat.Name) {
continue
}
ch <- c.rbytes.mustNewConstMetric(float64(stat.Rblks*512), stat.Name)
ch <- c.wbytes.mustNewConstMetric(float64(stat.Wblks*512), stat.Name)
ch <- c.time.mustNewConstMetric(float64(stat.Time)/float64(c.tickPerSecond), stat.Name)
ch <- c.bsize.mustNewConstMetric(float64(stat.BSize), stat.Name)
ch <- c.qdepth.mustNewConstMetric(float64(stat.QDepth), stat.Name)
ch <- c.rserv.mustNewConstMetric(float64(stat.Rserv)/1e9, stat.Name)
ch <- c.wserv.mustNewConstMetric(float64(stat.Wserv)/1e9, stat.Name)
ch <- c.xfers.mustNewConstMetric(float64(stat.Xfers), stat.Name)
ch <- c.xrate.mustNewConstMetric(float64(stat.XRate), stat.Name)
}
return nil
}

View file

@ -11,18 +11,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nodiskstats && (openbsd || linux || darwin)
//go:build !nodiskstats && (openbsd || linux || darwin || aix)
// +build !nodiskstats
// +build openbsd linux darwin
// +build openbsd linux darwin aix
package collector
import (
"errors"
"log/slog"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
)
@ -93,10 +92,10 @@ var (
)
)
func newDiskstatsDeviceFilter(logger log.Logger) (deviceFilter, error) {
func newDiskstatsDeviceFilter(logger *slog.Logger) (deviceFilter, error) {
if *oldDiskstatsDeviceExclude != "" {
if !diskstatsDeviceExcludeSet {
level.Warn(logger).Log("msg", "--collector.diskstats.ignored-devices is DEPRECATED and will be removed in 2.0.0, use --collector.diskstats.device-exclude")
logger.Warn("--collector.diskstats.ignored-devices is DEPRECATED and will be removed in 2.0.0, use --collector.diskstats.device-exclude")
*diskstatsDeviceExclude = *oldDiskstatsDeviceExclude
} else {
return deviceFilter{}, errors.New("--collector.diskstats.ignored-devices and --collector.diskstats.device-exclude are mutually exclusive")
@ -108,11 +107,11 @@ func newDiskstatsDeviceFilter(logger log.Logger) (deviceFilter, error) {
}
if *diskstatsDeviceExclude != "" {
level.Info(logger).Log("msg", "Parsed flag --collector.diskstats.device-exclude", "flag", *diskstatsDeviceExclude)
logger.Info("Parsed flag --collector.diskstats.device-exclude", "flag", *diskstatsDeviceExclude)
}
if *diskstatsDeviceInclude != "" {
level.Info(logger).Log("msg", "Parsed Flag --collector.diskstats.device-include", "flag", *diskstatsDeviceInclude)
logger.Info("Parsed Flag --collector.diskstats.device-include", "flag", *diskstatsDeviceInclude)
}
return newDeviceFilter(*diskstatsDeviceExclude, *diskstatsDeviceInclude), nil

View file

@ -18,8 +18,8 @@ package collector
import (
"fmt"
"log/slog"
"github.com/go-kit/log"
"github.com/lufia/iostat"
"github.com/prometheus/client_golang/prometheus"
)
@ -35,7 +35,7 @@ type diskstatsCollector struct {
descs []typedDescFunc
deviceFilter deviceFilter
logger log.Logger
logger *slog.Logger
}
func init() {
@ -43,7 +43,7 @@ func init() {
}
// NewDiskstatsCollector returns a new Collector exposing disk device stats.
func NewDiskstatsCollector(logger log.Logger) (Collector, error) {
func NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {
var diskLabelNames = []string{"device"}
deviceFilter, err := newDiskstatsDeviceFilter(logger)

View file

@ -19,12 +19,11 @@ package collector
import (
"bufio"
"fmt"
"log/slog"
"os"
"strconv"
"strings"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/blockdevice"
)
@ -36,7 +35,7 @@ const (
// See also https://www.kernel.org/doc/Documentation/block/stat.txt
unixSectorSize = 512.0
diskstatsDefaultIgnoredDevices = "^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
diskstatsDefaultIgnoredDevices = "^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
// See udevadm(8).
udevDevicePropertyPrefix = "E:"
@ -85,7 +84,7 @@ type diskstatsCollector struct {
filesystemInfoDesc typedFactorDesc
deviceMapperInfoDesc typedFactorDesc
ataDescs map[string]typedFactorDesc
logger log.Logger
logger *slog.Logger
getUdevDeviceProperties func(uint32, uint32) (udevInfo, error)
}
@ -95,7 +94,7 @@ func init() {
// NewDiskstatsCollector returns a new Collector exposing disk device stats.
// Docs from https://www.kernel.org/doc/Documentation/iostats.txt
func NewDiskstatsCollector(logger log.Logger) (Collector, error) {
func NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {
var diskLabelNames = []string{"device"}
fs, err := blockdevice.NewFS(*procPath, *sysPath)
if err != nil {
@ -113,7 +112,7 @@ func NewDiskstatsCollector(logger log.Logger) (Collector, error) {
infoDesc: typedFactorDesc{
desc: prometheus.NewDesc(prometheus.BuildFQName(namespace, diskSubsystem, "info"),
"Info of /sys/block/<block_device>.",
[]string{"device", "major", "minor", "path", "wwn", "model", "serial", "revision"},
[]string{"device", "major", "minor", "path", "wwn", "model", "serial", "revision", "rotational"},
nil,
), valueType: prometheus.GaugeValue,
},
@ -262,7 +261,7 @@ func NewDiskstatsCollector(logger log.Logger) (Collector, error) {
// Only enable getting device properties from udev if the directory is readable.
if stat, err := os.Stat(*udevDataPath); err != nil || !stat.IsDir() {
level.Error(logger).Log("msg", "Failed to open directory, disabling udev device properties", "path", *udevDataPath)
logger.Error("Failed to open directory, disabling udev device properties", "path", *udevDataPath)
} else {
collector.getUdevDeviceProperties = getUdevDeviceProperties
}
@ -284,7 +283,7 @@ func (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {
info, err := getUdevDeviceProperties(stats.MajorNumber, stats.MinorNumber)
if err != nil {
level.Debug(c.logger).Log("msg", "Failed to parse udev info", "err", err)
c.logger.Debug("Failed to parse udev info", "err", err)
}
// This is usually the serial printed on the disk label.
@ -295,6 +294,12 @@ func (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {
serial = info[udevIDSerialShort]
}
queueStats, err := c.fs.SysBlockDeviceQueueStats(dev)
// Block Device Queue stats may not exist for all devices.
if err != nil && !os.IsNotExist(err) {
c.logger.Debug("Failed to get block device queue stats", "device", dev, "err", err)
}
ch <- c.infoDesc.mustNewConstMetric(1.0, dev,
fmt.Sprint(stats.MajorNumber),
fmt.Sprint(stats.MinorNumber),
@ -303,6 +308,7 @@ func (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {
info[udevIDModel],
serial,
info[udevIDRevision],
strconv.FormatUint(queueStats.Rotational, 2),
)
statCount := stats.IoStatsCount - 3 // Total diskstats record count, less MajorNumber, MinorNumber and DeviceName
@ -355,14 +361,14 @@ func (c *diskstatsCollector) Update(ch chan<- prometheus.Metric) error {
for attr, desc := range c.ataDescs {
str, ok := info[attr]
if !ok {
level.Debug(c.logger).Log("msg", "Udev attribute does not exist", "attribute", attr)
c.logger.Debug("Udev attribute does not exist", "attribute", attr)
continue
}
if value, err := strconv.ParseFloat(str, 64); err == nil {
ch <- desc.mustNewConstMetric(value, dev)
} else {
level.Error(c.logger).Log("msg", "Failed to parse ATA value", "err", err)
c.logger.Error("Failed to parse ATA value", "err", err)
}
}
}
@ -392,15 +398,9 @@ func getUdevDeviceProperties(major, minor uint32) (udevInfo, error) {
line = strings.TrimPrefix(line, udevDevicePropertyPrefix)
/* TODO: After we drop support for Go 1.17, the condition below can be simplified to:
if name, value, found := strings.Cut(line, "="); found {
info[name] = value
}
*/
if fields := strings.SplitN(line, "=", 2); len(fields) == 2 {
info[fields[0]] = fields[1]
}
}
return info, nil

View file

@ -11,15 +11,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nodiskstats
// +build !nodiskstats
package collector
import (
"fmt"
"os"
"io"
"log/slog"
"strings"
"testing"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/testutil"
)
@ -36,7 +39,7 @@ func (c testDiskStatsCollector) Describe(ch chan<- *prometheus.Desc) {
prometheus.DescribeByCollect(c, ch)
}
func NewTestDiskStatsCollector(logger log.Logger) (prometheus.Collector, error) {
func NewTestDiskStatsCollector(logger *slog.Logger) (prometheus.Collector, error) {
dsc, err := NewDiskstatsCollector(logger)
if err != nil {
return testDiskStatsCollector{}, err
@ -50,7 +53,7 @@ func TestDiskStats(t *testing.T) {
*sysPath = "fixtures/sys"
*procPath = "fixtures/proc"
*udevDataPath = "fixtures/udev/data"
*diskstatsDeviceExclude = "^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
*diskstatsDeviceExclude = "^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"
testcase := `# HELP node_disk_ata_rotation_rate_rpm ATA disk rotation rate in RPMs (0 for SSDs).
# TYPE node_disk_ata_rotation_rate_rpm gauge
node_disk_ata_rotation_rate_rpm{device="sda"} 7200
@ -110,21 +113,21 @@ node_disk_flush_requests_time_seconds_total{device="sdc"} 1.944
node_disk_flush_requests_total{device="sdc"} 1555
# HELP node_disk_info Info of /sys/block/<block_device>.
# TYPE node_disk_info gauge
node_disk_info{device="dm-0",major="252",minor="0",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-1",major="252",minor="1",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-2",major="252",minor="2",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-3",major="252",minor="3",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-4",major="252",minor="4",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-5",major="252",minor="5",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0",major="179",minor="0",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p1",major="179",minor="1",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p2",major="179",minor="2",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="nvme0n1",major="259",minor="0",model="SAMSUNG EHFTF55LURSY-000Y9",path="pci-0000:02:00.0-nvme-1",revision="4NBTUY95",serial="S252B6CU1HG3M1",wwn="eui.p3vbbiejx5aae2r3"} 1
node_disk_info{device="sda",major="8",minor="0",model="TOSHIBA_KSDB4U86",path="pci-0000:3b:00.0-sas-phy7-lun-0",revision="0102",serial="2160A0D5FVGG",wwn="0x7c72382b8de36a64"} 1
node_disk_info{device="sdb",major="8",minor="16",model="SuperMicro_SSD",path="pci-0000:00:1f.2-ata-1",revision="0R",serial="SMC0E1B87ABBB16BD84E",wwn="0xe1b87abbb16bd84e"} 1
node_disk_info{device="sdc",major="8",minor="32",model="INTEL_SSDS9X9SI0",path="pci-0000:00:1f.2-ata-4",revision="0100",serial="3EWB5Y25CWQWA7EH1U",wwn="0x58907ddc573a5de"} 1
node_disk_info{device="sr0",major="11",minor="0",model="Virtual_CDROM0",path="pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0",revision="1.00",serial="AAAABBBBCCCC1",wwn=""} 1
node_disk_info{device="vda",major="254",minor="0",model="",path="pci-0000:00:06.0",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-0",major="252",minor="0",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-1",major="252",minor="1",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-2",major="252",minor="2",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-3",major="252",minor="3",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-4",major="252",minor="4",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-5",major="252",minor="5",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0",major="179",minor="0",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p1",major="179",minor="1",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p2",major="179",minor="2",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="nvme0n1",major="259",minor="0",model="SAMSUNG EHFTF55LURSY-000Y9",path="pci-0000:02:00.0-nvme-1",revision="4NBTUY95",rotational="0",serial="S252B6CU1HG3M1",wwn="eui.p3vbbiejx5aae2r3"} 1
node_disk_info{device="sda",major="8",minor="0",model="TOSHIBA_KSDB4U86",path="pci-0000:3b:00.0-sas-phy7-lun-0",revision="0102",rotational="1",serial="2160A0D5FVGG",wwn="0x7c72382b8de36a64"} 1
node_disk_info{device="sdb",major="8",minor="16",model="SuperMicro_SSD",path="pci-0000:00:1f.2-ata-1",revision="0R",rotational="0",serial="SMC0E1B87ABBB16BD84E",wwn="0xe1b87abbb16bd84e"} 1
node_disk_info{device="sdc",major="8",minor="32",model="INTEL_SSDS9X9SI0",path="pci-0000:00:1f.2-ata-4",revision="0100",rotational="0",serial="3EWB5Y25CWQWA7EH1U",wwn="0x58907ddc573a5de"} 1
node_disk_info{device="sr0",major="11",minor="0",model="Virtual_CDROM0",path="pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0",revision="1.00",rotational="0",serial="AAAABBBBCCCC1",wwn=""} 1
node_disk_info{device="vda",major="254",minor="0",model="",path="pci-0000:00:06.0",revision="",rotational="0",serial="",wwn=""} 1
# HELP node_disk_io_now The number of I/Os currently in progress.
# TYPE node_disk_io_now gauge
node_disk_io_now{device="dm-0"} 0
@ -314,10 +317,10 @@ node_disk_written_bytes_total{device="sr0"} 0
node_disk_written_bytes_total{device="vda"} 1.0938236928e+11
`
logger := log.NewLogfmtLogger(os.Stderr)
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
collector, err := NewDiskstatsCollector(logger)
if err != nil {
panic(err)
t.Fatal(err)
}
c, err := NewTestDiskStatsCollector(logger)
if err != nil {

View file

@ -11,16 +11,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build openbsd && !amd64 && !nodiskstats
// +build openbsd,!amd64,!nodiskstats
//go:build !nodiskstats && !amd64
// +build !nodiskstats,!amd64
package collector
import (
"fmt"
"log/slog"
"unsafe"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
)
@ -41,7 +41,7 @@ type diskstatsCollector struct {
time typedDesc
deviceFilter deviceFilter
logger log.Logger
logger *slog.Logger
}
func init() {
@ -49,7 +49,7 @@ func init() {
}
// NewDiskstatsCollector returns a new Collector exposing disk device stats.
func NewDiskstatsCollector(logger log.Logger) (Collector, error) {
func NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {
deviceFilter, err := newDiskstatsDeviceFilter(logger)
if err != nil {
return nil, fmt.Errorf("failed to parse device filter flags: %w", err)

View file

@ -18,9 +18,9 @@ package collector
import (
"fmt"
"log/slog"
"unsafe"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
)
@ -52,7 +52,7 @@ type diskstatsCollector struct {
time typedDesc
deviceFilter deviceFilter
logger log.Logger
logger *slog.Logger
}
func init() {
@ -60,7 +60,7 @@ func init() {
}
// NewDiskstatsCollector returns a new Collector exposing disk device stats.
func NewDiskstatsCollector(logger log.Logger) (Collector, error) {
func NewDiskstatsCollector(logger *slog.Logger) (Collector, error) {
deviceFilter, err := newDiskstatsDeviceFilter(logger)
if err != nil {
return nil, fmt.Errorf("failed to parse device filter flags: %w", err)

View file

@ -19,11 +19,10 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"os"
"strings"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/sysfs"
)
@ -38,7 +37,7 @@ func init() {
}
// NewDMICollector returns a new Collector exposing DMI information.
func NewDMICollector(logger log.Logger) (Collector, error) {
func NewDMICollector(logger *slog.Logger) (Collector, error) {
fs, err := sysfs.NewFS(*sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)
@ -47,7 +46,7 @@ func NewDMICollector(logger log.Logger) (Collector, error) {
dmi, err := fs.DMIClass()
if err != nil {
if errors.Is(err, os.ErrNotExist) {
level.Debug(logger).Log("msg", "Platform does not support Desktop Management Interface (DMI) information", "err", err)
logger.Debug("Platform does not support Desktop Management Interface (DMI) information", "err", err)
dmi = &sysfs.DMIClass{}
} else {
return nil, fmt.Errorf("failed to read Desktop Management Interface (DMI) information: %w", err)

View file

@ -20,12 +20,11 @@ import (
"bufio"
"errors"
"fmt"
"log/slog"
"os"
"strconv"
"strings"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
)
@ -79,14 +78,14 @@ type drbdCollector struct {
numerical map[string]drbdNumericalMetric
stringPair map[string]drbdStringPairMetric
connected *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
registerCollector("drbd", defaultDisabled, newDRBDCollector)
}
func newDRBDCollector(logger log.Logger) (Collector, error) {
func newDRBDCollector(logger *slog.Logger) (Collector, error) {
return &drbdCollector{
numerical: map[string]drbdNumericalMetric{
"ns": newDRBDNumericalMetric(
@ -191,7 +190,7 @@ func (c *drbdCollector) Update(ch chan<- prometheus.Metric) error {
file, err := os.Open(statsFile)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
level.Debug(c.logger).Log("msg", "stats file does not exist, skipping", "file", statsFile, "err", err)
c.logger.Debug("stats file does not exist, skipping", "file", statsFile, "err", err)
return ErrNoData
}
@ -208,7 +207,7 @@ func (c *drbdCollector) Update(ch chan<- prometheus.Metric) error {
kv := strings.Split(field, ":")
if len(kv) != 2 {
level.Debug(c.logger).Log("msg", "skipping invalid key:value pair", "field", field)
c.logger.Debug("skipping invalid key:value pair", "field", field)
continue
}
@ -274,7 +273,7 @@ func (c *drbdCollector) Update(ch chan<- prometheus.Metric) error {
continue
}
level.Debug(c.logger).Log("msg", "unhandled key-value pair", "key", kv[0], "value", kv[1])
c.logger.Debug("unhandled key-value pair", "key", kv[0], "value", kv[1])
}
return scanner.Err()

View file

@ -18,8 +18,8 @@ package collector
import (
"fmt"
"log/slog"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/sysfs"
)
@ -30,7 +30,7 @@ const (
type drmCollector struct {
fs sysfs.FS
logger log.Logger
logger *slog.Logger
CardInfo *prometheus.Desc
GPUBusyPercent *prometheus.Desc
MemoryGTTSize *prometheus.Desc
@ -46,7 +46,7 @@ func init() {
}
// NewDrmCollector returns a new Collector exposing /sys/class/drm/card?/device stats.
func NewDrmCollector(logger log.Logger) (Collector, error) {
func NewDrmCollector(logger *slog.Logger) (Collector, error) {
fs, err := sysfs.NewFS(*sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)

View file

@ -18,10 +18,10 @@ package collector
import (
"fmt"
"log/slog"
"path/filepath"
"regexp"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)
@ -39,7 +39,7 @@ type edacCollector struct {
ueCount *prometheus.Desc
csRowCECount *prometheus.Desc
csRowUECount *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -47,7 +47,7 @@ func init() {
}
// NewEdacCollector returns a new Collector exposing edac stats.
func NewEdacCollector(logger log.Logger) (Collector, error) {
func NewEdacCollector(logger *slog.Logger) (Collector, error) {
return &edacCollector{
ceCount: prometheus.NewDesc(
prometheus.BuildFQName(namespace, edacSubsystem, "correctable_errors_total"),

View file

@ -18,8 +18,8 @@ package collector
import (
"fmt"
"log/slog"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs"
)
@ -28,7 +28,7 @@ type entropyCollector struct {
fs procfs.FS
entropyAvail *prometheus.Desc
entropyPoolSize *prometheus.Desc
logger log.Logger
logger *slog.Logger
}
func init() {
@ -36,7 +36,7 @@ func init() {
}
// NewEntropyCollector returns a new Collector exposing entropy stats.
func NewEntropyCollector(logger log.Logger) (Collector, error) {
func NewEntropyCollector(logger *slog.Logger) (Collector, error) {
fs, err := procfs.NewFS(*procPath)
if err != nil {
return nil, fmt.Errorf("failed to open procfs: %w", err)

View file

@ -23,6 +23,7 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"os"
"regexp"
"sort"
@ -31,8 +32,6 @@ import (
"syscall"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/sysfs"
"github.com/safchain/ethtool"
@ -79,13 +78,13 @@ type ethtoolCollector struct {
deviceFilter deviceFilter
infoDesc *prometheus.Desc
metricsPattern *regexp.Regexp
logger log.Logger
logger *slog.Logger
}
// makeEthtoolCollector is the internal constructor for EthtoolCollector.
// This allows NewEthtoolTestCollector to override its .ethtool interface
// for testing.
func makeEthtoolCollector(logger log.Logger) (*ethtoolCollector, error) {
func makeEthtoolCollector(logger *slog.Logger) (*ethtoolCollector, error) {
fs, err := sysfs.NewFS(*sysPath)
if err != nil {
return nil, fmt.Errorf("failed to open sysfs: %w", err)
@ -96,6 +95,16 @@ func makeEthtoolCollector(logger log.Logger) (*ethtoolCollector, error) {
return nil, fmt.Errorf("failed to initialize ethtool library: %w", err)
}
if *ethtoolDeviceInclude != "" {
logger.Info("Parsed flag --collector.ethtool.device-include", "flag", *ethtoolDeviceInclude)
}
if *ethtoolDeviceExclude != "" {
logger.Info("Parsed flag --collector.ethtool.device-exclude", "flag", *ethtoolDeviceExclude)
}
if *ethtoolIncludedMetrics != "" {
logger.Info("Parsed flag --collector.ethtool.metrics-include", "flag", *ethtoolIncludedMetrics)
}
// Pre-populate some common ethtool metrics.
return &ethtoolCollector{
fs: fs,
@ -213,7 +222,7 @@ func buildEthtoolFQName(metric string) string {
}
// NewEthtoolCollector returns a new Collector exposing ethtool stats.
func NewEthtoolCollector(logger log.Logger) (Collector, error) {
func NewEthtoolCollector(logger *slog.Logger) (Collector, error) {
return makeEthtoolCollector(logger)
}
@ -299,6 +308,61 @@ func (c *ethtoolCollector) updateSpeeds(ch chan<- prometheus.Metric, prefix stri
unix.ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT: {56000, full, "SR4"},
unix.ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT: {56000, full, "LR4"},
unix.ETHTOOL_LINK_MODE_25000baseCR_Full_BIT: {25000, full, "CR"},
unix.ETHTOOL_LINK_MODE_25000baseKR_Full_BIT: {25000, full, "KR"},
unix.ETHTOOL_LINK_MODE_25000baseSR_Full_BIT: {25000, full, "SR"},
unix.ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT: {50000, full, "CR2"},
unix.ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT: {50000, full, "KR2"},
unix.ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT: {100000, full, "KR4"},
unix.ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT: {100000, full, "SR4"},
unix.ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT: {100000, full, "CR4"},
unix.ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT: {100000, full, "R4_ER4"},
unix.ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT: {50000, full, "SR2"},
unix.ETHTOOL_LINK_MODE_1000baseX_Full_BIT: {1000, full, "X"},
unix.ETHTOOL_LINK_MODE_10000baseCR_Full_BIT: {10000, full, "CR"},
unix.ETHTOOL_LINK_MODE_10000baseSR_Full_BIT: {10000, full, "SR"},
unix.ETHTOOL_LINK_MODE_10000baseLR_Full_BIT: {10000, full, "LR"},
unix.ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT: {10000, full, "LRM"},
unix.ETHTOOL_LINK_MODE_10000baseER_Full_BIT: {10000, full, "ER"},
unix.ETHTOOL_LINK_MODE_5000baseT_Full_BIT: {5000, full, "T"},
unix.ETHTOOL_LINK_MODE_50000baseKR_Full_BIT: {50000, full, "KR"},
unix.ETHTOOL_LINK_MODE_50000baseSR_Full_BIT: {50000, full, "SR"},
unix.ETHTOOL_LINK_MODE_50000baseCR_Full_BIT: {50000, full, "CR"},
unix.ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT: {50000, full, "LR_ER_FR"},
unix.ETHTOOL_LINK_MODE_50000baseDR_Full_BIT: {50000, full, "DR"},
unix.ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT: {100000, full, "KR2"},
unix.ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT: {100000, full, "SR2"},
unix.ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT: {100000, full, "CR2"},
unix.ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT: {100000, full, "LR2_ER2_FR2"},
unix.ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT: {100000, full, "DR2"},
unix.ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT: {200000, full, "KR4"},
unix.ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT: {200000, full, "SR4"},
unix.ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT: {200000, full, "LR4_ER4_FR4"},
unix.ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT: {200000, full, "DR4"},
unix.ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT: {200000, full, "CR4"},
unix.ETHTOOL_LINK_MODE_100baseT1_Full_BIT: {100, full, "T1"},
unix.ETHTOOL_LINK_MODE_1000baseT1_Full_BIT: {1000, full, "T1"},
unix.ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT: {400000, full, "KR8"},
unix.ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT: {400000, full, "SR8"},
unix.ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT: {400000, full, "LR8_ER8_FR8"},
unix.ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT: {400000, full, "DR8"},
unix.ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT: {400000, full, "CR8"},
unix.ETHTOOL_LINK_MODE_100000baseKR_Full_BIT: {100000, full, "KR"},
unix.ETHTOOL_LINK_MODE_100000baseSR_Full_BIT: {100000, full, "SR"},
unix.ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT: {100000, full, "LR_ER_FR"},
unix.ETHTOOL_LINK_MODE_100000baseCR_Full_BIT: {100000, full, "CR"},
unix.ETHTOOL_LINK_MODE_100000baseDR_Full_BIT: {100000, full, "DR"},
unix.ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT: {200000, full, "KR2"},
unix.ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT: {200000, full, "SR2"},
unix.ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT: {200000, full, "LR2_ER2_FR2"},
unix.ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT: {200000, full, "DR2"},
unix.ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT: {200000, full, "CR2"},
unix.ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT: {400000, full, "KR4"},
unix.ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT: {400000, full, "SR4"},
unix.ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT: {400000, full, "LR4_ER4_FR4"},
unix.ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT: {400000, full, "DR4"},
unix.ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT: {400000, full, "CR4"},
unix.ETHTOOL_LINK_MODE_100baseFX_Half_BIT: {100, half, "FX"},
unix.ETHTOOL_LINK_MODE_100baseFX_Full_BIT: {100, full, "FX"},
} {
if linkModes&(1<<bit) != 0 {
ch <- prometheus.MustNewConstMetric(c.entry(linkMode), prometheus.GaugeValue,
@ -308,10 +372,10 @@ func (c *ethtoolCollector) updateSpeeds(ch chan<- prometheus.Metric, prefix stri
}
func (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {
netClass, err := c.fs.NetClass()
netClass, err := c.fs.NetClassDevices()
if err != nil {
if errors.Is(err, os.ErrNotExist) || errors.Is(err, os.ErrPermission) {
level.Debug(c.logger).Log("msg", "Could not read netclass file", "err", err)
c.logger.Debug("Could not read netclass file", "err", err)
return ErrNoData
}
return fmt.Errorf("could not get net class info: %w", err)
@ -321,7 +385,7 @@ func (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {
return fmt.Errorf("no network devices found")
}
for device := range netClass {
for _, device := range netClass {
var stats map[string]uint64
var err error
@ -340,12 +404,12 @@ func (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {
} else {
if errno, ok := err.(syscall.Errno); ok {
if err == unix.EOPNOTSUPP {
level.Debug(c.logger).Log("msg", "ethtool link info error", "err", err, "device", device, "errno", uint(errno))
c.logger.Debug("ethtool link info error", "err", err, "device", device, "errno", uint(errno))
} else if errno != 0 {
level.Error(c.logger).Log("msg", "ethtool link info error", "err", err, "device", device, "errno", uint(errno))
c.logger.Error("ethtool link info error", "err", err, "device", device, "errno", uint(errno))
}
} else {
level.Error(c.logger).Log("msg", "ethtool link info error", "err", err, "device", device)
c.logger.Error("ethtool link info error", "err", err, "device", device)
}
}
@ -357,12 +421,12 @@ func (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {
} else {
if errno, ok := err.(syscall.Errno); ok {
if err == unix.EOPNOTSUPP {
level.Debug(c.logger).Log("msg", "ethtool driver info error", "err", err, "device", device, "errno", uint(errno))
c.logger.Debug("ethtool driver info error", "err", err, "device", device, "errno", uint(errno))
} else if errno != 0 {
level.Error(c.logger).Log("msg", "ethtool driver info error", "err", err, "device", device, "errno", uint(errno))
c.logger.Error("ethtool driver info error", "err", err, "device", device, "errno", uint(errno))
}
} else {
level.Error(c.logger).Log("msg", "ethtool driver info error", "err", err, "device", device)
c.logger.Error("ethtool driver info error", "err", err, "device", device)
}
}
@ -373,35 +437,39 @@ func (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {
if err != nil {
if errno, ok := err.(syscall.Errno); ok {
if err == unix.EOPNOTSUPP {
level.Debug(c.logger).Log("msg", "ethtool stats error", "err", err, "device", device, "errno", uint(errno))
c.logger.Debug("ethtool stats error", "err", err, "device", device, "errno", uint(errno))
} else if errno != 0 {
level.Error(c.logger).Log("msg", "ethtool stats error", "err", err, "device", device, "errno", uint(errno))
c.logger.Error("ethtool stats error", "err", err, "device", device, "errno", uint(errno))
}
} else {
level.Error(c.logger).Log("msg", "ethtool stats error", "err", err, "device", device)
c.logger.Error("ethtool stats error", "err", err, "device", device)
}
}
if stats == nil || len(stats) < 1 {
if len(stats) == 0 {
// No stats returned; device does not support ethtool stats.
continue
}
// Sanitizing the metric names can lead to duplicate metric names. Therefore check for clashes beforehand.
metricFQNames := make(map[string]string)
renamedStats := make(map[string]uint64, len(stats))
for metric := range stats {
if !c.metricsPattern.MatchString(metric) {
metricName := SanitizeMetricName(metric)
if !c.metricsPattern.MatchString(metricName) {
continue
}
metricFQName := buildEthtoolFQName(metric)
metricFQName := buildEthtoolFQName(metricName)
existingMetric, exists := metricFQNames[metricFQName]
if exists {
level.Debug(c.logger).Log("msg", "dropping duplicate metric name", "device", device,
"metricFQName", metricFQName, "metric1", existingMetric, "metric2", metric)
// Keep the metric as "deleted" in the dict in case there are 3 duplicates.
c.logger.Debug("dropping duplicate metric name", "device", device,
"metricFQName", metricFQName, "metric1", existingMetric, "metric2", metricName)
// Keep the metricName as "deleted" in the dict in case there are 3 duplicates.
metricFQNames[metricFQName] = ""
} else {
metricFQNames[metricFQName] = metric
metricFQNames[metricFQName] = metricName
// Later we'll go look for the stat with the "sanitized" metric name, so we can copy it there already
renamedStats[metricName] = stats[metric]
}
}
@ -419,7 +487,7 @@ func (c *ethtoolCollector) Update(ch chan<- prometheus.Metric) error {
continue
}
val := stats[metric]
val := renamedStats[metric]
// Check to see if this metric exists; if not then create it and store it in c.entries.
entry := c.entryWithCreate(metric, metricFQName)

View file

@ -11,11 +11,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !noethtool
// +build !noethtool
package collector
import (
"bufio"
"fmt"
"io"
"log/slog"
"os"
"path/filepath"
"strconv"
@ -23,7 +28,6 @@ import (
"syscall"
"testing"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/safchain/ethtool"
@ -46,7 +50,7 @@ func (c testEthtoolCollector) Describe(ch chan<- *prometheus.Desc) {
prometheus.DescribeByCollect(c, ch)
}
func NewTestEthtoolCollector(logger log.Logger) (prometheus.Collector, error) {
func NewTestEthtoolCollector(logger *slog.Logger) (prometheus.Collector, error) {
dsc, err := NewEthtoolTestCollector(logger)
if err != nil {
return testEthtoolCollector{}, err
@ -208,16 +212,18 @@ func (e *EthtoolFixture) LinkInfo(intf string) (ethtool.EthtoolCmd, error) {
items := strings.Split(line, ": ")
if items[0] == "Supported pause frame use" {
if items[1] == "Symmetric" {
switch items[1] {
case "Symmetric":
res.Supported |= (1 << unix.ETHTOOL_LINK_MODE_Pause_BIT)
} else if items[1] == "Receive-only" {
case "Receive-only":
res.Supported |= (1 << unix.ETHTOOL_LINK_MODE_Asym_Pause_BIT)
}
}
if items[0] == "Advertised pause frame use" {
if items[1] == "Symmetric" {
switch items[1] {
case "Symmetric":
res.Advertising |= (1 << unix.ETHTOOL_LINK_MODE_Pause_BIT)
} else if items[1] == "Receive-only" {
case "Receive-only":
res.Advertising |= (1 << unix.ETHTOOL_LINK_MODE_Asym_Pause_BIT)
}
}
@ -252,19 +258,20 @@ func (e *EthtoolFixture) LinkInfo(intf string) (ethtool.EthtoolCmd, error) {
return res, err
}
func NewEthtoolTestCollector(logger log.Logger) (Collector, error) {
func NewEthtoolTestCollector(logger *slog.Logger) (Collector, error) {
collector, err := makeEthtoolCollector(logger)
collector.ethtool = &EthtoolFixture{
fixturePath: "fixtures/ethtool/",
}
if err != nil {
return nil, err
}
collector.ethtool = &EthtoolFixture{
fixturePath: "fixtures/ethtool/",
}
return collector, nil
}
func TestBuildEthtoolFQName(t *testing.T) {
testcases := map[string]string{
"port.rx_errors": "node_ethtool_port_received_errors",
"rx_errors": "node_ethtool_received_errors",
"Queue[0] AllocFails": "node_ethtool_queue_0_allocfails",
"Tx LPI entry count": "node_ethtool_transmitted_lpi_entry_count",
@ -288,6 +295,9 @@ node_ethtool_align_errors{device="eth0"} 0
# HELP node_ethtool_info A metric with a constant '1' value labeled by bus_info, device, driver, expansion_rom_version, firmware_version, version.
# TYPE node_ethtool_info gauge
node_ethtool_info{bus_info="0000:00:1f.6",device="eth0",driver="e1000e",expansion_rom_version="",firmware_version="0.5-4",version="5.11.0-22-generic"} 1
# HELP node_ethtool_port_received_dropped Network interface port_rx_dropped
# TYPE node_ethtool_port_received_dropped untyped
node_ethtool_port_received_dropped{device="eth0"} 12028
# HELP node_ethtool_received_broadcast Network interface rx_broadcast
# TYPE node_ethtool_received_broadcast untyped
node_ethtool_received_broadcast{device="eth0"} 5792
@ -367,10 +377,10 @@ node_network_supported_speed_bytes{device="eth0",duplex="half",mode="10baseT"} 1
`
*sysPath = "fixtures/sys"
logger := log.NewLogfmtLogger(os.Stderr)
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
collector, err := NewEthtoolTestCollector(logger)
if err != nil {
panic(err)
t.Fatal(err)
}
c, err := NewTestEthtoolCollector(logger)
if err != nil {

View file

@ -18,13 +18,13 @@
package collector
import (
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
"log/slog"
)
type execCollector struct {
sysctls []bsdSysctl
logger log.Logger
logger *slog.Logger
}
func init() {
@ -32,7 +32,7 @@ func init() {
}
// NewExecCollector returns a new Collector exposing system execution statistics.
func NewExecCollector(logger log.Logger) (Collector, error) {
func NewExecCollector(logger *slog.Logger) (Collector, error) {
// From sys/vm/vm_meter.c:
// All are of type CTLTYPE_UINT.
//

View file

@ -11,18 +11,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build linux && !nofibrechannel
// +build linux,!nofibrechannel
//go:build !nofibrechannel
// +build !nofibrechannel
package collector
import (
"fmt"
"log/slog"
"os"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/node_exporter/collector/utils"
"github.com/prometheus/procfs/sysfs"
)
@ -31,7 +31,7 @@ const maxUint64 = ^uint64(0)
type fibrechannelCollector struct {
fs sysfs.FS
metricDescs map[string]*prometheus.Desc
logger log.Logger
logger *slog.Logger
subsystem string
}
@ -40,7 +40,7 @@ func init() {
}
// NewFibreChannelCollector returns a new Collector exposing FibreChannel stats.
func NewFibreChannelCollector(logger log.Logger) (Collector, error) {
func NewFibreChannelCollector(logger *slog.Logger) (Collector, error) {
var i fibrechannelCollector
var err error
@ -66,18 +66,6 @@ func NewFibreChannelCollector(logger log.Logger) (Collector, error) {
"rx_words_total": "Number of words received by host port",
"tx_frames_total": "Number of frames transmitted by host port",
"link_failure_total": "Number of times the host port link has failed",
"name": "Name of Fibre Channel HBA",
"speed": "Current operating speed",
"port_state": "Current port state",
"port_type": "Port type, what the port is connected to",
"symbolic_name": "Symbolic Name",
"node_name": "Node Name as hexadecimal string",
"port_id": "Port ID as string",
"port_name": "Port Name as hexadecimal string",
"fabric_name": "Fabric Name; 0 if PTP",
"dev_loss_tmo": "Device Loss Timeout in seconds",
"supported_classes": "The FC classes supported",
"supported_speeds": "The FC speeds supported",
}
i.metricDescs = make(map[string]*prometheus.Desc)
@ -110,7 +98,7 @@ func (c *fibrechannelCollector) Update(ch chan<- prometheus.Metric) error {
hosts, err := c.fs.FibreChannelClass()
if err != nil {
if os.IsNotExist(err) {
level.Debug(c.logger).Log("msg", "fibrechannel statistics not found, skipping")
c.logger.Debug("fibrechannel statistics not found, skipping")
return ErrNoData
}
return fmt.Errorf("error obtaining FibreChannel class info: %s", err)
@ -126,23 +114,36 @@ func (c *fibrechannelCollector) Update(ch chan<- prometheus.Metric) error {
infoValue := 1.0
// First push the Host values
ch <- prometheus.MustNewConstMetric(infoDesc, prometheus.GaugeValue, infoValue, host.Name, host.Speed, host.PortState, host.PortType, host.PortID, host.PortName, host.FabricName, host.SymbolicName, host.SupportedClasses, host.SupportedSpeeds, host.DevLossTMO)
ch <- prometheus.MustNewConstMetric(infoDesc, prometheus.GaugeValue, infoValue, utils.SafeDereference(
host.Name,
host.Speed,
host.PortState,
host.PortType,
host.PortID,
host.PortName,
host.FabricName,
host.SymbolicName,
host.SupportedClasses,
host.SupportedSpeeds,
host.DevLossTMO,
)...)
// Then the counters
c.pushCounter(ch, "dumped_frames_total", host.Counters.DumpedFrames, host.Name)
c.pushCounter(ch, "error_frames_total", host.Counters.ErrorFrames, host.Name)
c.pushCounter(ch, "invalid_crc_total", host.Counters.InvalidCRCCount, host.Name)
c.pushCounter(ch, "rx_frames_total", host.Counters.RXFrames, host.Name)
c.pushCounter(ch, "rx_words_total", host.Counters.RXWords, host.Name)
c.pushCounter(ch, "tx_frames_total", host.Counters.TXFrames, host.Name)
c.pushCounter(ch, "tx_words_total", host.Counters.TXWords, host.Name)
c.pushCounter(ch, "seconds_since_last_reset_total", host.Counters.SecondsSinceLastReset, host.Name)
c.pushCounter(ch, "invalid_tx_words_total", host.Counters.InvalidTXWordCount, host.Name)
c.pushCounter(ch, "link_failure_total", host.Counters.LinkFailureCount, host.Name)
c.pushCounter(ch, "loss_of_sync_total", host.Counters.LossOfSyncCount, host.Name)
c.pushCounter(ch, "loss_of_signal_total", host.Counters.LossOfSignalCount, host.Name)
c.pushCounter(ch, "nos_total", host.Counters.NosCount, host.Name)
c.pushCounter(ch, "fcp_packet_aborts_total", host.Counters.FCPPacketAborts, host.Name)
// Note: `procfs` guarantees these a safe dereference for these counters.
c.pushCounter(ch, "dumped_frames_total", *host.Counters.DumpedFrames, *host.Name)
c.pushCounter(ch, "error_frames_total", *host.Counters.ErrorFrames, *host.Name)
c.pushCounter(ch, "invalid_crc_total", *host.Counters.InvalidCRCCount, *host.Name)
c.pushCounter(ch, "rx_frames_total", *host.Counters.RXFrames, *host.Name)
c.pushCounter(ch, "rx_words_total", *host.Counters.RXWords, *host.Name)
c.pushCounter(ch, "tx_frames_total", *host.Counters.TXFrames, *host.Name)
c.pushCounter(ch, "tx_words_total", *host.Counters.TXWords, *host.Name)
c.pushCounter(ch, "seconds_since_last_reset_total", *host.Counters.SecondsSinceLastReset, *host.Name)
c.pushCounter(ch, "invalid_tx_words_total", *host.Counters.InvalidTXWordCount, *host.Name)
c.pushCounter(ch, "link_failure_total", *host.Counters.LinkFailureCount, *host.Name)
c.pushCounter(ch, "loss_of_sync_total", *host.Counters.LossOfSyncCount, *host.Name)
c.pushCounter(ch, "loss_of_signal_total", *host.Counters.LossOfSignalCount, *host.Name)
c.pushCounter(ch, "nos_total", *host.Counters.NosCount, *host.Name)
c.pushCounter(ch, "fcp_packet_aborts_total", *host.Counters.FCPPacketAborts, *host.Name)
}
return nil

View file

@ -20,10 +20,10 @@ import (
"bytes"
"fmt"
"io"
"log/slog"
"os"
"strconv"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)
@ -32,7 +32,7 @@ const (
)
type fileFDStatCollector struct {
logger log.Logger
logger *slog.Logger
}
func init() {
@ -40,7 +40,7 @@ func init() {
}
// NewFileFDStatCollector returns a new Collector exposing file-nr stats.
func NewFileFDStatCollector(logger log.Logger) (Collector, error) {
func NewFileFDStatCollector(logger *slog.Logger) (Collector, error) {
return &fileFDStatCollector{logger}, nil
}

View file

@ -11,6 +11,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nofilefd
// +build !nofilefd
package collector
import "testing"

View file

@ -0,0 +1,65 @@
// Copyright 2024 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nofilesystem
// +build !nofilesystem
package collector
import (
"github.com/power-devops/perfstat"
)
const (
defMountPointsExcluded = "^/(dev|aha)($|/)"
defFSTypesExcluded = "^procfs$"
)
// Expose filesystem fullness.
func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
fsStat, err := perfstat.FileSystemStat()
if err != nil {
return nil, err
}
for _, stat := range fsStat {
if c.mountPointFilter.ignored(stat.MountPoint) {
c.logger.Debug("Ignoring mount point", "mountpoint", stat.MountPoint)
continue
}
fstype := stat.TypeString()
if c.fsTypeFilter.ignored(fstype) {
c.logger.Debug("Ignoring fs type", "type", fstype)
continue
}
ro := 0.0
if stat.Flags&perfstat.VFS_READONLY != 0 {
ro = 1.0
}
stats = append(stats, filesystemStats{
labels: filesystemLabels{
device: stat.Device,
mountPoint: stat.MountPoint,
fsType: fstype,
},
size: float64(stat.TotalBlocks * 512.0),
free: float64(stat.FreeBlocks * 512.0),
avail: float64(stat.FreeBlocks * 512.0), // AIX doesn't distinguish between free and available blocks.
files: float64(stat.TotalInodes),
filesFree: float64(stat.FreeInodes),
ro: ro,
})
}
return stats, nil
}

View file

@ -11,17 +11,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build (darwin || dragonfly) && !nofilesystem
// +build darwin dragonfly
// +build !nofilesystem
//go:build dragonfly && !nofilesystem
// +build dragonfly,!nofilesystem
package collector
import (
"errors"
"unsafe"
"github.com/go-kit/log/level"
)
/*
@ -50,15 +47,15 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
stats = []filesystemStats{}
for i := 0; i < int(count); i++ {
mountpoint := C.GoString(&mnt[i].f_mntonname[0])
if c.excludedMountPointsPattern.MatchString(mountpoint) {
level.Debug(c.logger).Log("msg", "Ignoring mount point", "mountpoint", mountpoint)
if c.mountPointFilter.ignored(mountpoint) {
c.logger.Debug("Ignoring mount point", "mountpoint", mountpoint)
continue
}
device := C.GoString(&mnt[i].f_mntfromname[0])
fstype := C.GoString(&mnt[i].f_fstypename[0])
if c.excludedFSTypesPattern.MatchString(fstype) {
level.Debug(c.logger).Log("msg", "Ignoring fs type", "type", fstype)
if c.fsTypeFilter.ignored(fstype) {
c.logger.Debug("Ignoring fs type", "type", fstype)
continue
}

View file

@ -11,19 +11,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nofilesystem && (linux || freebsd || openbsd || darwin || dragonfly)
//go:build !nofilesystem && (linux || freebsd || netbsd || openbsd || darwin || dragonfly || aix)
// +build !nofilesystem
// +build linux freebsd openbsd darwin dragonfly
// +build linux freebsd netbsd openbsd darwin dragonfly aix
package collector
import (
"errors"
"regexp"
"fmt"
"log/slog"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
)
@ -37,7 +36,7 @@ var (
mountPointsExcludeSet bool
mountPointsExclude = kingpin.Flag(
"collector.filesystem.mount-points-exclude",
"Regexp of mount points to exclude for filesystem collector.",
"Regexp of mount points to exclude for filesystem collector. (mutually exclusive to mount-points-include)",
).Default(defMountPointsExcluded).PreAction(func(c *kingpin.ParseContext) error {
mountPointsExcludeSet = true
return nil
@ -46,11 +45,15 @@ var (
"collector.filesystem.ignored-mount-points",
"Regexp of mount points to ignore for filesystem collector.",
).Hidden().String()
mountPointsInclude = kingpin.Flag(
"collector.filesystem.mount-points-include",
"Regexp of mount points to include for filesystem collector. (mutually exclusive to mount-points-exclude)",
).String()
fsTypesExcludeSet bool
fsTypesExclude = kingpin.Flag(
"collector.filesystem.fs-types-exclude",
"Regexp of filesystem types to exclude for filesystem collector.",
"Regexp of filesystem types to exclude for filesystem collector. (mutually exclusive to fs-types-include)",
).Default(defFSTypesExcluded).PreAction(func(c *kingpin.ParseContext) error {
fsTypesExcludeSet = true
return nil
@ -59,27 +62,34 @@ var (
"collector.filesystem.ignored-fs-types",
"Regexp of filesystem types to ignore for filesystem collector.",
).Hidden().String()
fsTypesInclude = kingpin.Flag(
"collector.filesystem.fs-types-include",
"Regexp of filesystem types to exclude for filesystem collector. (mutually exclusive to fs-types-exclude)",
).String()
filesystemLabelNames = []string{"device", "mountpoint", "fstype"}
filesystemLabelNames = []string{"device", "mountpoint", "fstype", "device_error"}
)
type filesystemCollector struct {
excludedMountPointsPattern *regexp.Regexp
excludedFSTypesPattern *regexp.Regexp
mountPointFilter deviceFilter
fsTypeFilter deviceFilter
sizeDesc, freeDesc, availDesc *prometheus.Desc
filesDesc, filesFreeDesc *prometheus.Desc
purgeableDesc *prometheus.Desc
roDesc, deviceErrorDesc *prometheus.Desc
logger log.Logger
mountInfoDesc *prometheus.Desc
logger *slog.Logger
}
type filesystemLabels struct {
device, mountPoint, fsType, options string
device, mountPoint, fsType, options, deviceError, major, minor string
}
type filesystemStats struct {
labels filesystemLabels
size, free, avail float64
files, filesFree float64
purgeable float64
ro, deviceError float64
}
@ -88,30 +98,8 @@ func init() {
}
// NewFilesystemCollector returns a new Collector exposing filesystems stats.
func NewFilesystemCollector(logger log.Logger) (Collector, error) {
if *oldMountPointsExcluded != "" {
if !mountPointsExcludeSet {
level.Warn(logger).Log("msg", "--collector.filesystem.ignored-mount-points is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.mount-points-exclude")
*mountPointsExclude = *oldMountPointsExcluded
} else {
return nil, errors.New("--collector.filesystem.ignored-mount-points and --collector.filesystem.mount-points-exclude are mutually exclusive")
}
}
if *oldFSTypesExcluded != "" {
if !fsTypesExcludeSet {
level.Warn(logger).Log("msg", "--collector.filesystem.ignored-fs-types is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.fs-types-exclude")
*fsTypesExclude = *oldFSTypesExcluded
} else {
return nil, errors.New("--collector.filesystem.ignored-fs-types and --collector.filesystem.fs-types-exclude are mutually exclusive")
}
}
subsystem := "filesystem"
level.Info(logger).Log("msg", "Parsed flag --collector.filesystem.mount-points-exclude", "flag", *mountPointsExclude)
mountPointPattern := regexp.MustCompile(*mountPointsExclude)
level.Info(logger).Log("msg", "Parsed flag --collector.filesystem.fs-types-exclude", "flag", *fsTypesExclude)
filesystemsTypesPattern := regexp.MustCompile(*fsTypesExclude)
func NewFilesystemCollector(logger *slog.Logger) (Collector, error) {
const subsystem = "filesystem"
sizeDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "size_bytes"),
@ -143,6 +131,12 @@ func NewFilesystemCollector(logger log.Logger) (Collector, error) {
filesystemLabelNames, nil,
)
purgeableDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "purgeable_bytes"),
"Filesystem space available including purgeable space (MacOS specific).",
filesystemLabelNames, nil,
)
roDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "readonly"),
"Filesystem read-only status.",
@ -155,16 +149,35 @@ func NewFilesystemCollector(logger log.Logger) (Collector, error) {
filesystemLabelNames, nil,
)
mountInfoDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, subsystem, "mount_info"),
"Filesystem mount information.",
[]string{"device", "major", "minor", "mountpoint"},
nil,
)
mountPointFilter, err := newMountPointsFilter(logger)
if err != nil {
return nil, fmt.Errorf("unable to parse mount points filter flags: %w", err)
}
fsTypeFilter, err := newFSTypeFilter(logger)
if err != nil {
return nil, fmt.Errorf("unable to parse fs types filter flags: %w", err)
}
return &filesystemCollector{
excludedMountPointsPattern: mountPointPattern,
excludedFSTypesPattern: filesystemsTypesPattern,
mountPointFilter: mountPointFilter,
fsTypeFilter: fsTypeFilter,
sizeDesc: sizeDesc,
freeDesc: freeDesc,
availDesc: availDesc,
filesDesc: filesDesc,
filesFreeDesc: filesFreeDesc,
purgeableDesc: purgeableDesc,
roDesc: roDesc,
deviceErrorDesc: deviceErrorDesc,
mountInfoDesc: mountInfoDesc,
logger: logger,
}, nil
}
@ -184,36 +197,105 @@ func (c *filesystemCollector) Update(ch chan<- prometheus.Metric) error {
ch <- prometheus.MustNewConstMetric(
c.deviceErrorDesc, prometheus.GaugeValue,
s.deviceError, s.labels.device, s.labels.mountPoint, s.labels.fsType,
s.deviceError, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
ch <- prometheus.MustNewConstMetric(
c.roDesc, prometheus.GaugeValue,
s.ro, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
if s.deviceError > 0 {
continue
}
ch <- prometheus.MustNewConstMetric(
c.sizeDesc, prometheus.GaugeValue,
s.size, s.labels.device, s.labels.mountPoint, s.labels.fsType,
s.size, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
ch <- prometheus.MustNewConstMetric(
c.freeDesc, prometheus.GaugeValue,
s.free, s.labels.device, s.labels.mountPoint, s.labels.fsType,
s.free, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
ch <- prometheus.MustNewConstMetric(
c.availDesc, prometheus.GaugeValue,
s.avail, s.labels.device, s.labels.mountPoint, s.labels.fsType,
s.avail, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
ch <- prometheus.MustNewConstMetric(
c.filesDesc, prometheus.GaugeValue,
s.files, s.labels.device, s.labels.mountPoint, s.labels.fsType,
s.files, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
ch <- prometheus.MustNewConstMetric(
c.filesFreeDesc, prometheus.GaugeValue,
s.filesFree, s.labels.device, s.labels.mountPoint, s.labels.fsType,
s.filesFree, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
ch <- prometheus.MustNewConstMetric(
c.roDesc, prometheus.GaugeValue,
s.ro, s.labels.device, s.labels.mountPoint, s.labels.fsType,
c.mountInfoDesc, prometheus.GaugeValue,
1.0, s.labels.device, s.labels.major, s.labels.minor, s.labels.mountPoint,
)
if s.purgeable >= 0 {
ch <- prometheus.MustNewConstMetric(
c.purgeableDesc, prometheus.GaugeValue,
s.purgeable, s.labels.device, s.labels.mountPoint, s.labels.fsType, s.labels.deviceError,
)
}
}
return nil
}
func newMountPointsFilter(logger *slog.Logger) (deviceFilter, error) {
if *oldMountPointsExcluded != "" {
if !mountPointsExcludeSet {
logger.Warn("--collector.filesystem.ignored-mount-points is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.mount-points-exclude")
*mountPointsExclude = *oldMountPointsExcluded
} else {
return deviceFilter{}, errors.New("--collector.filesystem.ignored-mount-points and --collector.filesystem.mount-points-exclude are mutually exclusive")
}
}
if *mountPointsInclude != "" && !mountPointsExcludeSet {
logger.Debug("mount-points-exclude flag not set when mount-points-include flag is set, assuming include is desired")
*mountPointsExclude = ""
}
if *mountPointsExclude != "" && *mountPointsInclude != "" {
return deviceFilter{}, errors.New("--collector.filesystem.mount-points-exclude and --collector.filesystem.mount-points-include are mutually exclusive")
}
if *mountPointsExclude != "" {
logger.Info("Parsed flag --collector.filesystem.mount-points-exclude", "flag", *mountPointsExclude)
}
if *mountPointsInclude != "" {
logger.Info("Parsed flag --collector.filesystem.mount-points-include", "flag", *mountPointsInclude)
}
return newDeviceFilter(*mountPointsExclude, *mountPointsInclude), nil
}
func newFSTypeFilter(logger *slog.Logger) (deviceFilter, error) {
if *oldFSTypesExcluded != "" {
if !fsTypesExcludeSet {
logger.Warn("--collector.filesystem.ignored-fs-types is DEPRECATED and will be removed in 2.0.0, use --collector.filesystem.fs-types-exclude")
*fsTypesExclude = *oldFSTypesExcluded
} else {
return deviceFilter{}, errors.New("--collector.filesystem.ignored-fs-types and --collector.filesystem.fs-types-exclude are mutually exclusive")
}
}
if *fsTypesInclude != "" && !fsTypesExcludeSet {
logger.Debug("fs-types-exclude flag not set when fs-types-include flag is set, assuming include is desired")
*fsTypesExclude = ""
}
if *fsTypesExclude != "" && *fsTypesInclude != "" {
return deviceFilter{}, errors.New("--collector.filesystem.fs-types-exclude and --collector.filesystem.fs-types-include are mutually exclusive")
}
if *fsTypesExclude != "" {
logger.Info("Parsed flag --collector.filesystem.fs-types-exclude", "flag", *fsTypesExclude)
}
if *fsTypesInclude != "" {
logger.Info("Parsed flag --collector.filesystem.fs-types-include", "flag", *fsTypesInclude)
}
return newDeviceFilter(*fsTypesExclude, *fsTypesInclude), nil
}

View file

@ -17,7 +17,6 @@
package collector
import (
"github.com/go-kit/log/level"
"golang.org/x/sys/unix"
)
@ -40,20 +39,20 @@ func (c *filesystemCollector) GetStats() ([]filesystemStats, error) {
stats := []filesystemStats{}
for _, fs := range buf {
mountpoint := unix.ByteSliceToString(fs.Mntonname[:])
if c.excludedMountPointsPattern.MatchString(mountpoint) {
level.Debug(c.logger).Log("msg", "Ignoring mount point", "mountpoint", mountpoint)
if c.mountPointFilter.ignored(mountpoint) {
c.logger.Debug("Ignoring mount point", "mountpoint", mountpoint)
continue
}
device := unix.ByteSliceToString(fs.Mntfromname[:])
fstype := unix.ByteSliceToString(fs.Fstypename[:])
if c.excludedFSTypesPattern.MatchString(fstype) {
level.Debug(c.logger).Log("msg", "Ignoring fs type", "type", fstype)
if c.fsTypeFilter.ignored(fstype) {
c.logger.Debug("Ignoring fs type", "type", fstype)
continue
}
if (fs.Flags & unix.MNT_IGNORE) != 0 {
level.Debug(c.logger).Log("msg", "Ignoring mount flagged as ignore", "mountpoint", mountpoint)
c.logger.Debug("Ignoring mount flagged as ignore", "mountpoint", mountpoint)
continue
}

View file

@ -21,14 +21,13 @@ import (
"errors"
"fmt"
"io"
"log/slog"
"os"
"strings"
"sync"
"time"
"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"golang.org/x/sys/unix"
)
@ -40,6 +39,9 @@ const (
var mountTimeout = kingpin.Flag("collector.filesystem.mount-timeout",
"how long to wait for a mount to respond before marking it as stale").
Hidden().Default("5s").Duration()
var statWorkerCount = kingpin.Flag("collector.filesystem.stat-workers",
"how many stat calls to process simultaneously").
Hidden().Default("4").Int()
var stuckMounts = make(map[string]struct{})
var stuckMountsMtx = &sync.Mutex{}
@ -50,53 +52,63 @@ func (c *filesystemCollector) GetStats() ([]filesystemStats, error) {
return nil, err
}
stats := []filesystemStats{}
labelChan := make(chan filesystemLabels)
statChan := make(chan filesystemStats)
wg := sync.WaitGroup{}
workerCount := *statWorkerCount
if workerCount < 1 {
workerCount = 1
}
for i := 0; i < workerCount; i++ {
wg.Add(1)
go func() {
defer wg.Done()
for labels := range labelChan {
statChan <- c.processStat(labels)
}
}()
}
go func() {
for _, labels := range mps {
if c.excludedMountPointsPattern.MatchString(labels.mountPoint) {
level.Debug(c.logger).Log("msg", "Ignoring mount point", "mountpoint", labels.mountPoint)
if c.mountPointFilter.ignored(labels.mountPoint) {
c.logger.Debug("Ignoring mount point", "mountpoint", labels.mountPoint)
continue
}
if c.excludedFSTypesPattern.MatchString(labels.fsType) {
level.Debug(c.logger).Log("msg", "Ignoring fs", "type", labels.fsType)
if c.fsTypeFilter.ignored(labels.fsType) {
c.logger.Debug("Ignoring fs type", "type", labels.fsType)
continue
}
stuckMountsMtx.Lock()
if _, ok := stuckMounts[labels.mountPoint]; ok {
labels.deviceError = "mountpoint timeout"
stats = append(stats, filesystemStats{
labels: labels,
deviceError: 1,
})
level.Debug(c.logger).Log("msg", "Mount point is in an unresponsive state", "mountpoint", labels.mountPoint)
c.logger.Debug("Mount point is in an unresponsive state", "mountpoint", labels.mountPoint)
stuckMountsMtx.Unlock()
continue
}
stuckMountsMtx.Unlock()
// The success channel is used do tell the "watcher" that the stat
// finished successfully. The channel is closed on success.
success := make(chan struct{})
go stuckMountWatcher(labels.mountPoint, success, c.logger)
buf := new(unix.Statfs_t)
err = unix.Statfs(rootfsFilePath(labels.mountPoint), buf)
stuckMountsMtx.Lock()
close(success)
// If the mount has been marked as stuck, unmark it and log it's recovery.
if _, ok := stuckMounts[labels.mountPoint]; ok {
level.Debug(c.logger).Log("msg", "Mount point has recovered, monitoring will resume", "mountpoint", labels.mountPoint)
delete(stuckMounts, labels.mountPoint)
labelChan <- labels
}
stuckMountsMtx.Unlock()
close(labelChan)
wg.Wait()
close(statChan)
}()
if err != nil {
stats = append(stats, filesystemStats{
labels: labels,
deviceError: 1,
})
level.Debug(c.logger).Log("msg", "Error on statfs() system call", "rootfs", rootfsFilePath(labels.mountPoint), "err", err)
continue
for stat := range statChan {
stats = append(stats, stat)
}
return stats, nil
}
func (c *filesystemCollector) processStat(labels filesystemLabels) filesystemStats {
var ro float64
for _, option := range strings.Split(labels.options, ",") {
if option == "ro" {
@ -105,7 +117,32 @@ func (c *filesystemCollector) GetStats() ([]filesystemStats, error) {
}
}
stats = append(stats, filesystemStats{
success := make(chan struct{})
go stuckMountWatcher(labels.mountPoint, success, c.logger)
buf := new(unix.Statfs_t)
err := unix.Statfs(rootfsFilePath(labels.mountPoint), buf)
stuckMountsMtx.Lock()
close(success)
// If the mount has been marked as stuck, unmark it and log it's recovery.
if _, ok := stuckMounts[labels.mountPoint]; ok {
c.logger.Debug("Mount point has recovered, monitoring will resume", "mountpoint", labels.mountPoint)
delete(stuckMounts, labels.mountPoint)
}
stuckMountsMtx.Unlock()
if err != nil {
labels.deviceError = err.Error()
c.logger.Debug("Error on statfs() system call", "rootfs", rootfsFilePath(labels.mountPoint), "err", err)
return filesystemStats{
labels: labels,
deviceError: 1,
ro: ro,
}
}
return filesystemStats{
labels: labels,
size: float64(buf.Blocks) * float64(buf.Bsize),
free: float64(buf.Bfree) * float64(buf.Bsize),
@ -113,15 +150,13 @@ func (c *filesystemCollector) GetStats() ([]filesystemStats, error) {
files: float64(buf.Files),
filesFree: float64(buf.Ffree),
ro: ro,
})
}
return stats, nil
}
// stuckMountWatcher listens on the given success channel and if the channel closes
// then the watcher does nothing. If instead the timeout is reached, the
// mount point that is being watched is marked as stuck.
func stuckMountWatcher(mountPoint string, success chan struct{}, logger log.Logger) {
func stuckMountWatcher(mountPoint string, success chan struct{}, logger *slog.Logger) {
mountCheckTimer := time.NewTimer(*mountTimeout)
defer mountCheckTimer.Stop()
select {
@ -134,19 +169,19 @@ func stuckMountWatcher(mountPoint string, success chan struct{}, logger log.Logg
case <-success:
// Success came in just after the timeout was reached, don't label the mount as stuck
default:
level.Debug(logger).Log("msg", "Mount point timed out, it is being labeled as stuck and will not be monitored", "mountpoint", mountPoint)
logger.Debug("Mount point timed out, it is being labeled as stuck and will not be monitored", "mountpoint", mountPoint)
stuckMounts[mountPoint] = struct{}{}
}
stuckMountsMtx.Unlock()
}
}
func mountPointDetails(logger log.Logger) ([]filesystemLabels, error) {
file, err := os.Open(procFilePath("1/mounts"))
func mountPointDetails(logger *slog.Logger) ([]filesystemLabels, error) {
file, err := os.Open(procFilePath("1/mountinfo"))
if errors.Is(err, os.ErrNotExist) {
// Fallback to `/proc/mounts` if `/proc/1/mounts` is missing due hidepid.
level.Debug(logger).Log("msg", "Reading root mounts failed, falling back to system mounts", "err", err)
file, err = os.Open(procFilePath("mounts"))
// Fallback to `/proc/self/mountinfo` if `/proc/1/mountinfo` is missing due hidepid.
logger.Debug("Reading root mounts failed, falling back to self mounts", "err", err)
file, err = os.Open(procFilePath("self/mountinfo"))
}
if err != nil {
return nil, err
@ -163,20 +198,34 @@ func parseFilesystemLabels(r io.Reader) ([]filesystemLabels, error) {
for scanner.Scan() {
parts := strings.Fields(scanner.Text())
if len(parts) < 4 {
if len(parts) < 10 {
return nil, fmt.Errorf("malformed mount point information: %q", scanner.Text())
}
major, minor := 0, 0
_, err := fmt.Sscanf(parts[2], "%d:%d", &major, &minor)
if err != nil {
return nil, fmt.Errorf("malformed mount point information: %q", scanner.Text())
}
m := 5
for parts[m+1] != "-" {
m++
}
// Ensure we handle the translation of \040 and \011
// as per fstab(5).
parts[1] = strings.Replace(parts[1], "\\040", " ", -1)
parts[1] = strings.Replace(parts[1], "\\011", "\t", -1)
parts[4] = strings.ReplaceAll(parts[4], "\\040", " ")
parts[4] = strings.ReplaceAll(parts[4], "\\011", "\t")
filesystems = append(filesystems, filesystemLabels{
device: parts[0],
mountPoint: rootfsStripPrefix(parts[1]),
fsType: parts[2],
options: parts[3],
device: parts[m+3],
mountPoint: rootfsStripPrefix(parts[4]),
fsType: parts[m+2],
options: parts[5],
major: fmt.Sprint(major),
minor: fmt.Sprint(minor),
deviceError: "",
})
}

View file

@ -11,10 +11,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nofilesystem
// +build !nofilesystem
package collector
import (
"github.com/go-kit/log"
"io"
"log/slog"
"strings"
"testing"
@ -79,15 +83,23 @@ func TestMountPointDetails(t *testing.T) {
"/var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore] bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk": "",
}
filesystems, err := mountPointDetails(log.NewNopLogger())
filesystems, err := mountPointDetails(slog.New(slog.NewTextHandler(io.Discard, nil)))
if err != nil {
t.Log(err)
}
foundSet := map[string]bool{}
for _, fs := range filesystems {
if _, ok := expected[fs.mountPoint]; !ok {
t.Errorf("Got unexpected %s", fs.mountPoint)
}
foundSet[fs.mountPoint] = true
}
for mountPoint := range expected {
if _, ok := foundSet[mountPoint]; !ok {
t.Errorf("Expected %s, got nothing", mountPoint)
}
}
}
@ -100,7 +112,7 @@ func TestMountsFallback(t *testing.T) {
"/": "",
}
filesystems, err := mountPointDetails(log.NewNopLogger())
filesystems, err := mountPointDetails(slog.New(slog.NewTextHandler(io.Discard, nil)))
if err != nil {
t.Log(err)
}
@ -128,7 +140,7 @@ func TestPathRootfs(t *testing.T) {
"/sys/fs/cgroup": "",
}
filesystems, err := mountPointDetails(log.NewNopLogger())
filesystems, err := mountPointDetails(slog.New(slog.NewTextHandler(io.Discard, nil)))
if err != nil {
t.Log(err)
}

View file

@ -0,0 +1,114 @@
// Copyright 2015 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build darwin && !nofilesystem
// +build darwin,!nofilesystem
package collector
/*
#cgo CFLAGS: -x objective-c
#cgo LDFLAGS: -framework Foundation
#import <Foundation/Foundation.h>
Float64 purgeable(char *path) {
Float64 value = -1.0f;
@autoreleasepool {
NSError *error = nil;
NSString *str = [NSString stringWithUTF8String:path];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:str];
NSDictionary *results = [fileURL resourceValuesForKeys:@[NSURLVolumeAvailableCapacityForImportantUsageKey] error:&error];
if (results) {
CFNumberRef tmp = CFDictionaryGetValue((CFDictionaryRef)results, NSURLVolumeAvailableCapacityForImportantUsageKey);
if (tmp != NULL) {
CFNumberGetValue(tmp, kCFNumberFloat64Type, &value);
}
}
[fileURL release];
}
return value;
}
*/
import "C"
import (
"errors"
"unsafe"
)
/*
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/mount.h>
#include <stdio.h>
*/
import "C"
const (
defMountPointsExcluded = "^/(dev)($|/)"
defFSTypesExcluded = "^devfs$"
readOnly = 0x1 // MNT_RDONLY
)
// Expose filesystem fullness.
func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
var mntbuf *C.struct_statfs
count := C.getmntinfo(&mntbuf, C.MNT_NOWAIT)
if count == 0 {
return nil, errors.New("getmntinfo() failed")
}
mnt := (*[1 << 20]C.struct_statfs)(unsafe.Pointer(mntbuf))
stats = []filesystemStats{}
for i := 0; i < int(count); i++ {
mountpoint := C.GoString(&mnt[i].f_mntonname[0])
if c.mountPointFilter.ignored(mountpoint) {
c.logger.Debug("Ignoring mount point", "mountpoint", mountpoint)
continue
}
device := C.GoString(&mnt[i].f_mntfromname[0])
fstype := C.GoString(&mnt[i].f_fstypename[0])
if c.fsTypeFilter.ignored(fstype) {
c.logger.Debug("Ignoring fs type", "type", fstype)
continue
}
var ro float64
if (mnt[i].f_flags & readOnly) != 0 {
ro = 1
}
mountpointCString := C.CString(mountpoint)
defer C.free(unsafe.Pointer(mountpointCString))
stats = append(stats, filesystemStats{
labels: filesystemLabels{
device: device,
mountPoint: rootfsStripPrefix(mountpoint),
fsType: fstype,
},
size: float64(mnt[i].f_blocks) * float64(mnt[i].f_bsize),
free: float64(mnt[i].f_bfree) * float64(mnt[i].f_bsize),
avail: float64(mnt[i].f_bavail) * float64(mnt[i].f_bsize),
files: float64(mnt[i].f_files),
filesFree: float64(mnt[i].f_ffree),
purgeable: float64(C.purgeable(mountpointCString)),
ro: ro,
})
}
return stats, nil
}

View file

@ -0,0 +1,132 @@
// Copyright 2024 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nofilesystem
// +build !nofilesystem
package collector
import (
"fmt"
"syscall"
"unsafe"
"golang.org/x/sys/unix"
)
const (
defMountPointsExcluded = "^/(dev)($|/)"
defFSTypesExcluded = "^(kernfs|procfs|ptyfs|fdesc)$"
_VFS_NAMELEN = 32
_VFS_MNAMELEN = 1024
)
/*
* Go uses the NetBSD 9 ABI and thus syscall.SYS_GETVFSSTAT is compat_90_getvfsstat.
* We have to declare struct statvfs90 because it is not included in the unix package.
* See NetBSD/src/sys/compat/sys/statvfs.h.
*/
type statvfs90 struct {
F_flag uint
F_bsize uint
F_frsize uint
F_iosize uint
F_blocks uint64
F_bfree uint64
F_bavail uint64
F_bresvd uint64
F_files uint64
F_ffree uint64
F_favail uint64
F_fresvd uint64
F_syncreads uint64
F_syncwrites uint64
F_asyncreads uint64
F_asyncwrites uint64
F_fsidx [2]uint32
F_fsid uint32
F_namemax uint
F_owner uint32
F_spare [4]uint32
F_fstypename [_VFS_NAMELEN]byte
F_mntonname [_VFS_MNAMELEN]byte
F_mntfromname [_VFS_MNAMELEN]byte
cgo_pad [4]byte
}
func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
var mnt []statvfs90
if syscall.SYS_GETVFSSTAT != 356 /* compat_90_getvfsstat */ {
/*
* Catch if golang ever updates to newer ABI and bail.
*/
return nil, fmt.Errorf("getvfsstat: ABI mismatch")
}
for {
r1, _, errno := syscall.Syscall(syscall.SYS_GETVFSSTAT, uintptr(0), 0, unix.ST_NOWAIT)
if errno != 0 {
return nil, fmt.Errorf("getvfsstat: %s", string(errno))
}
mnt = make([]statvfs90, r1, r1)
r2, _, errno := syscall.Syscall(syscall.SYS_GETVFSSTAT, uintptr(unsafe.Pointer(&mnt[0])), unsafe.Sizeof(mnt[0])*r1, unix.ST_NOWAIT /* ST_NOWAIT */)
if errno != 0 {
return nil, fmt.Errorf("getvfsstat: %s", string(errno))
}
if r1 == r2 {
break
}
}
stats = []filesystemStats{}
for _, v := range mnt {
mountpoint := unix.ByteSliceToString(v.F_mntonname[:])
if c.mountPointFilter.ignored(mountpoint) {
c.logger.Debug("msg", "Ignoring mount point", "mountpoint", mountpoint)
continue
}
device := unix.ByteSliceToString(v.F_mntfromname[:])
fstype := unix.ByteSliceToString(v.F_fstypename[:])
if c.fsTypeFilter.ignored(fstype) {
c.logger.Debug("msg", "Ignoring fs type", "type", fstype)
continue
}
var ro float64
if (v.F_flag & unix.MNT_RDONLY) != 0 {
ro = 1
}
stats = append(stats, filesystemStats{
labels: filesystemLabels{
device: device,
mountPoint: mountpoint,
fsType: fstype,
},
size: float64(v.F_blocks) * float64(v.F_bsize),
free: float64(v.F_bfree) * float64(v.F_bsize),
avail: float64(v.F_bavail) * float64(v.F_bsize),
files: float64(v.F_files),
filesFree: float64(v.F_ffree),
ro: ro,
})
}
return stats, nil
}

View file

@ -11,13 +11,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build openbsd && !nofilesystem
// +build openbsd,!nofilesystem
//go:build !nofilesystem
// +build !nofilesystem
package collector
import (
"github.com/go-kit/log/level"
"golang.org/x/sys/unix"
)
@ -42,15 +41,15 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
stats = []filesystemStats{}
for _, v := range mnt {
mountpoint := unix.ByteSliceToString(v.F_mntonname[:])
if c.excludedMountPointsPattern.MatchString(mountpoint) {
level.Debug(c.logger).Log("msg", "Ignoring mount point", "mountpoint", mountpoint)
if c.mountPointFilter.ignored(mountpoint) {
c.logger.Debug("Ignoring mount point", "mountpoint", mountpoint)
continue
}
device := unix.ByteSliceToString(v.F_mntfromname[:])
fstype := unix.ByteSliceToString(v.F_fstypename[:])
if c.excludedFSTypesPattern.MatchString(fstype) {
level.Debug(c.logger).Log("msg", "Ignoring fs type", "type", fstype)
if c.fsTypeFilter.ignored(fstype) {
c.logger.Debug("Ignoring fs type", "type", fstype)
continue
}

View file

@ -1,55 +1,59 @@
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of frees.
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of allocated objects.
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
# HELP go_memstats_mallocs_total Total number of mallocs.
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_arp_entries ARP entries by device
@ -161,6 +165,14 @@ node_btrfs_allocation_ratio{block_group_type="metadata",mode="raid1",uuid="0abb2
node_btrfs_allocation_ratio{block_group_type="metadata",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 2
node_btrfs_allocation_ratio{block_group_type="system",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 2
node_btrfs_allocation_ratio{block_group_type="system",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 2
# HELP node_btrfs_commit_seconds_total Sum of the duration of all commits, in seconds.
# TYPE node_btrfs_commit_seconds_total counter
node_btrfs_commit_seconds_total{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 47836.09
node_btrfs_commit_seconds_total{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_commits_total The total number of commits that have occurred.
# TYPE node_btrfs_commits_total counter
node_btrfs_commits_total{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 258051
node_btrfs_commits_total{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_device_size_bytes Size of a device that is part of the filesystem.
# TYPE node_btrfs_device_size_bytes gauge
node_btrfs_device_size_bytes{device="loop22",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.073741824e+10
@ -177,6 +189,14 @@ node_btrfs_global_rsv_size_bytes{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.
# TYPE node_btrfs_info gauge
node_btrfs_info{label="",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1
node_btrfs_info{label="fixture",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1
# HELP node_btrfs_last_commit_seconds Duration of the most recent commit, in seconds.
# TYPE node_btrfs_last_commit_seconds gauge
node_btrfs_last_commit_seconds{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1
node_btrfs_last_commit_seconds{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_max_commit_seconds Duration of the slowest commit, in seconds.
# TYPE node_btrfs_max_commit_seconds gauge
node_btrfs_max_commit_seconds{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 51.462
node_btrfs_max_commit_seconds{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_reserved_bytes Amount of space reserved for a data type
# TYPE node_btrfs_reserved_bytes gauge
node_btrfs_reserved_bytes{block_group_type="data",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 0
@ -402,6 +422,13 @@ node_cpu_seconds_total{cpu="7",mode="softirq"} 0.31
node_cpu_seconds_total{cpu="7",mode="steal"} 0
node_cpu_seconds_total{cpu="7",mode="system"} 101.64
node_cpu_seconds_total{cpu="7",mode="user"} 290.98
# HELP node_cpu_vulnerabilities_info Details of each CPU vulnerability reported by sysfs. The value of the series is an int encoded state of the vulnerability. The same state is stored as a string in the label
# TYPE node_cpu_vulnerabilities_info gauge
node_cpu_vulnerabilities_info{codename="itlb_multihit",mitigation="",state="not affected"} 1
node_cpu_vulnerabilities_info{codename="mds",mitigation="",state="vulnerable"} 1
node_cpu_vulnerabilities_info{codename="retbleed",mitigation="untrained return thunk; SMT enabled with STIBP protection",state="mitigation"} 1
node_cpu_vulnerabilities_info{codename="spectre_v1",mitigation="usercopy/swapgs barriers and __user pointer sanitization",state="mitigation"} 1
node_cpu_vulnerabilities_info{codename="spectre_v2",mitigation="Retpolines, IBPB: conditional, STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected",state="mitigation"} 1
# HELP node_disk_ata_rotation_rate_rpm ATA disk rotation rate in RPMs (0 for SSDs).
# TYPE node_disk_ata_rotation_rate_rpm gauge
node_disk_ata_rotation_rate_rpm{device="sda"} 7200
@ -461,21 +488,21 @@ node_disk_flush_requests_time_seconds_total{device="sdc"} 1.944
node_disk_flush_requests_total{device="sdc"} 1555
# HELP node_disk_info Info of /sys/block/<block_device>.
# TYPE node_disk_info gauge
node_disk_info{device="dm-0",major="252",minor="0",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-1",major="252",minor="1",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-2",major="252",minor="2",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-3",major="252",minor="3",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-4",major="252",minor="4",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-5",major="252",minor="5",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0",major="179",minor="0",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p1",major="179",minor="1",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p2",major="179",minor="2",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="nvme0n1",major="259",minor="0",model="SAMSUNG EHFTF55LURSY-000Y9",path="pci-0000:02:00.0-nvme-1",revision="4NBTUY95",serial="S252B6CU1HG3M1",wwn="eui.p3vbbiejx5aae2r3"} 1
node_disk_info{device="sda",major="8",minor="0",model="TOSHIBA_KSDB4U86",path="pci-0000:3b:00.0-sas-phy7-lun-0",revision="0102",serial="2160A0D5FVGG",wwn="0x7c72382b8de36a64"} 1
node_disk_info{device="sdb",major="8",minor="16",model="SuperMicro_SSD",path="pci-0000:00:1f.2-ata-1",revision="0R",serial="SMC0E1B87ABBB16BD84E",wwn="0xe1b87abbb16bd84e"} 1
node_disk_info{device="sdc",major="8",minor="32",model="INTEL_SSDS9X9SI0",path="pci-0000:00:1f.2-ata-4",revision="0100",serial="3EWB5Y25CWQWA7EH1U",wwn="0x58907ddc573a5de"} 1
node_disk_info{device="sr0",major="11",minor="0",model="Virtual_CDROM0",path="pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0",revision="1.00",serial="AAAABBBBCCCC1",wwn=""} 1
node_disk_info{device="vda",major="254",minor="0",model="",path="pci-0000:00:06.0",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-0",major="252",minor="0",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-1",major="252",minor="1",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-2",major="252",minor="2",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-3",major="252",minor="3",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-4",major="252",minor="4",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-5",major="252",minor="5",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0",major="179",minor="0",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p1",major="179",minor="1",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p2",major="179",minor="2",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="nvme0n1",major="259",minor="0",model="SAMSUNG EHFTF55LURSY-000Y9",path="pci-0000:02:00.0-nvme-1",revision="4NBTUY95",rotational="0",serial="S252B6CU1HG3M1",wwn="eui.p3vbbiejx5aae2r3"} 1
node_disk_info{device="sda",major="8",minor="0",model="TOSHIBA_KSDB4U86",path="pci-0000:3b:00.0-sas-phy7-lun-0",revision="0102",rotational="1",serial="2160A0D5FVGG",wwn="0x7c72382b8de36a64"} 1
node_disk_info{device="sdb",major="8",minor="16",model="SuperMicro_SSD",path="pci-0000:00:1f.2-ata-1",revision="0R",rotational="0",serial="SMC0E1B87ABBB16BD84E",wwn="0xe1b87abbb16bd84e"} 1
node_disk_info{device="sdc",major="8",minor="32",model="INTEL_SSDS9X9SI0",path="pci-0000:00:1f.2-ata-4",revision="0100",rotational="0",serial="3EWB5Y25CWQWA7EH1U",wwn="0x58907ddc573a5de"} 1
node_disk_info{device="sr0",major="11",minor="0",model="Virtual_CDROM0",path="pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0",revision="1.00",rotational="0",serial="AAAABBBBCCCC1",wwn=""} 1
node_disk_info{device="vda",major="254",minor="0",model="",path="pci-0000:00:06.0",revision="",rotational="0",serial="",wwn=""} 1
# HELP node_disk_io_now The number of I/Os currently in progress.
# TYPE node_disk_io_now gauge
node_disk_io_now{device="dm-0"} 0
@ -735,48 +762,64 @@ node_entropy_available_bits 1337
node_entropy_pool_size_bits 4096
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_fibrechannel_dumped_frames_total Number of dumped frames
# TYPE node_fibrechannel_dumped_frames_total counter
node_fibrechannel_dumped_frames_total{fc_host="host1"} 0
# HELP node_fibrechannel_error_frames_total Number of errors in frames
# TYPE node_fibrechannel_error_frames_total counter
node_fibrechannel_error_frames_total{fc_host="host0"} 0
node_fibrechannel_error_frames_total{fc_host="host1"} 19
# HELP node_fibrechannel_fcp_packet_aborts_total Number of aborted packets
# TYPE node_fibrechannel_fcp_packet_aborts_total counter
node_fibrechannel_fcp_packet_aborts_total{fc_host="host0"} 19
# HELP node_fibrechannel_info Non-numeric data from /sys/class/fc_host/<host>, value is always 1.
# TYPE node_fibrechannel_info gauge
node_fibrechannel_info{dev_loss_tmo="",fabric_name="",fc_host="host1",port_id="",port_name="",port_state="",port_type="",speed="8 Gbit",supported_classes="",supported_speeds="",symbolic_name=""} 1
node_fibrechannel_info{dev_loss_tmo="30",fabric_name="0",fc_host="host0",port_id="000002",port_name="1000e0071bce95f2",port_state="Online",port_type="Point-To-Point (direct nport connection)",speed="16 Gbit",supported_classes="Class 3",supported_speeds="4 Gbit, 8 Gbit, 16 Gbit",symbolic_name="Emulex SN1100E2P FV12.4.270.3 DV12.4.0.0. HN:gotest. OS:Linux"} 1
# HELP node_fibrechannel_invalid_crc_total Invalid Cyclic Redundancy Check count
# TYPE node_fibrechannel_invalid_crc_total counter
node_fibrechannel_invalid_crc_total{fc_host="host0"} 2
node_fibrechannel_invalid_crc_total{fc_host="host1"} 32
# HELP node_fibrechannel_invalid_tx_words_total Number of invalid words transmitted by host port
# TYPE node_fibrechannel_invalid_tx_words_total counter
node_fibrechannel_invalid_tx_words_total{fc_host="host0"} 8
node_fibrechannel_invalid_tx_words_total{fc_host="host1"} 128
# HELP node_fibrechannel_link_failure_total Number of times the host port link has failed
# TYPE node_fibrechannel_link_failure_total counter
node_fibrechannel_link_failure_total{fc_host="host0"} 9
node_fibrechannel_link_failure_total{fc_host="host1"} 144
# HELP node_fibrechannel_loss_of_signal_total Number of times signal has been lost
# TYPE node_fibrechannel_loss_of_signal_total counter
node_fibrechannel_loss_of_signal_total{fc_host="host0"} 17
node_fibrechannel_loss_of_signal_total{fc_host="host1"} 272
# HELP node_fibrechannel_loss_of_sync_total Number of failures on either bit or transmission word boundaries
# TYPE node_fibrechannel_loss_of_sync_total counter
node_fibrechannel_loss_of_sync_total{fc_host="host0"} 16
node_fibrechannel_loss_of_sync_total{fc_host="host1"} 256
# HELP node_fibrechannel_nos_total Number Not_Operational Primitive Sequence received by host port
# TYPE node_fibrechannel_nos_total counter
node_fibrechannel_nos_total{fc_host="host0"} 18
node_fibrechannel_nos_total{fc_host="host1"} 288
# HELP node_fibrechannel_rx_frames_total Number of frames received
# TYPE node_fibrechannel_rx_frames_total counter
node_fibrechannel_rx_frames_total{fc_host="host0"} 3
node_fibrechannel_rx_frames_total{fc_host="host1"} 48
# HELP node_fibrechannel_rx_words_total Number of words received by host port
# TYPE node_fibrechannel_rx_words_total counter
node_fibrechannel_rx_words_total{fc_host="host0"} 4
node_fibrechannel_rx_words_total{fc_host="host1"} 64
# HELP node_fibrechannel_seconds_since_last_reset_total Number of seconds since last host port reset
# TYPE node_fibrechannel_seconds_since_last_reset_total counter
node_fibrechannel_seconds_since_last_reset_total{fc_host="host0"} 7
node_fibrechannel_seconds_since_last_reset_total{fc_host="host1"} 112
# HELP node_fibrechannel_tx_frames_total Number of frames transmitted by host port
# TYPE node_fibrechannel_tx_frames_total counter
node_fibrechannel_tx_frames_total{fc_host="host0"} 5
node_fibrechannel_tx_frames_total{fc_host="host1"} 80
# HELP node_fibrechannel_tx_words_total Number of words transmitted by host port
# TYPE node_fibrechannel_tx_words_total counter
node_fibrechannel_tx_words_total{fc_host="host0"} 6
node_fibrechannel_tx_words_total{fc_host="host1"} 96
# HELP node_filefd_allocated File descriptor statistics: allocated.
# TYPE node_filefd_allocated gauge
node_filefd_allocated 1024
@ -828,6 +871,10 @@ node_hwmon_fan_target_rpm{chip="nct6779",sensor="fan2"} 27000
# HELP node_hwmon_fan_tolerance Hardware monitor fan element tolerance
# TYPE node_hwmon_fan_tolerance gauge
node_hwmon_fan_tolerance{chip="nct6779",sensor="fan2"} 0
# HELP node_hwmon_freq_freq_mhz Hardware monitor for GPU frequency in MHz
# TYPE node_hwmon_freq_freq_mhz gauge
node_hwmon_freq_freq_mhz{chip="hwmon4",sensor="mclk"} 300
node_hwmon_freq_freq_mhz{chip="hwmon4",sensor="sclk"} 214
# HELP node_hwmon_in_alarm Hardware sensor alarm status (in)
# TYPE node_hwmon_in_alarm gauge
node_hwmon_in_alarm{chip="nct6779",sensor="in0"} 0
@ -941,8 +988,10 @@ node_hwmon_pwm_weight_temp_step_tol{chip="nct6779",sensor="pwm1"} 0
# TYPE node_hwmon_sensor_label gauge
node_hwmon_sensor_label{chip="hwmon4",label="foosensor",sensor="temp1"} 1
node_hwmon_sensor_label{chip="hwmon4",label="foosensor",sensor="temp2"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Left side ",sensor="fan1"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Right side ",sensor="fan2"} 1
node_hwmon_sensor_label{chip="hwmon4",label="mclk",sensor="freq2"} 1
node_hwmon_sensor_label{chip="hwmon4",label="sclk",sensor="freq1"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Left side",sensor="fan1"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Right side",sensor="fan2"} 1
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 0",sensor="temp2"} 1
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 1",sensor="temp3"} 1
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 2",sensor="temp4"} 1
@ -1536,6 +1585,14 @@ node_md_blocks_synced{device="md6"} 1.6775552e+07
node_md_blocks_synced{device="md7"} 7.813735424e+09
node_md_blocks_synced{device="md8"} 1.6775552e+07
node_md_blocks_synced{device="md9"} 0
# HELP node_md_degraded Number of degraded disks on device.
# TYPE node_md_degraded gauge
node_md_degraded{device="md0"} 0
node_md_degraded{device="md1"} 0
node_md_degraded{device="md10"} 0
node_md_degraded{device="md4"} 0
node_md_degraded{device="md5"} 1
node_md_degraded{device="md6"} 1
# HELP node_md_disks Number of active/failed/spare disks of device.
# TYPE node_md_disks gauge
node_md_disks{device="md0",state="active"} 2
@ -1608,6 +1665,14 @@ node_md_disks_required{device="md6"} 2
node_md_disks_required{device="md7"} 4
node_md_disks_required{device="md8"} 2
node_md_disks_required{device="md9"} 4
# HELP node_md_raid_disks Number of raid disks on device.
# TYPE node_md_raid_disks gauge
node_md_raid_disks{device="md0"} 2
node_md_raid_disks{device="md1"} 2
node_md_raid_disks{device="md10"} 4
node_md_raid_disks{device="md4"} 3
node_md_raid_disks{device="md5"} 3
node_md_raid_disks{device="md6"} 4
# HELP node_md_state Indicates the state of md-device.
# TYPE node_md_state gauge
node_md_state{device="md0",state="active"} 1
@ -2296,6 +2361,12 @@ node_netstat_TcpExt_SyncookiesRecv 0
# HELP node_netstat_TcpExt_SyncookiesSent Statistic TcpExtSyncookiesSent.
# TYPE node_netstat_TcpExt_SyncookiesSent untyped
node_netstat_TcpExt_SyncookiesSent 0
# HELP node_netstat_TcpExt_TCPOFOQueue Statistic TcpExtTCPOFOQueue.
# TYPE node_netstat_TcpExt_TCPOFOQueue untyped
node_netstat_TcpExt_TCPOFOQueue 42
# HELP node_netstat_TcpExt_TCPRcvQDrop Statistic TcpExtTCPRcvQDrop.
# TYPE node_netstat_TcpExt_TCPRcvQDrop untyped
node_netstat_TcpExt_TCPRcvQDrop 131
# HELP node_netstat_TcpExt_TCPTimeouts Statistic TcpExtTCPTimeouts.
# TYPE node_netstat_TcpExt_TCPTimeouts untyped
node_netstat_TcpExt_TCPTimeouts 115
@ -2731,13 +2802,16 @@ node_nfsd_requests_total{method="SecInfo",proto="4"} 0
node_nfsd_requests_total{method="SetAttr",proto="2"} 0
node_nfsd_requests_total{method="SetAttr",proto="3"} 0
node_nfsd_requests_total{method="SetAttr",proto="4"} 0
node_nfsd_requests_total{method="SetClientID",proto="4"} 3
node_nfsd_requests_total{method="SetClientIDConfirm",proto="4"} 3
node_nfsd_requests_total{method="SymLink",proto="2"} 0
node_nfsd_requests_total{method="SymLink",proto="3"} 0
node_nfsd_requests_total{method="Verify",proto="4"} 3
node_nfsd_requests_total{method="Verify",proto="4"} 0
node_nfsd_requests_total{method="WdelegGetattr",proto="4"} 15
node_nfsd_requests_total{method="WrCache",proto="2"} 0
node_nfsd_requests_total{method="Write",proto="2"} 0
node_nfsd_requests_total{method="Write",proto="3"} 0
node_nfsd_requests_total{method="Write",proto="4"} 3
node_nfsd_requests_total{method="Write",proto="4"} 0
# HELP node_nfsd_rpc_errors_total Total number of NFSd RPC errors by error type.
# TYPE node_nfsd_rpc_errors_total counter
node_nfsd_rpc_errors_total{error="auth"} 2
@ -2758,6 +2832,26 @@ node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version=
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_pcidevice_current_link_transfers_per_second Value of current link's transfers per second (T/s)
# TYPE node_pcidevice_current_link_transfers_per_second gauge
node_pcidevice_current_link_transfers_per_second{bus="00",device="02",function="1",segment="0000"} 8e+09
node_pcidevice_current_link_transfers_per_second{bus="01",device="00",function="0",segment="0000"} 8e+09
# HELP node_pcidevice_current_link_width Value of current link's width (number of lanes)
# TYPE node_pcidevice_current_link_width gauge
node_pcidevice_current_link_width{bus="00",device="02",function="1",segment="0000"} 4
node_pcidevice_current_link_width{bus="01",device="00",function="0",segment="0000"} 4
# HELP node_pcidevice_info Non-numeric data from /sys/bus/pci/devices/<location>, value is always 1.
# TYPE node_pcidevice_info gauge
node_pcidevice_info{bus="00",class_id="0x060400",device="02",function="1",parent_bus="*",parent_device="*",parent_function="*",parent_segment="*",revision="0x00",segment="0000",subsystem_device_id="0x5095",subsystem_vendor_id="0x17aa",vendor_id="0x1634"} 1
node_pcidevice_info{bus="01",class_id="0x010802",device="00",function="0",parent_bus="00",parent_device="02",parent_function="1",parent_segment="0000",revision="0x01",segment="0000",subsystem_device_id="0x5021",subsystem_vendor_id="0xc0a9",vendor_id="0x540a"} 1
# HELP node_pcidevice_max_link_transfers_per_second Value of maximum link's transfers per second (T/s)
# TYPE node_pcidevice_max_link_transfers_per_second gauge
node_pcidevice_max_link_transfers_per_second{bus="00",device="02",function="1",segment="0000"} 8e+09
node_pcidevice_max_link_transfers_per_second{bus="01",device="00",function="0",segment="0000"} 1.6e+10
# HELP node_pcidevice_max_link_width Value of maximum link's width (number of lanes)
# TYPE node_pcidevice_max_link_width gauge
node_pcidevice_max_link_width{bus="00",device="02",function="1",segment="0000"} 8
node_pcidevice_max_link_width{bus="01",device="00",function="0",segment="0000"} 4
# HELP node_power_supply_capacity capacity value of /sys/class/power_supply/<power_supply>.
# TYPE node_power_supply_capacity gauge
node_power_supply_capacity{power_supply="BAT0"} 81
@ -2801,6 +2895,9 @@ node_pressure_io_stalled_seconds_total 159.229614
# HELP node_pressure_io_waiting_seconds_total Total time in seconds that processes have waited due to IO congestion
# TYPE node_pressure_io_waiting_seconds_total counter
node_pressure_io_waiting_seconds_total 159.886802
# HELP node_pressure_irq_stalled_seconds_total Total time in seconds no process could make progress due to IRQ congestion
# TYPE node_pressure_irq_stalled_seconds_total counter
node_pressure_irq_stalled_seconds_total 0.008494
# HELP node_pressure_memory_stalled_seconds_total Total time in seconds no process could make progress due to memory congestion
# TYPE node_pressure_memory_stalled_seconds_total counter
node_pressure_memory_stalled_seconds_total 0
@ -2887,6 +2984,7 @@ node_scrape_collector_success{collector="buddyinfo"} 1
node_scrape_collector_success{collector="cgroups"} 1
node_scrape_collector_success{collector="conntrack"} 1
node_scrape_collector_success{collector="cpu"} 1
node_scrape_collector_success{collector="cpu_vulnerabilities"} 1
node_scrape_collector_success{collector="cpufreq"} 1
node_scrape_collector_success{collector="diskstats"} 1
node_scrape_collector_success{collector="dmi"} 1
@ -2913,13 +3011,13 @@ node_scrape_collector_success{collector="nfs"} 1
node_scrape_collector_success{collector="nfsd"} 1
node_scrape_collector_success{collector="nvme"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="pcidevice"} 1
node_scrape_collector_success{collector="powersupplyclass"} 1
node_scrape_collector_success{collector="pressure"} 1
node_scrape_collector_success{collector="processes"} 1
node_scrape_collector_success{collector="qdisc"} 1
node_scrape_collector_success{collector="rapl"} 1
node_scrape_collector_success{collector="schedstat"} 1
node_scrape_collector_success{collector="selinux"} 1
node_scrape_collector_success{collector="slabinfo"} 1
node_scrape_collector_success{collector="sockstat"} 1
node_scrape_collector_success{collector="softirqs"} 1
@ -2932,13 +3030,12 @@ node_scrape_collector_success{collector="thermal_zone"} 1
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="udp_queues"} 1
node_scrape_collector_success{collector="vmstat"} 1
node_scrape_collector_success{collector="watchdog"} 1
node_scrape_collector_success{collector="wifi"} 1
node_scrape_collector_success{collector="xfrm"} 1
node_scrape_collector_success{collector="xfs"} 1
node_scrape_collector_success{collector="zfs"} 1
node_scrape_collector_success{collector="zoneinfo"} 1
# HELP node_selinux_enabled SELinux is enabled, 1 is true, 0 is false
# TYPE node_selinux_enabled gauge
node_selinux_enabled 0
# HELP node_slabinfo_active_objects The number of objects that are currently active (i.e., in use).
# TYPE node_slabinfo_active_objects gauge
node_slabinfo_active_objects{slab="dmaengine-unmap-128"} 1206
@ -3207,6 +3304,31 @@ node_vmstat_pswpin 1476
# HELP node_vmstat_pswpout /proc/vmstat information field pswpout.
# TYPE node_vmstat_pswpout untyped
node_vmstat_pswpout 35045
# HELP node_watchdog_access_cs0 Value of /sys/class/watchdog/<watchdog>/access_cs0
# TYPE node_watchdog_access_cs0 gauge
node_watchdog_access_cs0{name="watchdog0"} 0
# HELP node_watchdog_bootstatus Value of /sys/class/watchdog/<watchdog>/bootstatus
# TYPE node_watchdog_bootstatus gauge
node_watchdog_bootstatus{name="watchdog0"} 1
# HELP node_watchdog_fw_version Value of /sys/class/watchdog/<watchdog>/fw_version
# TYPE node_watchdog_fw_version gauge
node_watchdog_fw_version{name="watchdog0"} 2
# HELP node_watchdog_info Info of /sys/class/watchdog/<watchdog>
# TYPE node_watchdog_info gauge
node_watchdog_info{identity="",name="watchdog1",options="",pretimeout_governor="",state="",status=""} 1
node_watchdog_info{identity="Software Watchdog",name="watchdog0",options="0x8380",pretimeout_governor="noop",state="active",status="0x8000"} 1
# HELP node_watchdog_nowayout Value of /sys/class/watchdog/<watchdog>/nowayout
# TYPE node_watchdog_nowayout gauge
node_watchdog_nowayout{name="watchdog0"} 0
# HELP node_watchdog_pretimeout_seconds Value of /sys/class/watchdog/<watchdog>/pretimeout
# TYPE node_watchdog_pretimeout_seconds gauge
node_watchdog_pretimeout_seconds{name="watchdog0"} 120
# HELP node_watchdog_timeleft_seconds Value of /sys/class/watchdog/<watchdog>/timeleft
# TYPE node_watchdog_timeleft_seconds gauge
node_watchdog_timeleft_seconds{name="watchdog0"} 300
# HELP node_watchdog_timeout_seconds Value of /sys/class/watchdog/<watchdog>/timeout
# TYPE node_watchdog_timeout_seconds gauge
node_watchdog_timeout_seconds{name="watchdog0"} 60
# HELP node_wifi_interface_frequency_hertz The current frequency a WiFi interface is operating at, in hertz.
# TYPE node_wifi_interface_frequency_hertz gauge
node_wifi_interface_frequency_hertz{device="wlan0"} 2.412e+09
@ -3254,6 +3376,90 @@ node_wifi_station_transmit_failed_total{device="wlan0",mac_address="aa:bb:cc:dd:
# TYPE node_wifi_station_transmit_retries_total counter
node_wifi_station_transmit_retries_total{device="wlan0",mac_address="01:02:03:04:05:06"} 20
node_wifi_station_transmit_retries_total{device="wlan0",mac_address="aa:bb:cc:dd:ee:ff"} 10
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP node_xfs_allocation_btree_compares_total Number of allocation B-tree compares for a filesystem.
# TYPE node_xfs_allocation_btree_compares_total counter
node_xfs_allocation_btree_compares_total{device="sda1"} 0
@ -3620,6 +3826,9 @@ node_zfs_arc_l2_writes_lock_retry 0
# HELP node_zfs_arc_l2_writes_sent kstat.zfs.misc.arcstats.l2_writes_sent
# TYPE node_zfs_arc_l2_writes_sent untyped
node_zfs_arc_l2_writes_sent 0
# HELP node_zfs_arc_memory_available_bytes kstat.zfs.misc.arcstats.memory_available_bytes
# TYPE node_zfs_arc_memory_available_bytes untyped
node_zfs_arc_memory_available_bytes -9.223372036854776e+17
# HELP node_zfs_arc_memory_direct_count kstat.zfs.misc.arcstats.memory_direct_count
# TYPE node_zfs_arc_memory_direct_count untyped
node_zfs_arc_memory_direct_count 542
@ -4149,108 +4358,139 @@ node_zfs_zil_zil_itx_needcopy_count 0
# TYPE node_zfs_zpool_dataset_nread untyped
node_zfs_zpool_dataset_nread{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nread{dataset="pool1/dataset1",zpool="pool1"} 28
node_zfs_zpool_dataset_nread{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nread{dataset="pool3/dataset with space",zpool="pool3"} 28
node_zfs_zpool_dataset_nread{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nread{dataset="poolz1/dataset1",zpool="poolz1"} 28
# HELP node_zfs_zpool_dataset_nunlinked kstat.zfs.misc.objset.nunlinked
# TYPE node_zfs_zpool_dataset_nunlinked untyped
node_zfs_zpool_dataset_nunlinked{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nunlinked{dataset="pool1/dataset1",zpool="pool1"} 3
node_zfs_zpool_dataset_nunlinked{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nunlinked{dataset="pool3/dataset with space",zpool="pool3"} 3
node_zfs_zpool_dataset_nunlinked{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nunlinked{dataset="poolz1/dataset1",zpool="poolz1"} 14
# HELP node_zfs_zpool_dataset_nunlinks kstat.zfs.misc.objset.nunlinks
# TYPE node_zfs_zpool_dataset_nunlinks untyped
node_zfs_zpool_dataset_nunlinks{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nunlinks{dataset="pool1/dataset1",zpool="pool1"} 3
node_zfs_zpool_dataset_nunlinks{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nunlinks{dataset="pool3/dataset with space",zpool="pool3"} 3
node_zfs_zpool_dataset_nunlinks{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nunlinks{dataset="poolz1/dataset1",zpool="poolz1"} 14
# HELP node_zfs_zpool_dataset_nwritten kstat.zfs.misc.objset.nwritten
# TYPE node_zfs_zpool_dataset_nwritten untyped
node_zfs_zpool_dataset_nwritten{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nwritten{dataset="pool1/dataset1",zpool="pool1"} 12302
node_zfs_zpool_dataset_nwritten{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nwritten{dataset="pool3/dataset with space",zpool="pool3"} 12302
node_zfs_zpool_dataset_nwritten{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nwritten{dataset="poolz1/dataset1",zpool="poolz1"} 32806
# HELP node_zfs_zpool_dataset_reads kstat.zfs.misc.objset.reads
# TYPE node_zfs_zpool_dataset_reads untyped
node_zfs_zpool_dataset_reads{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_reads{dataset="pool1/dataset1",zpool="pool1"} 2
node_zfs_zpool_dataset_reads{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_reads{dataset="pool3/dataset with space",zpool="pool3"} 2
node_zfs_zpool_dataset_reads{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_reads{dataset="poolz1/dataset1",zpool="poolz1"} 2
# HELP node_zfs_zpool_dataset_writes kstat.zfs.misc.objset.writes
# TYPE node_zfs_zpool_dataset_writes untyped
node_zfs_zpool_dataset_writes{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_writes{dataset="pool1/dataset1",zpool="pool1"} 4
node_zfs_zpool_dataset_writes{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_writes{dataset="pool3/dataset with space",zpool="pool3"} 4
node_zfs_zpool_dataset_writes{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_writes{dataset="poolz1/dataset1",zpool="poolz1"} 10
# HELP node_zfs_zpool_nread kstat.zfs.misc.io.nread
# TYPE node_zfs_zpool_nread untyped
node_zfs_zpool_nread{zpool="pool1"} 1.88416e+06
node_zfs_zpool_nread{zpool="pool3"} 1.88416e+06
node_zfs_zpool_nread{zpool="poolz1"} 2.82624e+06
# HELP node_zfs_zpool_nwritten kstat.zfs.misc.io.nwritten
# TYPE node_zfs_zpool_nwritten untyped
node_zfs_zpool_nwritten{zpool="pool1"} 3.206144e+06
node_zfs_zpool_nwritten{zpool="pool3"} 3.206144e+06
node_zfs_zpool_nwritten{zpool="poolz1"} 2.680501248e+09
# HELP node_zfs_zpool_rcnt kstat.zfs.misc.io.rcnt
# TYPE node_zfs_zpool_rcnt untyped
node_zfs_zpool_rcnt{zpool="pool1"} 0
node_zfs_zpool_rcnt{zpool="pool3"} 0
node_zfs_zpool_rcnt{zpool="poolz1"} 0
# HELP node_zfs_zpool_reads kstat.zfs.misc.io.reads
# TYPE node_zfs_zpool_reads untyped
node_zfs_zpool_reads{zpool="pool1"} 22
node_zfs_zpool_reads{zpool="pool3"} 22
node_zfs_zpool_reads{zpool="poolz1"} 33
# HELP node_zfs_zpool_rlentime kstat.zfs.misc.io.rlentime
# TYPE node_zfs_zpool_rlentime untyped
node_zfs_zpool_rlentime{zpool="pool1"} 1.04112268e+08
node_zfs_zpool_rlentime{zpool="pool3"} 1.04112268e+08
node_zfs_zpool_rlentime{zpool="poolz1"} 6.472105124093e+12
# HELP node_zfs_zpool_rtime kstat.zfs.misc.io.rtime
# TYPE node_zfs_zpool_rtime untyped
node_zfs_zpool_rtime{zpool="pool1"} 2.4168078e+07
node_zfs_zpool_rtime{zpool="pool3"} 2.4168078e+07
node_zfs_zpool_rtime{zpool="poolz1"} 9.82909164e+09
# HELP node_zfs_zpool_rupdate kstat.zfs.misc.io.rupdate
# TYPE node_zfs_zpool_rupdate untyped
node_zfs_zpool_rupdate{zpool="pool1"} 7.921048984922e+13
node_zfs_zpool_rupdate{zpool="pool3"} 7.921048984922e+13
node_zfs_zpool_rupdate{zpool="poolz1"} 1.10734831944501e+14
# HELP node_zfs_zpool_state kstat.zfs.misc.state
# TYPE node_zfs_zpool_state gauge
node_zfs_zpool_state{state="degraded",zpool="pool1"} 0
node_zfs_zpool_state{state="degraded",zpool="pool2"} 0
node_zfs_zpool_state{state="degraded",zpool="pool3"} 0
node_zfs_zpool_state{state="degraded",zpool="poolz1"} 1
node_zfs_zpool_state{state="faulted",zpool="pool1"} 0
node_zfs_zpool_state{state="faulted",zpool="pool2"} 0
node_zfs_zpool_state{state="faulted",zpool="pool3"} 0
node_zfs_zpool_state{state="faulted",zpool="poolz1"} 0
node_zfs_zpool_state{state="offline",zpool="pool1"} 0
node_zfs_zpool_state{state="offline",zpool="pool2"} 0
node_zfs_zpool_state{state="offline",zpool="pool3"} 0
node_zfs_zpool_state{state="offline",zpool="poolz1"} 0
node_zfs_zpool_state{state="online",zpool="pool1"} 1
node_zfs_zpool_state{state="online",zpool="pool2"} 0
node_zfs_zpool_state{state="online",zpool="pool3"} 1
node_zfs_zpool_state{state="online",zpool="poolz1"} 0
node_zfs_zpool_state{state="removed",zpool="pool1"} 0
node_zfs_zpool_state{state="removed",zpool="pool2"} 0
node_zfs_zpool_state{state="removed",zpool="pool3"} 0
node_zfs_zpool_state{state="removed",zpool="poolz1"} 0
node_zfs_zpool_state{state="suspended",zpool="pool1"} 0
node_zfs_zpool_state{state="suspended",zpool="pool2"} 1
node_zfs_zpool_state{state="suspended",zpool="pool3"} 0
node_zfs_zpool_state{state="suspended",zpool="poolz1"} 0
node_zfs_zpool_state{state="unavail",zpool="pool1"} 0
node_zfs_zpool_state{state="unavail",zpool="pool2"} 0
node_zfs_zpool_state{state="unavail",zpool="pool3"} 0
node_zfs_zpool_state{state="unavail",zpool="poolz1"} 0
# HELP node_zfs_zpool_wcnt kstat.zfs.misc.io.wcnt
# TYPE node_zfs_zpool_wcnt untyped
node_zfs_zpool_wcnt{zpool="pool1"} 0
node_zfs_zpool_wcnt{zpool="pool3"} 0
node_zfs_zpool_wcnt{zpool="poolz1"} 0
# HELP node_zfs_zpool_wlentime kstat.zfs.misc.io.wlentime
# TYPE node_zfs_zpool_wlentime untyped
node_zfs_zpool_wlentime{zpool="pool1"} 1.04112268e+08
node_zfs_zpool_wlentime{zpool="pool3"} 1.04112268e+08
node_zfs_zpool_wlentime{zpool="poolz1"} 6.472105124093e+12
# HELP node_zfs_zpool_writes kstat.zfs.misc.io.writes
# TYPE node_zfs_zpool_writes untyped
node_zfs_zpool_writes{zpool="pool1"} 132
node_zfs_zpool_writes{zpool="pool3"} 132
node_zfs_zpool_writes{zpool="poolz1"} 25294
# HELP node_zfs_zpool_wtime kstat.zfs.misc.io.wtime
# TYPE node_zfs_zpool_wtime untyped
node_zfs_zpool_wtime{zpool="pool1"} 7.155162e+06
node_zfs_zpool_wtime{zpool="pool3"} 7.155162e+06
node_zfs_zpool_wtime{zpool="poolz1"} 9.673715628e+09
# HELP node_zfs_zpool_wupdate kstat.zfs.misc.io.wupdate
# TYPE node_zfs_zpool_wupdate untyped
node_zfs_zpool_wupdate{zpool="pool1"} 7.9210489694949e+13
node_zfs_zpool_wupdate{zpool="pool3"} 7.9210489694949e+13
node_zfs_zpool_wupdate{zpool="poolz1"} 1.10734831833266e+14
# HELP node_zoneinfo_high_pages Zone watermark pages_high
# TYPE node_zoneinfo_high_pages gauge
@ -4427,6 +4667,10 @@ node_zoneinfo_spanned_pages{node="0",zone="Normal"} 7.806976e+06
# TYPE process_cpu_seconds_total counter
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
# HELP process_network_receive_bytes_total Number of bytes received by the process over the network.
# TYPE process_network_receive_bytes_total counter
# HELP process_network_transmit_bytes_total Number of bytes sent by the process over the network.
# TYPE process_network_transmit_bytes_total counter
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
# HELP process_resident_memory_bytes Resident memory size in bytes.

View file

@ -0,0 +1,291 @@
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_buddyinfo_blocks Count of free blocks according to size.
# TYPE node_buddyinfo_blocks gauge
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0
# HELP node_disk_read_errors_total The total number of read errors.
# TYPE node_disk_read_errors_total counter
node_disk_read_errors_total{device="disk0"} 0
# HELP node_disk_read_retries_total The total number of read retries.
# TYPE node_disk_read_retries_total counter
node_disk_read_retries_total{device="disk0"} 0
# HELP node_disk_write_errors_total The total number of write errors.
# TYPE node_disk_write_errors_total counter
node_disk_write_errors_total{device="disk0"} 0
# HELP node_disk_write_retries_total The total number of write retries.
# TYPE node_disk_write_retries_total counter
node_disk_write_retries_total{device="disk0"} 0
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_memory_swap_total_bytes Memory information field swap_total_bytes.
# TYPE node_memory_swap_total_bytes gauge
node_memory_swap_total_bytes 0
# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes.
# TYPE node_memory_swap_used_bytes gauge
node_memory_swap_used_bytes 0
# HELP node_memory_total_bytes Memory information field total_bytes.
# TYPE node_memory_total_bytes gauge
node_memory_total_bytes 7.516192768e+09
# HELP node_network_noproto_total Network device statistic noproto.
# TYPE node_network_noproto_total counter
node_network_noproto_total{device="lo0"} 0
# HELP node_network_receive_drop_total Network device statistic receive_drop.
# TYPE node_network_receive_drop_total counter
node_network_receive_drop_total{device="lo0"} 0
# HELP node_network_receive_errs_total Network device statistic receive_errs.
# TYPE node_network_receive_errs_total counter
node_network_receive_errs_total{device="lo0"} 0
# HELP node_network_receive_packets_total Network device statistic receive_packets.
# TYPE node_network_receive_packets_total counter
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.
# TYPE node_network_transmit_bytes_total counter
# HELP node_network_transmit_colls_total Network device statistic transmit_colls.
# TYPE node_network_transmit_colls_total counter
node_network_transmit_colls_total{device="lo0"} 0
# HELP node_network_transmit_errs_total Network device statistic transmit_errs.
# TYPE node_network_transmit_errs_total counter
node_network_transmit_errs_total{device="lo0"} 0
# HELP node_network_transmit_packets_total Network device statistic transmit_packets.
# TYPE node_network_transmit_packets_total counter
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.
# TYPE node_os_info gauge
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
# TYPE node_scrape_collector_duration_seconds gauge
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
# TYPE node_scrape_collector_success gauge
node_scrape_collector_success{collector="boottime"} 1
node_scrape_collector_success{collector="buddyinfo"} 1
node_scrape_collector_success{collector="cpu"} 1
node_scrape_collector_success{collector="diskstats"} 1
node_scrape_collector_success{collector="loadavg"} 1
node_scrape_collector_success{collector="meminfo"} 1
node_scrape_collector_success{collector="netdev"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="powersupplyclass"} 1
node_scrape_collector_success{collector="textfile"} 1
node_scrape_collector_success{collector="thermal"} 0
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="xfrm"} 1
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
# TYPE node_textfile_mtime_seconds gauge
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
# TYPE node_textfile_scrape_error gauge
node_textfile_scrape_error 0
# HELP node_time_seconds System time in seconds since epoch (1970).
# TYPE node_time_seconds gauge
# HELP node_time_zone_offset_seconds System time zone offset in seconds.
# TYPE node_time_zone_offset_seconds gauge
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_1 untyped
testmetric1_1{foo="bar"} 10
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_2 untyped
testmetric1_2{foo="baz"} 20
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_1 untyped
testmetric2_1{foo="bar"} 30
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_2 untyped
testmetric2_2{foo="baz"} 40

View file

@ -0,0 +1,251 @@
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_buddyinfo_blocks Count of free blocks according to size.
# TYPE node_buddyinfo_blocks gauge
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_network_receive_drop_total Network device statistic receive_drop.
# TYPE node_network_receive_drop_total counter
node_network_receive_drop_total{device="lo0"} 0
# HELP node_network_receive_errs_total Network device statistic receive_errs.
# TYPE node_network_receive_errs_total counter
node_network_receive_errs_total{device="lo0"} 0
# HELP node_network_receive_packets_total Network device statistic receive_packets.
# TYPE node_network_receive_packets_total counter
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.
# TYPE node_network_transmit_bytes_total counter
# HELP node_network_transmit_drop_total Network device statistic transmit_drop.
# TYPE node_network_transmit_drop_total counter
node_network_transmit_drop_total{device="lo0"} 0
# HELP node_network_transmit_errs_total Network device statistic transmit_errs.
# TYPE node_network_transmit_errs_total counter
node_network_transmit_errs_total{device="lo0"} 0
# HELP node_network_transmit_packets_total Network device statistic transmit_packets.
# TYPE node_network_transmit_packets_total counter
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.
# TYPE node_os_info gauge
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
# TYPE node_scrape_collector_duration_seconds gauge
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
# TYPE node_scrape_collector_success gauge
node_scrape_collector_success{collector="boottime"} 1
node_scrape_collector_success{collector="buddyinfo"} 1
node_scrape_collector_success{collector="cpu"} 1
node_scrape_collector_success{collector="exec"} 1
node_scrape_collector_success{collector="loadavg"} 1
node_scrape_collector_success{collector="meminfo"} 0
node_scrape_collector_success{collector="netdev"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="textfile"} 1
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="xfrm"} 1
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
# TYPE node_textfile_mtime_seconds gauge
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
# TYPE node_textfile_scrape_error gauge
node_textfile_scrape_error 0
# HELP node_time_seconds System time in seconds since epoch (1970).
# TYPE node_time_seconds gauge
# HELP node_time_zone_offset_seconds System time zone offset in seconds.
# TYPE node_time_zone_offset_seconds gauge
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_1 untyped
testmetric1_1{foo="bar"} 10
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_2 untyped
testmetric1_2{foo="baz"} 20
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_1 untyped
testmetric2_1{foo="bar"} 30
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_2 untyped
testmetric2_2{foo="baz"} 40

View file

@ -0,0 +1,287 @@
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_buddyinfo_blocks Count of free blocks according to size.
# TYPE node_buddyinfo_blocks gauge
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_memory_swap_in_bytes_total Bytes paged in from swap devices
# TYPE node_memory_swap_in_bytes_total counter
node_memory_swap_in_bytes_total 0
# HELP node_memory_swap_out_bytes_total Bytes paged out to swap devices
# TYPE node_memory_swap_out_bytes_total counter
node_memory_swap_out_bytes_total 0
# HELP node_memory_swap_size_bytes Total swap memory size
# TYPE node_memory_swap_size_bytes gauge
node_memory_swap_size_bytes 1.073741824e+09
# HELP node_memory_swap_used_bytes Currently allocated swap
# TYPE node_memory_swap_used_bytes gauge
node_memory_swap_used_bytes 0
# HELP node_memory_user_wired_bytes Locked in memory by user, mlock, etc
# TYPE node_memory_user_wired_bytes gauge
node_memory_user_wired_bytes 0
# HELP node_netisr_bindthreads netisr threads bound to CPUs
# TYPE node_netisr_bindthreads gauge
node_netisr_bindthreads 0
# HELP node_netisr_defaultqlimit netisr default queue limit
# TYPE node_netisr_defaultqlimit gauge
node_netisr_defaultqlimit 256
# HELP node_netisr_maxprot netisr maximum protocols
# TYPE node_netisr_maxprot gauge
node_netisr_maxprot 16
# HELP node_netisr_maxqlimit netisr maximum queue limit
# TYPE node_netisr_maxqlimit gauge
node_netisr_maxqlimit 10240
# HELP node_netisr_maxthreads netisr maximum thread count
# TYPE node_netisr_maxthreads gauge
node_netisr_maxthreads 1
# HELP node_netisr_numthreads netisr current thread count
# TYPE node_netisr_numthreads gauge
node_netisr_numthreads 1
# HELP node_network_receive_drop_total Network device statistic receive_drop.
# TYPE node_network_receive_drop_total counter
node_network_receive_drop_total{device="lo0"} 0
# HELP node_network_receive_errs_total Network device statistic receive_errs.
# TYPE node_network_receive_errs_total counter
node_network_receive_errs_total{device="lo0"} 0
# HELP node_network_receive_packets_total Network device statistic receive_packets.
# TYPE node_network_receive_packets_total counter
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.
# TYPE node_network_transmit_bytes_total counter
# HELP node_network_transmit_drop_total Network device statistic transmit_drop.
# TYPE node_network_transmit_drop_total counter
node_network_transmit_drop_total{device="lo0"} 0
# HELP node_network_transmit_errs_total Network device statistic transmit_errs.
# TYPE node_network_transmit_errs_total counter
node_network_transmit_errs_total{device="lo0"} 0
# HELP node_network_transmit_packets_total Network device statistic transmit_packets.
# TYPE node_network_transmit_packets_total counter
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.
# TYPE node_os_info gauge
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
# TYPE node_scrape_collector_duration_seconds gauge
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
# TYPE node_scrape_collector_success gauge
node_scrape_collector_success{collector="boottime"} 1
node_scrape_collector_success{collector="buddyinfo"} 1
node_scrape_collector_success{collector="cpu"} 1
node_scrape_collector_success{collector="exec"} 1
node_scrape_collector_success{collector="loadavg"} 1
node_scrape_collector_success{collector="meminfo"} 1
node_scrape_collector_success{collector="netdev"} 1
node_scrape_collector_success{collector="netisr"} 1
node_scrape_collector_success{collector="netstat"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="textfile"} 1
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="xfrm"} 1
node_scrape_collector_success{collector="zfs"} 1
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
# TYPE node_textfile_mtime_seconds gauge
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
# TYPE node_textfile_scrape_error gauge
node_textfile_scrape_error 0
# HELP node_time_seconds System time in seconds since epoch (1970).
# TYPE node_time_seconds gauge
# HELP node_time_zone_offset_seconds System time zone offset in seconds.
# TYPE node_time_zone_offset_seconds gauge
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_1 untyped
testmetric1_1{foo="bar"} 10
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_2 untyped
testmetric1_2{foo="baz"} 20
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_1 untyped
testmetric2_1{foo="bar"} 30
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_2 untyped
testmetric2_2{foo="baz"} 40

View file

@ -0,0 +1,209 @@
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_memory_swap_size_bytes Memory information field swap_size_bytes.
# TYPE node_memory_swap_size_bytes gauge
node_memory_swap_size_bytes 6.442426368e+09
# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes.
# TYPE node_memory_swap_used_bytes gauge
node_memory_swap_used_bytes 0
# HELP node_memory_swapped_in_pages_bytes_total Memory information field swapped_in_pages_bytes_total.
# TYPE node_memory_swapped_in_pages_bytes_total counter
node_memory_swapped_in_pages_bytes_total 0
# HELP node_memory_swapped_out_pages_bytes_total Memory information field swapped_out_pages_bytes_total.
# TYPE node_memory_swapped_out_pages_bytes_total counter
node_memory_swapped_out_pages_bytes_total 0
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.
# TYPE node_os_info gauge
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
# TYPE node_scrape_collector_duration_seconds gauge
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
# TYPE node_scrape_collector_success gauge
node_scrape_collector_success{collector="boottime"} 1
node_scrape_collector_success{collector="cpu"} 0
node_scrape_collector_success{collector="loadavg"} 1
node_scrape_collector_success{collector="meminfo"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="textfile"} 1
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="xfrm"} 1
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
# TYPE node_textfile_mtime_seconds gauge
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
# TYPE node_textfile_scrape_error gauge
node_textfile_scrape_error 0
# HELP node_time_seconds System time in seconds since epoch (1970).
# TYPE node_time_seconds gauge
# HELP node_time_zone_offset_seconds System time zone offset in seconds.
# TYPE node_time_zone_offset_seconds gauge
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_1 untyped
testmetric1_1{foo="bar"} 10
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_2 untyped
testmetric1_2{foo="baz"} 20
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_1 untyped
testmetric2_1{foo="bar"} 30
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_2 untyped
testmetric2_2{foo="baz"} 40

View file

@ -0,0 +1,276 @@
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_buddyinfo_blocks Count of free blocks according to size.
# TYPE node_buddyinfo_blocks gauge
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_memory_swap_size_bytes Memory information field swap_size_bytes.
# TYPE node_memory_swap_size_bytes gauge
node_memory_swap_size_bytes 6.693941248e+09
# HELP node_memory_swap_used_bytes Memory information field swap_used_bytes.
# TYPE node_memory_swap_used_bytes gauge
node_memory_swap_used_bytes 0
# HELP node_memory_swapped_in_pages_bytes_total Memory information field swapped_in_pages_bytes_total.
# TYPE node_memory_swapped_in_pages_bytes_total counter
node_memory_swapped_in_pages_bytes_total 0
# HELP node_memory_swapped_out_pages_bytes_total Memory information field swapped_out_pages_bytes_total.
# TYPE node_memory_swapped_out_pages_bytes_total counter
node_memory_swapped_out_pages_bytes_total 0
# HELP node_network_noproto_total Network device statistic noproto.
# TYPE node_network_noproto_total counter
node_network_noproto_total{device="lo0"} 0
node_network_noproto_total{device="pflog0"} 0
# HELP node_network_receive_drop_total Network device statistic receive_drop.
# TYPE node_network_receive_drop_total counter
node_network_receive_drop_total{device="lo0"} 0
node_network_receive_drop_total{device="pflog0"} 0
# HELP node_network_receive_errs_total Network device statistic receive_errs.
# TYPE node_network_receive_errs_total counter
node_network_receive_errs_total{device="lo0"} 0
node_network_receive_errs_total{device="pflog0"} 0
# HELP node_network_receive_packets_total Network device statistic receive_packets.
# TYPE node_network_receive_packets_total counter
# HELP node_network_transmit_bytes_total Network device statistic transmit_bytes.
# TYPE node_network_transmit_bytes_total counter
# HELP node_network_transmit_colls_total Network device statistic transmit_colls.
# TYPE node_network_transmit_colls_total counter
node_network_transmit_colls_total{device="lo0"} 0
node_network_transmit_colls_total{device="pflog0"} 0
# HELP node_network_transmit_drop_total Network device statistic transmit_drop.
# TYPE node_network_transmit_drop_total counter
node_network_transmit_drop_total{device="lo0"} 0
node_network_transmit_drop_total{device="pflog0"} 0
# HELP node_network_transmit_errs_total Network device statistic transmit_errs.
# TYPE node_network_transmit_errs_total counter
node_network_transmit_errs_total{device="lo0"} 0
node_network_transmit_errs_total{device="pflog0"} 0
# HELP node_network_transmit_packets_total Network device statistic transmit_packets.
# TYPE node_network_transmit_packets_total counter
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.
# TYPE node_os_info gauge
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
# TYPE node_scrape_collector_duration_seconds gauge
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
# TYPE node_scrape_collector_success gauge
node_scrape_collector_success{collector="boottime"} 1
node_scrape_collector_success{collector="buddyinfo"} 1
node_scrape_collector_success{collector="cpu"} 1
node_scrape_collector_success{collector="diskstats"} 1
node_scrape_collector_success{collector="interrupts"} 1
node_scrape_collector_success{collector="loadavg"} 1
node_scrape_collector_success{collector="meminfo"} 1
node_scrape_collector_success{collector="netdev"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="textfile"} 1
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="xfrm"} 1
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
# TYPE node_textfile_mtime_seconds gauge
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
# TYPE node_textfile_scrape_error gauge
node_textfile_scrape_error 0
# HELP node_time_seconds System time in seconds since epoch (1970).
# TYPE node_time_seconds gauge
# HELP node_time_zone_offset_seconds System time zone offset in seconds.
# TYPE node_time_zone_offset_seconds gauge
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_1 untyped
testmetric1_1{foo="bar"} 10
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_2 untyped
testmetric1_2{foo="baz"} 20
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_1 untyped
testmetric2_1{foo="bar"} 30
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_2 untyped
testmetric2_2{foo="baz"} 40

View file

@ -0,0 +1,234 @@
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_buddyinfo_blocks Count of free blocks according to size.
# TYPE node_buddyinfo_blocks gauge
node_buddyinfo_blocks{node="0",size="0",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="0",zone="DMA32"} 759
node_buddyinfo_blocks{node="0",size="0",zone="Normal"} 4381
node_buddyinfo_blocks{node="0",size="1",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="1",zone="DMA32"} 572
node_buddyinfo_blocks{node="0",size="1",zone="Normal"} 1093
node_buddyinfo_blocks{node="0",size="10",zone="DMA"} 3
node_buddyinfo_blocks{node="0",size="10",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="10",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="2",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="2",zone="DMA32"} 791
node_buddyinfo_blocks{node="0",size="2",zone="Normal"} 185
node_buddyinfo_blocks{node="0",size="3",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="3",zone="DMA32"} 475
node_buddyinfo_blocks{node="0",size="3",zone="Normal"} 1530
node_buddyinfo_blocks{node="0",size="4",zone="DMA"} 2
node_buddyinfo_blocks{node="0",size="4",zone="DMA32"} 194
node_buddyinfo_blocks{node="0",size="4",zone="Normal"} 567
node_buddyinfo_blocks{node="0",size="5",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="5",zone="DMA32"} 45
node_buddyinfo_blocks{node="0",size="5",zone="Normal"} 102
node_buddyinfo_blocks{node="0",size="6",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="6",zone="DMA32"} 12
node_buddyinfo_blocks{node="0",size="6",zone="Normal"} 4
node_buddyinfo_blocks{node="0",size="7",zone="DMA"} 0
node_buddyinfo_blocks{node="0",size="7",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="7",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="8",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="8",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="8",zone="Normal"} 0
node_buddyinfo_blocks{node="0",size="9",zone="DMA"} 1
node_buddyinfo_blocks{node="0",size="9",zone="DMA32"} 0
node_buddyinfo_blocks{node="0",size="9",zone="Normal"} 0
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_os_info A metric with a constant '1' value labeled by build_id, id, id_like, image_id, image_version, name, pretty_name, variant, variant_id, version, version_codename, version_id.
# TYPE node_os_info gauge
node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version="",name="Ubuntu",pretty_name="Ubuntu 20.04.2 LTS",variant="",variant_id="",version="20.04.2 LTS (Focal Fossa)",version_codename="focal",version_id="20.04"} 1
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_scrape_collector_duration_seconds node_exporter: Duration of a collector scrape.
# TYPE node_scrape_collector_duration_seconds gauge
# HELP node_scrape_collector_success node_exporter: Whether a collector succeeded.
# TYPE node_scrape_collector_success gauge
node_scrape_collector_success{collector="boottime"} 1
node_scrape_collector_success{collector="buddyinfo"} 1
node_scrape_collector_success{collector="cpu"} 0
node_scrape_collector_success{collector="cpufreq"} 1
node_scrape_collector_success{collector="loadavg"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="textfile"} 1
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="xfrm"} 1
node_scrape_collector_success{collector="zfs"} 0
# HELP node_textfile_mtime_seconds Unixtime mtime of textfiles successfully read.
# TYPE node_textfile_mtime_seconds gauge
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
# TYPE node_textfile_scrape_error gauge
node_textfile_scrape_error 0
# HELP node_time_seconds System time in seconds since epoch (1970).
# TYPE node_time_seconds gauge
# HELP node_time_zone_offset_seconds System time zone offset in seconds.
# TYPE node_time_zone_offset_seconds gauge
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP testmetric1_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_1 untyped
testmetric1_1{foo="bar"} 10
# HELP testmetric1_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics1.prom
# TYPE testmetric1_2 untyped
testmetric1_2{foo="baz"} 20
# HELP testmetric2_1 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_1 untyped
testmetric2_1{foo="bar"} 30
# HELP testmetric2_2 Metric read from collector/fixtures/textfile/two_metric_files/metrics2.prom
# TYPE testmetric2_2 untyped
testmetric2_2{foo="baz"} 40

View file

@ -1,55 +1,59 @@
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# HELP go_gc_duration_seconds A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.
# TYPE go_gc_duration_seconds summary
# HELP go_gc_gogc_percent Heap size target percentage configured by the user, otherwise 100. This value is set by the GOGC environment variable, and the runtime/debug.SetGCPercent function. Sourced from /gc/gogc:percent.
# TYPE go_gc_gogc_percent gauge
# HELP go_gc_gomemlimit_bytes Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable, and the runtime/debug.SetMemoryLimit function. Sourced from /gc/gomemlimit:bytes.
# TYPE go_gc_gomemlimit_bytes gauge
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# HELP go_memstats_alloc_bytes Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_alloc_bytes gauge
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.
# TYPE go_memstats_alloc_bytes_total counter
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.
# TYPE go_memstats_buck_hash_sys_bytes gauge
# HELP go_memstats_frees_total Total number of frees.
# HELP go_memstats_frees_total Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_frees_total counter
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.
# TYPE go_memstats_gc_sys_bytes gauge
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.
# TYPE go_memstats_heap_alloc_bytes gauge
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_idle_bytes gauge
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes
# TYPE go_memstats_heap_inuse_bytes gauge
# HELP go_memstats_heap_objects Number of allocated objects.
# HELP go_memstats_heap_objects Number of currently allocated objects. Equals to /gc/heap/objects:objects.
# TYPE go_memstats_heap_objects gauge
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.
# TYPE go_memstats_heap_released_bytes gauge
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.
# TYPE go_memstats_heap_sys_bytes gauge
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
# HELP go_memstats_mallocs_total Total number of mallocs.
# HELP go_memstats_mallocs_total Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.
# TYPE go_memstats_mallocs_total counter
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.
# TYPE go_memstats_mcache_inuse_bytes gauge
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.
# TYPE go_memstats_mcache_sys_bytes gauge
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.
# TYPE go_memstats_mspan_inuse_bytes gauge
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.
# TYPE go_memstats_mspan_sys_bytes gauge
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.
# TYPE go_memstats_next_gc_bytes gauge
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.
# TYPE go_memstats_other_sys_bytes gauge
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# HELP go_memstats_stack_inuse_bytes Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.
# TYPE go_memstats_stack_inuse_bytes gauge
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.
# TYPE go_memstats_stack_sys_bytes gauge
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# HELP go_memstats_sys_bytes Number of bytes obtained from system. Equals to /memory/classes/total:byte.
# TYPE go_memstats_sys_bytes gauge
# HELP go_sched_gomaxprocs_threads The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously. Sourced from /sched/gomaxprocs:threads.
# TYPE go_sched_gomaxprocs_threads gauge
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
# HELP node_arp_entries ARP entries by device
@ -161,6 +165,14 @@ node_btrfs_allocation_ratio{block_group_type="metadata",mode="raid1",uuid="0abb2
node_btrfs_allocation_ratio{block_group_type="metadata",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 2
node_btrfs_allocation_ratio{block_group_type="system",mode="raid1",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 2
node_btrfs_allocation_ratio{block_group_type="system",mode="raid6",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 2
# HELP node_btrfs_commit_seconds_total Sum of the duration of all commits, in seconds.
# TYPE node_btrfs_commit_seconds_total counter
node_btrfs_commit_seconds_total{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 47836.09
node_btrfs_commit_seconds_total{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_commits_total The total number of commits that have occurred.
# TYPE node_btrfs_commits_total counter
node_btrfs_commits_total{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 258051
node_btrfs_commits_total{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_device_size_bytes Size of a device that is part of the filesystem.
# TYPE node_btrfs_device_size_bytes gauge
node_btrfs_device_size_bytes{device="loop22",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.073741824e+10
@ -177,6 +189,14 @@ node_btrfs_global_rsv_size_bytes{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1.
# TYPE node_btrfs_info gauge
node_btrfs_info{label="",uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 1
node_btrfs_info{label="fixture",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1
# HELP node_btrfs_last_commit_seconds Duration of the most recent commit, in seconds.
# TYPE node_btrfs_last_commit_seconds gauge
node_btrfs_last_commit_seconds{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 1
node_btrfs_last_commit_seconds{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_max_commit_seconds Duration of the slowest commit, in seconds.
# TYPE node_btrfs_max_commit_seconds gauge
node_btrfs_max_commit_seconds{uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 51.462
node_btrfs_max_commit_seconds{uuid="7f07c59f-6136-449c-ab87-e1cf2328731b"} 0
# HELP node_btrfs_reserved_bytes Amount of space reserved for a data type
# TYPE node_btrfs_reserved_bytes gauge
node_btrfs_reserved_bytes{block_group_type="data",uuid="0abb23a9-579b-43e6-ad30-227ef47fcb9d"} 0
@ -424,6 +444,13 @@ node_cpu_seconds_total{cpu="7",mode="softirq"} 0.31
node_cpu_seconds_total{cpu="7",mode="steal"} 0
node_cpu_seconds_total{cpu="7",mode="system"} 101.64
node_cpu_seconds_total{cpu="7",mode="user"} 290.98
# HELP node_cpu_vulnerabilities_info Details of each CPU vulnerability reported by sysfs. The value of the series is an int encoded state of the vulnerability. The same state is stored as a string in the label
# TYPE node_cpu_vulnerabilities_info gauge
node_cpu_vulnerabilities_info{codename="itlb_multihit",mitigation="",state="not affected"} 1
node_cpu_vulnerabilities_info{codename="mds",mitigation="",state="vulnerable"} 1
node_cpu_vulnerabilities_info{codename="retbleed",mitigation="untrained return thunk; SMT enabled with STIBP protection",state="mitigation"} 1
node_cpu_vulnerabilities_info{codename="spectre_v1",mitigation="usercopy/swapgs barriers and __user pointer sanitization",state="mitigation"} 1
node_cpu_vulnerabilities_info{codename="spectre_v2",mitigation="Retpolines, IBPB: conditional, STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected",state="mitigation"} 1
# HELP node_disk_ata_rotation_rate_rpm ATA disk rotation rate in RPMs (0 for SSDs).
# TYPE node_disk_ata_rotation_rate_rpm gauge
node_disk_ata_rotation_rate_rpm{device="sda"} 7200
@ -483,21 +510,21 @@ node_disk_flush_requests_time_seconds_total{device="sdc"} 1.944
node_disk_flush_requests_total{device="sdc"} 1555
# HELP node_disk_info Info of /sys/block/<block_device>.
# TYPE node_disk_info gauge
node_disk_info{device="dm-0",major="252",minor="0",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-1",major="252",minor="1",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-2",major="252",minor="2",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-3",major="252",minor="3",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-4",major="252",minor="4",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-5",major="252",minor="5",model="",path="",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0",major="179",minor="0",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p1",major="179",minor="1",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p2",major="179",minor="2",model="",path="platform-df2969f3.mmc",revision="",serial="",wwn=""} 1
node_disk_info{device="nvme0n1",major="259",minor="0",model="SAMSUNG EHFTF55LURSY-000Y9",path="pci-0000:02:00.0-nvme-1",revision="4NBTUY95",serial="S252B6CU1HG3M1",wwn="eui.p3vbbiejx5aae2r3"} 1
node_disk_info{device="sda",major="8",minor="0",model="TOSHIBA_KSDB4U86",path="pci-0000:3b:00.0-sas-phy7-lun-0",revision="0102",serial="2160A0D5FVGG",wwn="0x7c72382b8de36a64"} 1
node_disk_info{device="sdb",major="8",minor="16",model="SuperMicro_SSD",path="pci-0000:00:1f.2-ata-1",revision="0R",serial="SMC0E1B87ABBB16BD84E",wwn="0xe1b87abbb16bd84e"} 1
node_disk_info{device="sdc",major="8",minor="32",model="INTEL_SSDS9X9SI0",path="pci-0000:00:1f.2-ata-4",revision="0100",serial="3EWB5Y25CWQWA7EH1U",wwn="0x58907ddc573a5de"} 1
node_disk_info{device="sr0",major="11",minor="0",model="Virtual_CDROM0",path="pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0",revision="1.00",serial="AAAABBBBCCCC1",wwn=""} 1
node_disk_info{device="vda",major="254",minor="0",model="",path="pci-0000:00:06.0",revision="",serial="",wwn=""} 1
node_disk_info{device="dm-0",major="252",minor="0",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-1",major="252",minor="1",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-2",major="252",minor="2",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-3",major="252",minor="3",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-4",major="252",minor="4",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="dm-5",major="252",minor="5",model="",path="",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0",major="179",minor="0",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p1",major="179",minor="1",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="mmcblk0p2",major="179",minor="2",model="",path="platform-df2969f3.mmc",revision="",rotational="0",serial="",wwn=""} 1
node_disk_info{device="nvme0n1",major="259",minor="0",model="SAMSUNG EHFTF55LURSY-000Y9",path="pci-0000:02:00.0-nvme-1",revision="4NBTUY95",rotational="0",serial="S252B6CU1HG3M1",wwn="eui.p3vbbiejx5aae2r3"} 1
node_disk_info{device="sda",major="8",minor="0",model="TOSHIBA_KSDB4U86",path="pci-0000:3b:00.0-sas-phy7-lun-0",revision="0102",rotational="1",serial="2160A0D5FVGG",wwn="0x7c72382b8de36a64"} 1
node_disk_info{device="sdb",major="8",minor="16",model="SuperMicro_SSD",path="pci-0000:00:1f.2-ata-1",revision="0R",rotational="0",serial="SMC0E1B87ABBB16BD84E",wwn="0xe1b87abbb16bd84e"} 1
node_disk_info{device="sdc",major="8",minor="32",model="INTEL_SSDS9X9SI0",path="pci-0000:00:1f.2-ata-4",revision="0100",rotational="0",serial="3EWB5Y25CWQWA7EH1U",wwn="0x58907ddc573a5de"} 1
node_disk_info{device="sr0",major="11",minor="0",model="Virtual_CDROM0",path="pci-0000:00:14.0-usb-0:1.1:1.0-scsi-0:0:0:0",revision="1.00",rotational="0",serial="AAAABBBBCCCC1",wwn=""} 1
node_disk_info{device="vda",major="254",minor="0",model="",path="pci-0000:00:06.0",revision="",rotational="0",serial="",wwn=""} 1
# HELP node_disk_io_now The number of I/Os currently in progress.
# TYPE node_disk_io_now gauge
node_disk_io_now{device="dm-0"} 0
@ -757,48 +784,64 @@ node_entropy_available_bits 1337
node_entropy_pool_size_bits 4096
# HELP node_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which node_exporter was built, and the goos and goarch for the build.
# TYPE node_exporter_build_info gauge
# HELP node_fibrechannel_dumped_frames_total Number of dumped frames
# TYPE node_fibrechannel_dumped_frames_total counter
node_fibrechannel_dumped_frames_total{fc_host="host1"} 0
# HELP node_fibrechannel_error_frames_total Number of errors in frames
# TYPE node_fibrechannel_error_frames_total counter
node_fibrechannel_error_frames_total{fc_host="host0"} 0
node_fibrechannel_error_frames_total{fc_host="host1"} 19
# HELP node_fibrechannel_fcp_packet_aborts_total Number of aborted packets
# TYPE node_fibrechannel_fcp_packet_aborts_total counter
node_fibrechannel_fcp_packet_aborts_total{fc_host="host0"} 19
# HELP node_fibrechannel_info Non-numeric data from /sys/class/fc_host/<host>, value is always 1.
# TYPE node_fibrechannel_info gauge
node_fibrechannel_info{dev_loss_tmo="",fabric_name="",fc_host="host1",port_id="",port_name="",port_state="",port_type="",speed="8 Gbit",supported_classes="",supported_speeds="",symbolic_name=""} 1
node_fibrechannel_info{dev_loss_tmo="30",fabric_name="0",fc_host="host0",port_id="000002",port_name="1000e0071bce95f2",port_state="Online",port_type="Point-To-Point (direct nport connection)",speed="16 Gbit",supported_classes="Class 3",supported_speeds="4 Gbit, 8 Gbit, 16 Gbit",symbolic_name="Emulex SN1100E2P FV12.4.270.3 DV12.4.0.0. HN:gotest. OS:Linux"} 1
# HELP node_fibrechannel_invalid_crc_total Invalid Cyclic Redundancy Check count
# TYPE node_fibrechannel_invalid_crc_total counter
node_fibrechannel_invalid_crc_total{fc_host="host0"} 2
node_fibrechannel_invalid_crc_total{fc_host="host1"} 32
# HELP node_fibrechannel_invalid_tx_words_total Number of invalid words transmitted by host port
# TYPE node_fibrechannel_invalid_tx_words_total counter
node_fibrechannel_invalid_tx_words_total{fc_host="host0"} 8
node_fibrechannel_invalid_tx_words_total{fc_host="host1"} 128
# HELP node_fibrechannel_link_failure_total Number of times the host port link has failed
# TYPE node_fibrechannel_link_failure_total counter
node_fibrechannel_link_failure_total{fc_host="host0"} 9
node_fibrechannel_link_failure_total{fc_host="host1"} 144
# HELP node_fibrechannel_loss_of_signal_total Number of times signal has been lost
# TYPE node_fibrechannel_loss_of_signal_total counter
node_fibrechannel_loss_of_signal_total{fc_host="host0"} 17
node_fibrechannel_loss_of_signal_total{fc_host="host1"} 272
# HELP node_fibrechannel_loss_of_sync_total Number of failures on either bit or transmission word boundaries
# TYPE node_fibrechannel_loss_of_sync_total counter
node_fibrechannel_loss_of_sync_total{fc_host="host0"} 16
node_fibrechannel_loss_of_sync_total{fc_host="host1"} 256
# HELP node_fibrechannel_nos_total Number Not_Operational Primitive Sequence received by host port
# TYPE node_fibrechannel_nos_total counter
node_fibrechannel_nos_total{fc_host="host0"} 18
node_fibrechannel_nos_total{fc_host="host1"} 288
# HELP node_fibrechannel_rx_frames_total Number of frames received
# TYPE node_fibrechannel_rx_frames_total counter
node_fibrechannel_rx_frames_total{fc_host="host0"} 3
node_fibrechannel_rx_frames_total{fc_host="host1"} 48
# HELP node_fibrechannel_rx_words_total Number of words received by host port
# TYPE node_fibrechannel_rx_words_total counter
node_fibrechannel_rx_words_total{fc_host="host0"} 4
node_fibrechannel_rx_words_total{fc_host="host1"} 64
# HELP node_fibrechannel_seconds_since_last_reset_total Number of seconds since last host port reset
# TYPE node_fibrechannel_seconds_since_last_reset_total counter
node_fibrechannel_seconds_since_last_reset_total{fc_host="host0"} 7
node_fibrechannel_seconds_since_last_reset_total{fc_host="host1"} 112
# HELP node_fibrechannel_tx_frames_total Number of frames transmitted by host port
# TYPE node_fibrechannel_tx_frames_total counter
node_fibrechannel_tx_frames_total{fc_host="host0"} 5
node_fibrechannel_tx_frames_total{fc_host="host1"} 80
# HELP node_fibrechannel_tx_words_total Number of words transmitted by host port
# TYPE node_fibrechannel_tx_words_total counter
node_fibrechannel_tx_words_total{fc_host="host0"} 6
node_fibrechannel_tx_words_total{fc_host="host1"} 96
# HELP node_filefd_allocated File descriptor statistics: allocated.
# TYPE node_filefd_allocated gauge
node_filefd_allocated 1024
@ -850,6 +893,10 @@ node_hwmon_fan_target_rpm{chip="nct6779",sensor="fan2"} 27000
# HELP node_hwmon_fan_tolerance Hardware monitor fan element tolerance
# TYPE node_hwmon_fan_tolerance gauge
node_hwmon_fan_tolerance{chip="nct6779",sensor="fan2"} 0
# HELP node_hwmon_freq_freq_mhz Hardware monitor for GPU frequency in MHz
# TYPE node_hwmon_freq_freq_mhz gauge
node_hwmon_freq_freq_mhz{chip="hwmon4",sensor="mclk"} 300
node_hwmon_freq_freq_mhz{chip="hwmon4",sensor="sclk"} 214
# HELP node_hwmon_in_alarm Hardware sensor alarm status (in)
# TYPE node_hwmon_in_alarm gauge
node_hwmon_in_alarm{chip="nct6779",sensor="in0"} 0
@ -963,8 +1010,10 @@ node_hwmon_pwm_weight_temp_step_tol{chip="nct6779",sensor="pwm1"} 0
# TYPE node_hwmon_sensor_label gauge
node_hwmon_sensor_label{chip="hwmon4",label="foosensor",sensor="temp1"} 1
node_hwmon_sensor_label{chip="hwmon4",label="foosensor",sensor="temp2"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Left side ",sensor="fan1"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Right side ",sensor="fan2"} 1
node_hwmon_sensor_label{chip="hwmon4",label="mclk",sensor="freq2"} 1
node_hwmon_sensor_label{chip="hwmon4",label="sclk",sensor="freq1"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Left side",sensor="fan1"} 1
node_hwmon_sensor_label{chip="platform_applesmc_768",label="Right side",sensor="fan2"} 1
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 0",sensor="temp2"} 1
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 1",sensor="temp3"} 1
node_hwmon_sensor_label{chip="platform_coretemp_0",label="Core 2",sensor="temp4"} 1
@ -1558,6 +1607,14 @@ node_md_blocks_synced{device="md6"} 1.6775552e+07
node_md_blocks_synced{device="md7"} 7.813735424e+09
node_md_blocks_synced{device="md8"} 1.6775552e+07
node_md_blocks_synced{device="md9"} 0
# HELP node_md_degraded Number of degraded disks on device.
# TYPE node_md_degraded gauge
node_md_degraded{device="md0"} 0
node_md_degraded{device="md1"} 0
node_md_degraded{device="md10"} 0
node_md_degraded{device="md4"} 0
node_md_degraded{device="md5"} 1
node_md_degraded{device="md6"} 1
# HELP node_md_disks Number of active/failed/spare disks of device.
# TYPE node_md_disks gauge
node_md_disks{device="md0",state="active"} 2
@ -1630,6 +1687,14 @@ node_md_disks_required{device="md6"} 2
node_md_disks_required{device="md7"} 4
node_md_disks_required{device="md8"} 2
node_md_disks_required{device="md9"} 4
# HELP node_md_raid_disks Number of raid disks on device.
# TYPE node_md_raid_disks gauge
node_md_raid_disks{device="md0"} 2
node_md_raid_disks{device="md1"} 2
node_md_raid_disks{device="md10"} 4
node_md_raid_disks{device="md4"} 3
node_md_raid_disks{device="md5"} 3
node_md_raid_disks{device="md6"} 4
# HELP node_md_state Indicates the state of md-device.
# TYPE node_md_state gauge
node_md_state{device="md0",state="active"} 1
@ -2318,6 +2383,12 @@ node_netstat_TcpExt_SyncookiesRecv 0
# HELP node_netstat_TcpExt_SyncookiesSent Statistic TcpExtSyncookiesSent.
# TYPE node_netstat_TcpExt_SyncookiesSent untyped
node_netstat_TcpExt_SyncookiesSent 0
# HELP node_netstat_TcpExt_TCPOFOQueue Statistic TcpExtTCPOFOQueue.
# TYPE node_netstat_TcpExt_TCPOFOQueue untyped
node_netstat_TcpExt_TCPOFOQueue 42
# HELP node_netstat_TcpExt_TCPRcvQDrop Statistic TcpExtTCPRcvQDrop.
# TYPE node_netstat_TcpExt_TCPRcvQDrop untyped
node_netstat_TcpExt_TCPRcvQDrop 131
# HELP node_netstat_TcpExt_TCPTimeouts Statistic TcpExtTCPTimeouts.
# TYPE node_netstat_TcpExt_TCPTimeouts untyped
node_netstat_TcpExt_TCPTimeouts 115
@ -2753,13 +2824,16 @@ node_nfsd_requests_total{method="SecInfo",proto="4"} 0
node_nfsd_requests_total{method="SetAttr",proto="2"} 0
node_nfsd_requests_total{method="SetAttr",proto="3"} 0
node_nfsd_requests_total{method="SetAttr",proto="4"} 0
node_nfsd_requests_total{method="SetClientID",proto="4"} 3
node_nfsd_requests_total{method="SetClientIDConfirm",proto="4"} 3
node_nfsd_requests_total{method="SymLink",proto="2"} 0
node_nfsd_requests_total{method="SymLink",proto="3"} 0
node_nfsd_requests_total{method="Verify",proto="4"} 3
node_nfsd_requests_total{method="Verify",proto="4"} 0
node_nfsd_requests_total{method="WdelegGetattr",proto="4"} 15
node_nfsd_requests_total{method="WrCache",proto="2"} 0
node_nfsd_requests_total{method="Write",proto="2"} 0
node_nfsd_requests_total{method="Write",proto="3"} 0
node_nfsd_requests_total{method="Write",proto="4"} 3
node_nfsd_requests_total{method="Write",proto="4"} 0
# HELP node_nfsd_rpc_errors_total Total number of NFSd RPC errors by error type.
# TYPE node_nfsd_rpc_errors_total counter
node_nfsd_rpc_errors_total{error="auth"} 2
@ -2780,6 +2854,26 @@ node_os_info{build_id="",id="ubuntu",id_like="debian",image_id="",image_version=
# HELP node_os_version Metric containing the major.minor part of the OS version.
# TYPE node_os_version gauge
node_os_version{id="ubuntu",id_like="debian",name="Ubuntu"} 20.04
# HELP node_pcidevice_current_link_transfers_per_second Value of current link's transfers per second (T/s)
# TYPE node_pcidevice_current_link_transfers_per_second gauge
node_pcidevice_current_link_transfers_per_second{bus="00",device="02",function="1",segment="0000"} 8e+09
node_pcidevice_current_link_transfers_per_second{bus="01",device="00",function="0",segment="0000"} 8e+09
# HELP node_pcidevice_current_link_width Value of current link's width (number of lanes)
# TYPE node_pcidevice_current_link_width gauge
node_pcidevice_current_link_width{bus="00",device="02",function="1",segment="0000"} 4
node_pcidevice_current_link_width{bus="01",device="00",function="0",segment="0000"} 4
# HELP node_pcidevice_info Non-numeric data from /sys/bus/pci/devices/<location>, value is always 1.
# TYPE node_pcidevice_info gauge
node_pcidevice_info{bus="00",class_id="0x060400",device="02",function="1",parent_bus="*",parent_device="*",parent_function="*",parent_segment="*",revision="0x00",segment="0000",subsystem_device_id="0x5095",subsystem_vendor_id="0x17aa",vendor_id="0x1634"} 1
node_pcidevice_info{bus="01",class_id="0x010802",device="00",function="0",parent_bus="00",parent_device="02",parent_function="1",parent_segment="0000",revision="0x01",segment="0000",subsystem_device_id="0x5021",subsystem_vendor_id="0xc0a9",vendor_id="0x540a"} 1
# HELP node_pcidevice_max_link_transfers_per_second Value of maximum link's transfers per second (T/s)
# TYPE node_pcidevice_max_link_transfers_per_second gauge
node_pcidevice_max_link_transfers_per_second{bus="00",device="02",function="1",segment="0000"} 8e+09
node_pcidevice_max_link_transfers_per_second{bus="01",device="00",function="0",segment="0000"} 1.6e+10
# HELP node_pcidevice_max_link_width Value of maximum link's width (number of lanes)
# TYPE node_pcidevice_max_link_width gauge
node_pcidevice_max_link_width{bus="00",device="02",function="1",segment="0000"} 8
node_pcidevice_max_link_width{bus="01",device="00",function="0",segment="0000"} 4
# HELP node_power_supply_capacity capacity value of /sys/class/power_supply/<power_supply>.
# TYPE node_power_supply_capacity gauge
node_power_supply_capacity{power_supply="BAT0"} 81
@ -2823,6 +2917,9 @@ node_pressure_io_stalled_seconds_total 159.229614
# HELP node_pressure_io_waiting_seconds_total Total time in seconds that processes have waited due to IO congestion
# TYPE node_pressure_io_waiting_seconds_total counter
node_pressure_io_waiting_seconds_total 159.886802
# HELP node_pressure_irq_stalled_seconds_total Total time in seconds no process could make progress due to IRQ congestion
# TYPE node_pressure_irq_stalled_seconds_total counter
node_pressure_irq_stalled_seconds_total 0.008494
# HELP node_pressure_memory_stalled_seconds_total Total time in seconds no process could make progress due to memory congestion
# TYPE node_pressure_memory_stalled_seconds_total counter
node_pressure_memory_stalled_seconds_total 0
@ -2909,6 +3006,7 @@ node_scrape_collector_success{collector="buddyinfo"} 1
node_scrape_collector_success{collector="cgroups"} 1
node_scrape_collector_success{collector="conntrack"} 1
node_scrape_collector_success{collector="cpu"} 1
node_scrape_collector_success{collector="cpu_vulnerabilities"} 1
node_scrape_collector_success{collector="cpufreq"} 1
node_scrape_collector_success{collector="diskstats"} 1
node_scrape_collector_success{collector="dmi"} 1
@ -2935,13 +3033,13 @@ node_scrape_collector_success{collector="nfs"} 1
node_scrape_collector_success{collector="nfsd"} 1
node_scrape_collector_success{collector="nvme"} 1
node_scrape_collector_success{collector="os"} 1
node_scrape_collector_success{collector="pcidevice"} 1
node_scrape_collector_success{collector="powersupplyclass"} 1
node_scrape_collector_success{collector="pressure"} 1
node_scrape_collector_success{collector="processes"} 1
node_scrape_collector_success{collector="qdisc"} 1
node_scrape_collector_success{collector="rapl"} 1
node_scrape_collector_success{collector="schedstat"} 1
node_scrape_collector_success{collector="selinux"} 1
node_scrape_collector_success{collector="slabinfo"} 1
node_scrape_collector_success{collector="sockstat"} 1
node_scrape_collector_success{collector="softirqs"} 1
@ -2954,13 +3052,12 @@ node_scrape_collector_success{collector="thermal_zone"} 1
node_scrape_collector_success{collector="time"} 1
node_scrape_collector_success{collector="udp_queues"} 1
node_scrape_collector_success{collector="vmstat"} 1
node_scrape_collector_success{collector="watchdog"} 1
node_scrape_collector_success{collector="wifi"} 1
node_scrape_collector_success{collector="xfrm"} 1
node_scrape_collector_success{collector="xfs"} 1
node_scrape_collector_success{collector="zfs"} 1
node_scrape_collector_success{collector="zoneinfo"} 1
# HELP node_selinux_enabled SELinux is enabled, 1 is true, 0 is false
# TYPE node_selinux_enabled gauge
node_selinux_enabled 0
# HELP node_slabinfo_active_objects The number of objects that are currently active (i.e., in use).
# TYPE node_slabinfo_active_objects gauge
node_slabinfo_active_objects{slab="dmaengine-unmap-128"} 1206
@ -3229,6 +3326,31 @@ node_vmstat_pswpin 1476
# HELP node_vmstat_pswpout /proc/vmstat information field pswpout.
# TYPE node_vmstat_pswpout untyped
node_vmstat_pswpout 35045
# HELP node_watchdog_access_cs0 Value of /sys/class/watchdog/<watchdog>/access_cs0
# TYPE node_watchdog_access_cs0 gauge
node_watchdog_access_cs0{name="watchdog0"} 0
# HELP node_watchdog_bootstatus Value of /sys/class/watchdog/<watchdog>/bootstatus
# TYPE node_watchdog_bootstatus gauge
node_watchdog_bootstatus{name="watchdog0"} 1
# HELP node_watchdog_fw_version Value of /sys/class/watchdog/<watchdog>/fw_version
# TYPE node_watchdog_fw_version gauge
node_watchdog_fw_version{name="watchdog0"} 2
# HELP node_watchdog_info Info of /sys/class/watchdog/<watchdog>
# TYPE node_watchdog_info gauge
node_watchdog_info{identity="",name="watchdog1",options="",pretimeout_governor="",state="",status=""} 1
node_watchdog_info{identity="Software Watchdog",name="watchdog0",options="0x8380",pretimeout_governor="noop",state="active",status="0x8000"} 1
# HELP node_watchdog_nowayout Value of /sys/class/watchdog/<watchdog>/nowayout
# TYPE node_watchdog_nowayout gauge
node_watchdog_nowayout{name="watchdog0"} 0
# HELP node_watchdog_pretimeout_seconds Value of /sys/class/watchdog/<watchdog>/pretimeout
# TYPE node_watchdog_pretimeout_seconds gauge
node_watchdog_pretimeout_seconds{name="watchdog0"} 120
# HELP node_watchdog_timeleft_seconds Value of /sys/class/watchdog/<watchdog>/timeleft
# TYPE node_watchdog_timeleft_seconds gauge
node_watchdog_timeleft_seconds{name="watchdog0"} 300
# HELP node_watchdog_timeout_seconds Value of /sys/class/watchdog/<watchdog>/timeout
# TYPE node_watchdog_timeout_seconds gauge
node_watchdog_timeout_seconds{name="watchdog0"} 60
# HELP node_wifi_interface_frequency_hertz The current frequency a WiFi interface is operating at, in hertz.
# TYPE node_wifi_interface_frequency_hertz gauge
node_wifi_interface_frequency_hertz{device="wlan0"} 2.412e+09
@ -3276,6 +3398,90 @@ node_wifi_station_transmit_failed_total{device="wlan0",mac_address="aa:bb:cc:dd:
# TYPE node_wifi_station_transmit_retries_total counter
node_wifi_station_transmit_retries_total{device="wlan0",mac_address="01:02:03:04:05:06"} 20
node_wifi_station_transmit_retries_total{device="wlan0",mac_address="aa:bb:cc:dd:ee:ff"} 10
# HELP node_xfrm_acquire_error_packets_total State hasnt been fully acquired before use
# TYPE node_xfrm_acquire_error_packets_total counter
node_xfrm_acquire_error_packets_total 24532
# HELP node_xfrm_fwd_hdr_error_packets_total Forward routing of a packet is not allowed
# TYPE node_xfrm_fwd_hdr_error_packets_total counter
node_xfrm_fwd_hdr_error_packets_total 6654
# HELP node_xfrm_in_buffer_error_packets_total No buffer is left
# TYPE node_xfrm_in_buffer_error_packets_total counter
node_xfrm_in_buffer_error_packets_total 2
# HELP node_xfrm_in_error_packets_total All errors not matched by other
# TYPE node_xfrm_in_error_packets_total counter
node_xfrm_in_error_packets_total 1
# HELP node_xfrm_in_hdr_error_packets_total Header error
# TYPE node_xfrm_in_hdr_error_packets_total counter
node_xfrm_in_hdr_error_packets_total 4
# HELP node_xfrm_in_no_pols_packets_total No policy is found for states e.g. Inbound SAs are correct but no SP is found
# TYPE node_xfrm_in_no_pols_packets_total counter
node_xfrm_in_no_pols_packets_total 65432
# HELP node_xfrm_in_no_states_packets_total No state is found i.e. Either inbound SPI, address, or IPsec protocol at SA is wrong
# TYPE node_xfrm_in_no_states_packets_total counter
node_xfrm_in_no_states_packets_total 3
# HELP node_xfrm_in_pol_block_packets_total Policy discards
# TYPE node_xfrm_in_pol_block_packets_total counter
node_xfrm_in_pol_block_packets_total 100
# HELP node_xfrm_in_pol_error_packets_total Policy error
# TYPE node_xfrm_in_pol_error_packets_total counter
node_xfrm_in_pol_error_packets_total 10000
# HELP node_xfrm_in_state_expired_packets_total State is expired
# TYPE node_xfrm_in_state_expired_packets_total counter
node_xfrm_in_state_expired_packets_total 7
# HELP node_xfrm_in_state_invalid_packets_total State is invalid
# TYPE node_xfrm_in_state_invalid_packets_total counter
node_xfrm_in_state_invalid_packets_total 55555
# HELP node_xfrm_in_state_mismatch_packets_total State has mismatch option e.g. UDP encapsulation type is mismatch
# TYPE node_xfrm_in_state_mismatch_packets_total counter
node_xfrm_in_state_mismatch_packets_total 23451
# HELP node_xfrm_in_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_in_state_mode_error_packets_total counter
node_xfrm_in_state_mode_error_packets_total 100
# HELP node_xfrm_in_state_proto_error_packets_total Transformation protocol specific error e.g. SA key is wrong
# TYPE node_xfrm_in_state_proto_error_packets_total counter
node_xfrm_in_state_proto_error_packets_total 40
# HELP node_xfrm_in_state_seq_error_packets_total Sequence error i.e. Sequence number is out of window
# TYPE node_xfrm_in_state_seq_error_packets_total counter
node_xfrm_in_state_seq_error_packets_total 6000
# HELP node_xfrm_in_tmpl_mismatch_packets_total No matching template for states e.g. Inbound SAs are correct but SP rule is wrong
# TYPE node_xfrm_in_tmpl_mismatch_packets_total counter
node_xfrm_in_tmpl_mismatch_packets_total 51
# HELP node_xfrm_out_bundle_check_error_packets_total Bundle check error
# TYPE node_xfrm_out_bundle_check_error_packets_total counter
node_xfrm_out_bundle_check_error_packets_total 555
# HELP node_xfrm_out_bundle_gen_error_packets_total Bundle generation error
# TYPE node_xfrm_out_bundle_gen_error_packets_total counter
node_xfrm_out_bundle_gen_error_packets_total 43321
# HELP node_xfrm_out_error_packets_total All errors which is not matched others
# TYPE node_xfrm_out_error_packets_total counter
node_xfrm_out_error_packets_total 1e+06
# HELP node_xfrm_out_no_states_packets_total No state is found
# TYPE node_xfrm_out_no_states_packets_total counter
node_xfrm_out_no_states_packets_total 869
# HELP node_xfrm_out_pol_block_packets_total Policy discards
# TYPE node_xfrm_out_pol_block_packets_total counter
node_xfrm_out_pol_block_packets_total 43456
# HELP node_xfrm_out_pol_dead_packets_total Policy is dead
# TYPE node_xfrm_out_pol_dead_packets_total counter
node_xfrm_out_pol_dead_packets_total 7656
# HELP node_xfrm_out_pol_error_packets_total Policy error
# TYPE node_xfrm_out_pol_error_packets_total counter
node_xfrm_out_pol_error_packets_total 1454
# HELP node_xfrm_out_state_expired_packets_total State is expired
# TYPE node_xfrm_out_state_expired_packets_total counter
node_xfrm_out_state_expired_packets_total 565
# HELP node_xfrm_out_state_invalid_packets_total State is invalid, perhaps expired
# TYPE node_xfrm_out_state_invalid_packets_total counter
node_xfrm_out_state_invalid_packets_total 28765
# HELP node_xfrm_out_state_mode_error_packets_total Transformation mode specific error
# TYPE node_xfrm_out_state_mode_error_packets_total counter
node_xfrm_out_state_mode_error_packets_total 8
# HELP node_xfrm_out_state_proto_error_packets_total Transformation protocol specific error
# TYPE node_xfrm_out_state_proto_error_packets_total counter
node_xfrm_out_state_proto_error_packets_total 4542
# HELP node_xfrm_out_state_seq_error_packets_total Sequence error i.e. Sequence number overflow
# TYPE node_xfrm_out_state_seq_error_packets_total counter
node_xfrm_out_state_seq_error_packets_total 543
# HELP node_xfs_allocation_btree_compares_total Number of allocation B-tree compares for a filesystem.
# TYPE node_xfs_allocation_btree_compares_total counter
node_xfs_allocation_btree_compares_total{device="sda1"} 0
@ -3642,6 +3848,9 @@ node_zfs_arc_l2_writes_lock_retry 0
# HELP node_zfs_arc_l2_writes_sent kstat.zfs.misc.arcstats.l2_writes_sent
# TYPE node_zfs_arc_l2_writes_sent untyped
node_zfs_arc_l2_writes_sent 0
# HELP node_zfs_arc_memory_available_bytes kstat.zfs.misc.arcstats.memory_available_bytes
# TYPE node_zfs_arc_memory_available_bytes untyped
node_zfs_arc_memory_available_bytes -9.223372036854776e+17
# HELP node_zfs_arc_memory_direct_count kstat.zfs.misc.arcstats.memory_direct_count
# TYPE node_zfs_arc_memory_direct_count untyped
node_zfs_arc_memory_direct_count 542
@ -4171,108 +4380,139 @@ node_zfs_zil_zil_itx_needcopy_count 0
# TYPE node_zfs_zpool_dataset_nread untyped
node_zfs_zpool_dataset_nread{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nread{dataset="pool1/dataset1",zpool="pool1"} 28
node_zfs_zpool_dataset_nread{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nread{dataset="pool3/dataset with space",zpool="pool3"} 28
node_zfs_zpool_dataset_nread{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nread{dataset="poolz1/dataset1",zpool="poolz1"} 28
# HELP node_zfs_zpool_dataset_nunlinked kstat.zfs.misc.objset.nunlinked
# TYPE node_zfs_zpool_dataset_nunlinked untyped
node_zfs_zpool_dataset_nunlinked{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nunlinked{dataset="pool1/dataset1",zpool="pool1"} 3
node_zfs_zpool_dataset_nunlinked{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nunlinked{dataset="pool3/dataset with space",zpool="pool3"} 3
node_zfs_zpool_dataset_nunlinked{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nunlinked{dataset="poolz1/dataset1",zpool="poolz1"} 14
# HELP node_zfs_zpool_dataset_nunlinks kstat.zfs.misc.objset.nunlinks
# TYPE node_zfs_zpool_dataset_nunlinks untyped
node_zfs_zpool_dataset_nunlinks{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nunlinks{dataset="pool1/dataset1",zpool="pool1"} 3
node_zfs_zpool_dataset_nunlinks{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nunlinks{dataset="pool3/dataset with space",zpool="pool3"} 3
node_zfs_zpool_dataset_nunlinks{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nunlinks{dataset="poolz1/dataset1",zpool="poolz1"} 14
# HELP node_zfs_zpool_dataset_nwritten kstat.zfs.misc.objset.nwritten
# TYPE node_zfs_zpool_dataset_nwritten untyped
node_zfs_zpool_dataset_nwritten{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_nwritten{dataset="pool1/dataset1",zpool="pool1"} 12302
node_zfs_zpool_dataset_nwritten{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_nwritten{dataset="pool3/dataset with space",zpool="pool3"} 12302
node_zfs_zpool_dataset_nwritten{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_nwritten{dataset="poolz1/dataset1",zpool="poolz1"} 32806
# HELP node_zfs_zpool_dataset_reads kstat.zfs.misc.objset.reads
# TYPE node_zfs_zpool_dataset_reads untyped
node_zfs_zpool_dataset_reads{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_reads{dataset="pool1/dataset1",zpool="pool1"} 2
node_zfs_zpool_dataset_reads{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_reads{dataset="pool3/dataset with space",zpool="pool3"} 2
node_zfs_zpool_dataset_reads{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_reads{dataset="poolz1/dataset1",zpool="poolz1"} 2
# HELP node_zfs_zpool_dataset_writes kstat.zfs.misc.objset.writes
# TYPE node_zfs_zpool_dataset_writes untyped
node_zfs_zpool_dataset_writes{dataset="pool1",zpool="pool1"} 0
node_zfs_zpool_dataset_writes{dataset="pool1/dataset1",zpool="pool1"} 4
node_zfs_zpool_dataset_writes{dataset="pool3",zpool="pool3"} 0
node_zfs_zpool_dataset_writes{dataset="pool3/dataset with space",zpool="pool3"} 4
node_zfs_zpool_dataset_writes{dataset="poolz1",zpool="poolz1"} 0
node_zfs_zpool_dataset_writes{dataset="poolz1/dataset1",zpool="poolz1"} 10
# HELP node_zfs_zpool_nread kstat.zfs.misc.io.nread
# TYPE node_zfs_zpool_nread untyped
node_zfs_zpool_nread{zpool="pool1"} 1.88416e+06
node_zfs_zpool_nread{zpool="pool3"} 1.88416e+06
node_zfs_zpool_nread{zpool="poolz1"} 2.82624e+06
# HELP node_zfs_zpool_nwritten kstat.zfs.misc.io.nwritten
# TYPE node_zfs_zpool_nwritten untyped
node_zfs_zpool_nwritten{zpool="pool1"} 3.206144e+06
node_zfs_zpool_nwritten{zpool="pool3"} 3.206144e+06
node_zfs_zpool_nwritten{zpool="poolz1"} 2.680501248e+09
# HELP node_zfs_zpool_rcnt kstat.zfs.misc.io.rcnt
# TYPE node_zfs_zpool_rcnt untyped
node_zfs_zpool_rcnt{zpool="pool1"} 0
node_zfs_zpool_rcnt{zpool="pool3"} 0
node_zfs_zpool_rcnt{zpool="poolz1"} 0
# HELP node_zfs_zpool_reads kstat.zfs.misc.io.reads
# TYPE node_zfs_zpool_reads untyped
node_zfs_zpool_reads{zpool="pool1"} 22
node_zfs_zpool_reads{zpool="pool3"} 22
node_zfs_zpool_reads{zpool="poolz1"} 33
# HELP node_zfs_zpool_rlentime kstat.zfs.misc.io.rlentime
# TYPE node_zfs_zpool_rlentime untyped
node_zfs_zpool_rlentime{zpool="pool1"} 1.04112268e+08
node_zfs_zpool_rlentime{zpool="pool3"} 1.04112268e+08
node_zfs_zpool_rlentime{zpool="poolz1"} 6.472105124093e+12
# HELP node_zfs_zpool_rtime kstat.zfs.misc.io.rtime
# TYPE node_zfs_zpool_rtime untyped
node_zfs_zpool_rtime{zpool="pool1"} 2.4168078e+07
node_zfs_zpool_rtime{zpool="pool3"} 2.4168078e+07
node_zfs_zpool_rtime{zpool="poolz1"} 9.82909164e+09
# HELP node_zfs_zpool_rupdate kstat.zfs.misc.io.rupdate
# TYPE node_zfs_zpool_rupdate untyped
node_zfs_zpool_rupdate{zpool="pool1"} 7.921048984922e+13
node_zfs_zpool_rupdate{zpool="pool3"} 7.921048984922e+13
node_zfs_zpool_rupdate{zpool="poolz1"} 1.10734831944501e+14
# HELP node_zfs_zpool_state kstat.zfs.misc.state
# TYPE node_zfs_zpool_state gauge
node_zfs_zpool_state{state="degraded",zpool="pool1"} 0
node_zfs_zpool_state{state="degraded",zpool="pool2"} 0
node_zfs_zpool_state{state="degraded",zpool="pool3"} 0
node_zfs_zpool_state{state="degraded",zpool="poolz1"} 1
node_zfs_zpool_state{state="faulted",zpool="pool1"} 0
node_zfs_zpool_state{state="faulted",zpool="pool2"} 0
node_zfs_zpool_state{state="faulted",zpool="pool3"} 0
node_zfs_zpool_state{state="faulted",zpool="poolz1"} 0
node_zfs_zpool_state{state="offline",zpool="pool1"} 0
node_zfs_zpool_state{state="offline",zpool="pool2"} 0
node_zfs_zpool_state{state="offline",zpool="pool3"} 0
node_zfs_zpool_state{state="offline",zpool="poolz1"} 0
node_zfs_zpool_state{state="online",zpool="pool1"} 1
node_zfs_zpool_state{state="online",zpool="pool2"} 0
node_zfs_zpool_state{state="online",zpool="pool3"} 1
node_zfs_zpool_state{state="online",zpool="poolz1"} 0
node_zfs_zpool_state{state="removed",zpool="pool1"} 0
node_zfs_zpool_state{state="removed",zpool="pool2"} 0
node_zfs_zpool_state{state="removed",zpool="pool3"} 0
node_zfs_zpool_state{state="removed",zpool="poolz1"} 0
node_zfs_zpool_state{state="suspended",zpool="pool1"} 0
node_zfs_zpool_state{state="suspended",zpool="pool2"} 1
node_zfs_zpool_state{state="suspended",zpool="pool3"} 0
node_zfs_zpool_state{state="suspended",zpool="poolz1"} 0
node_zfs_zpool_state{state="unavail",zpool="pool1"} 0
node_zfs_zpool_state{state="unavail",zpool="pool2"} 0
node_zfs_zpool_state{state="unavail",zpool="pool3"} 0
node_zfs_zpool_state{state="unavail",zpool="poolz1"} 0
# HELP node_zfs_zpool_wcnt kstat.zfs.misc.io.wcnt
# TYPE node_zfs_zpool_wcnt untyped
node_zfs_zpool_wcnt{zpool="pool1"} 0
node_zfs_zpool_wcnt{zpool="pool3"} 0
node_zfs_zpool_wcnt{zpool="poolz1"} 0
# HELP node_zfs_zpool_wlentime kstat.zfs.misc.io.wlentime
# TYPE node_zfs_zpool_wlentime untyped
node_zfs_zpool_wlentime{zpool="pool1"} 1.04112268e+08
node_zfs_zpool_wlentime{zpool="pool3"} 1.04112268e+08
node_zfs_zpool_wlentime{zpool="poolz1"} 6.472105124093e+12
# HELP node_zfs_zpool_writes kstat.zfs.misc.io.writes
# TYPE node_zfs_zpool_writes untyped
node_zfs_zpool_writes{zpool="pool1"} 132
node_zfs_zpool_writes{zpool="pool3"} 132
node_zfs_zpool_writes{zpool="poolz1"} 25294
# HELP node_zfs_zpool_wtime kstat.zfs.misc.io.wtime
# TYPE node_zfs_zpool_wtime untyped
node_zfs_zpool_wtime{zpool="pool1"} 7.155162e+06
node_zfs_zpool_wtime{zpool="pool3"} 7.155162e+06
node_zfs_zpool_wtime{zpool="poolz1"} 9.673715628e+09
# HELP node_zfs_zpool_wupdate kstat.zfs.misc.io.wupdate
# TYPE node_zfs_zpool_wupdate untyped
node_zfs_zpool_wupdate{zpool="pool1"} 7.9210489694949e+13
node_zfs_zpool_wupdate{zpool="pool3"} 7.9210489694949e+13
node_zfs_zpool_wupdate{zpool="poolz1"} 1.10734831833266e+14
# HELP node_zoneinfo_high_pages Zone watermark pages_high
# TYPE node_zoneinfo_high_pages gauge
@ -4449,6 +4689,10 @@ node_zoneinfo_spanned_pages{node="0",zone="Normal"} 7.806976e+06
# TYPE process_cpu_seconds_total counter
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
# HELP process_network_receive_bytes_total Number of bytes received by the process over the network.
# TYPE process_network_receive_bytes_total counter
# HELP process_network_transmit_bytes_total Number of bytes sent by the process over the network.
# TYPE process_network_transmit_bytes_total counter
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
# HELP process_resident_memory_bytes Resident memory size in bytes.

View file

@ -4,6 +4,7 @@ NIC statistics:
rx_packets: 1260062
tx_errors: 0
rx_errors: 0
port.rx_dropped: 12028
rx_missed: 401
align_errors: 0
tx_single_collisions: 0

View file

@ -0,0 +1,31 @@
24 29 0:22 / /sys rw,nosuid,nodev,noexec,relatime shared:7 - sysfs sysfs rw
25 29 0:23 / /proc rw,nosuid,nodev,noexec,relatime shared:13 - proc proc rw
26 29 0:5 / /dev rw,nosuid,relatime shared:2 - devtmpfs udev rw,size=7978892k,nr_inodes=1994723,mode=755
27 26 0:24 / /dev/pts rw,nosuid,noexec,relatime shared:3 - devpts devpts rw,gid=5,mode=620,ptmxmode=000
28 29 0:25 / /run rw,nosuid,relatime shared:5 - tmpfs tmpfs rw,size=1617716k,mode=755
29 1 259:2 / / rw,relatime shared:1 - ext4 /dev/dm-2 errors=remount-ro,data=ordered
30 24 0:6 / /sys/kernel/security rw,nosuid,nodev,noexec,relatime shared:8 - securityfs securityfs rw
31 26 0:26 / /dev/shm rw,nosuid,nodev shared:4 - tmpfs tmpfs rw,inode64
32 28 0:27 / /run/lock rw,nosuid,nodev,noexec,relatime shared:6 - tmpfs tmpfs rw,size=5120k
33 24 0:28 / /sys/fs/cgroup ro,nosuid,nodev,noexec shared:9 - tmpfs tmpfs ro,mode=755
34 31 0:24 / /sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime shared:10 - cgroup cgroup rw,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd
35 32 0:25 / /sys/fs/pstore rw,nosuid,nodev,noexec,relatime shared:11 - pstore pstore rw
36 33 0:26 / /sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime shared:12 - cgroup cgroup rw,cpuset
37 34 0:27 / /sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime shared:14 - cgroup cgroup rw,cpu,cpuacct
38 35 0:28 / /sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,devices
39 36 0:29 / /sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime shared:17 - cgroup cgroup rw,freezer
40 37 0:30 / /sys/fs/cgroup/net_cls,net_prio rw,nosuid,nodev,noexec,relatime shared:18 - cgroup cgroup rw,net_cls,net_prio
41 38 0:31 / /sys/fs/cgroup/blkio rw,nosuid,nodev,noexec,relatime shared:19 - cgroup cgroup rw,blkio
42 39 0:32 / /sys/fs/cgroup/perf_event rw,nosuid,nodev,noexec,relatime shared:20 - cgroup cgroup rw,perf_event
43 40 0:33 / /proc/sys/fs/binfmt_misc rw,relatime shared:21 - systemd-1 autofs rw,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct
44 41 0:34 / /dev/mqueue rw,relatime shared:22 - mqueue mqueue rw
45 42 0:35 / /sys/kernel/debug rw,relatime shared:23 - debugfs debugfs rw
46 43 0:36 / /dev/hugepages rw,relatime shared:24 - hugetlbfs hugetlbfs rw
47 44 0:37 / /sys/fs/fuse/connections rw,relatime shared:25 - fusectl fusectl rw
48 45 260:3 / /boot rw,relatime shared:92 - ext2 /dev/sda3 rw
49 46 0:39 / /run/rpc_pipefs rw,relatime shared:27 - rpc_pipefs rpc_pipefs rw
265 37 0:41 / /proc/sys/fs/binfmt_misc rw,nosuid,nodev,noexec,relatime shared:94 - binfmt_misc binfmt_misc rw
3002 28 0:79 / /run/user/1000 rw,nosuid,nodev,relatime shared:1225 - tmpfs tmpfs rw,size=1603436k,nr_inodes=400859,mode=700,uid=1000,gid=1000
3147 3002 0:81 / /run/user/1000/gvfs rw,nosuid,nodev,relatime shared:1290 - fuse.gvfsd-fuse gvfsd-fuse rw,user_id=1000,group_id=1000
3148 3003 260:0 / /var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore]\040bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk rw,relatime shared:31 - ext4 /dev/sda rw,data=ordered
3149 3004 260:0 / /var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore]\011bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk rw,relatime shared:32 - ext4 /dev/sda rw,data=ordered

View file

@ -1,32 +0,0 @@
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=10240k,nr_inodes=1008585,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,relatime,size=1617716k,mode=755 0 0
/dev/dm-2 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/sda3 /boot ext2 rw,relatime 0 0
rpc_pipefs /run/rpc_pipefs rpc_pipefs rw,relatime 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
tmpfs /run/user/1000 tmpfs rw,nosuid,nodev,relatime,size=808860k,mode=700,uid=1000,gid=1000 0 0
gvfsd-fuse /run/user/1000/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sda /var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore]\040bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk ext4 rw,relatime,data=ordered 0 0
/dev/sda /var/lib/kubelet/plugins/kubernetes.io/vsphere-volume/mounts/[vsanDatastore]\011bafb9e5a-8856-7e6c-699c-801844e77a4a/kubernetes-dynamic-pvc-3eba5bba-48a3-11e8-89ab-005056b92113.vmdk ext4 rw,relatime,data=ordered 0 0

View file

@ -1,4 +1,4 @@
TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts PruneCalled RcvPruned OfoPruned OutOfWindowIcmps LockDroppedIcmps ArpFilter TW TWRecycled TWKilled PAWSPassive PAWSActive PAWSEstab DelayedACKs DelayedACKLocked DelayedACKLost ListenOverflows ListenDrops TCPPrequeued TCPDirectCopyFromBacklog TCPDirectCopyFromPrequeue TCPPrequeueDropped TCPHPHits TCPHPHitsToUser TCPPureAcks TCPHPAcks TCPRenoRecovery TCPSackRecovery TCPSACKReneging TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLoss TCPLostRetransmit TCPRenoFailures TCPSackFailures TCPLossFailures TCPFastRetrans TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts TCPRenoRecoveryFail TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory TCPAbortOnTimeout TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures TCPSACKDiscard TCPDSACKIgnoredOld TCPDSACKIgnoredNoUndo TCPSpuriousRTOs TCPMD5NotFound TCPMD5Unexpected TCPSackShifted TCPSackMerged TCPSackShiftFallback TCPBacklogDrop TCPMinTTLDrop TCPDeferAcceptDrop IPReversePathFilter TCPTimeWaitOverflow TCPReqQFullDoCookies TCPReqQFullDrop TCPChallengeACK TCPSYNChallenge
TcpExt: 0 0 2 0 0 0 0 0 0 0 388812 0 0 0 0 6 102471 17 9 0 0 80568 0 168808 0 4471289 26 1433940 3744565 0 1 0 0 0 0 0 0 0 0 48 0 0 0 1 0 1 0 1 115 0 0 0 0 9 0 5 0 41 4 0 0 0 0 0 0 0 1 0 0 0 0 2 5 0 0 0 0 0 0 0 2 2
TcpExt: SyncookiesSent SyncookiesRecv SyncookiesFailed EmbryonicRsts PruneCalled RcvPruned OfoPruned OutOfWindowIcmps LockDroppedIcmps ArpFilter TW TWRecycled TWKilled PAWSPassive PAWSActive PAWSEstab DelayedACKs DelayedACKLocked DelayedACKLost ListenOverflows ListenDrops TCPPrequeued TCPDirectCopyFromBacklog TCPDirectCopyFromPrequeue TCPPrequeueDropped TCPHPHits TCPHPHitsToUser TCPPureAcks TCPHPAcks TCPRenoRecovery TCPSackRecovery TCPSACKReneging TCPFACKReorder TCPSACKReorder TCPRenoReorder TCPTSReorder TCPFullUndo TCPPartialUndo TCPDSACKUndo TCPLossUndo TCPLoss TCPLostRetransmit TCPRenoFailures TCPSackFailures TCPLossFailures TCPFastRetrans TCPForwardRetrans TCPSlowStartRetrans TCPTimeouts TCPRenoRecoveryFail TCPSackRecoveryFail TCPSchedulerFailed TCPRcvCollapsed TCPDSACKOldSent TCPDSACKOfoSent TCPDSACKRecv TCPDSACKOfoRecv TCPAbortOnData TCPAbortOnClose TCPAbortOnMemory TCPAbortOnTimeout TCPAbortOnLinger TCPAbortFailed TCPMemoryPressures TCPSACKDiscard TCPDSACKIgnoredOld TCPDSACKIgnoredNoUndo TCPSpuriousRTOs TCPMD5NotFound TCPMD5Unexpected TCPSackShifted TCPSackMerged TCPSackShiftFallback TCPBacklogDrop TCPMinTTLDrop TCPDeferAcceptDrop IPReversePathFilter TCPTimeWaitOverflow TCPReqQFullDoCookies TCPReqQFullDrop TCPChallengeACK TCPSYNChallenge TCPOFOQueue TCPRcvQDrop
TcpExt: 0 0 2 0 0 0 0 0 0 0 388812 0 0 0 0 6 102471 17 9 0 0 80568 0 168808 0 4471289 26 1433940 3744565 0 1 0 0 0 0 0 0 0 0 48 0 0 0 1 0 1 0 1 115 0 0 0 0 9 0 5 0 41 4 0 0 0 0 0 0 0 1 0 0 0 0 2 5 0 0 0 0 0 0 0 2 2 42 131
IpExt: InNoRoutes InTruncatedPkts InMcastPkts OutMcastPkts InBcastPkts OutBcastPkts InOctets OutOctets InMcastOctets OutMcastOctets InBcastOctets OutBcastOctets
IpExt: 0 0 0 0 0 0 6286396970 2786264347 0 0 0 0

View file

@ -2,4 +2,4 @@ net 70 70 69 45
rpc 1218785755 374636 1218815394
proc2 18 16 57 74 52 71 73 45 86 0 52 83 61 17 53 50 23 70 82
proc3 22 0 1061909262 48906 4077635 117661341 5 29391916 2570425 2993289 590 0 0 7815 15 1130 0 3983 92385 13332 2 1 23729
proc4 48 98 51 54 83 85 23 24 1 28 73 68 83 12 84 39 68 59 58 88 29 74 69 96 21 84 15 53 86 54 66 56 97 36 49 32 85 81 11 58 32 67 13 28 35 90 1 26 0
proc4 48 98 51 54 83 85 23 24 1 28 73 68 83 12 84 39 68 59 58 88 29 74 69 96 21 84 15 53 86 54 66 56 97 36 49 32 85 81 11 58 32 67 13 28 35 1 90 26 0

View file

@ -9,3 +9,4 @@ proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2
proc3 22 2 112 0 2719 111 0 0 0 0 0 0 0 0 0 0 0 27 216 0 2 1 0
proc4 2 2 10853
proc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
wdeleg_getattr 15

View file

@ -0,0 +1,28 @@
XfrmInError 1
XfrmInBufferError 2
XfrmInHdrError 4
XfrmInNoStates 3
XfrmInStateProtoError 40
XfrmInStateModeError 100
XfrmInStateSeqError 6000
XfrmInStateExpired 7
XfrmInStateMismatch 23451
XfrmInStateInvalid 55555
XfrmInTmplMismatch 51
XfrmInNoPols 65432
XfrmInPolBlock 100
XfrmInPolError 10000
XfrmOutError 1000000
XfrmOutBundleGenError 43321
XfrmOutBundleCheckError 555
XfrmOutNoStates 869
XfrmOutStateProtoError 4542
XfrmOutStateModeError 8
XfrmOutStateSeqError 543
XfrmOutStateExpired 565
XfrmOutPolBlock 43456
XfrmOutPolDead 7656
XfrmOutPolError 1454
XfrmFwdHdrError 6654
XfrmOutStateInvalid 28765
XfrmAcquireError 24532

View file

@ -1 +1,2 @@
some avg10=0.00 avg60=0.00 avg300=0.00 total=14036781
full avg10=0.00 avg60=0.00 avg300=0.00 total=0

View file

@ -0,0 +1 @@
full avg10=0.00 avg60=0.00 avg300=0.00 total=8494

View file

@ -1,93 +1,94 @@
6 1 0x01 91 4368 5266997922 97951858082072
name type data
hits 4 8772612
misses 4 604635
anon_evictable_data 4 0
anon_evictable_metadata 4 0
anon_size 4 1917440
arc_loaned_bytes 4 0
arc_meta_limit 4 6275982336
arc_meta_max 4 449286096
arc_meta_min 4 16777216
arc_meta_used 4 308103632
arc_need_free 4 0
arc_no_grow 4 0
arc_prune 4 0
arc_sys_free 4 261496832
arc_tempreserve 4 0
c 4 1643208777
c_max 4 8367976448
c_min 4 33554432
data_size 4 1295836160
deleted 4 60403
demand_data_hits 4 7221032
demand_data_misses 4 73300
demand_metadata_hits 4 1464353
demand_metadata_misses 4 498170
prefetch_data_hits 4 3615
prefetch_data_misses 4 17094
prefetch_metadata_hits 4 83612
prefetch_metadata_misses 4 16071
mru_hits 4 855535
mru_ghost_hits 4 21100
mfu_hits 4 7829854
mfu_ghost_hits 4 821
deleted 4 60403
mutex_miss 4 2
evict_skip 4 2265729
evict_not_enough 4 680
duplicate_buffers 4 0
duplicate_buffers_size 4 0
duplicate_reads 4 0
evict_l2_cached 4 0
evict_l2_eligible 4 8992514560
evict_l2_ineligible 4 992552448
evict_l2_skip 4 0
evict_not_enough 4 680
evict_skip 4 2265729
hash_chain_max 4 3
hash_chains 4 412
hash_collisions 4 50564
hash_elements 4 42359
hash_elements_max 4 88245
hash_collisions 4 50564
hash_chains 4 412
hash_chain_max 4 3
p 4 516395305
c 4 1643208777
c_min 4 33554432
c_max 4 8367976448
size 4 1603939792
hdr_size 4 16361080
data_size 4 1295836160
metadata_size 4 175298560
other_size 4 116443992
anon_size 4 1917440
anon_evictable_data 4 0
anon_evictable_metadata 4 0
mru_size 4 402593792
mru_evictable_data 4 278091264
mru_evictable_metadata 4 18606592
mru_ghost_size 4 999728128
mru_ghost_evictable_data 4 883765248
mru_ghost_evictable_metadata 4 115962880
mfu_size 4 1066623488
mfu_evictable_data 4 1017613824
mfu_evictable_metadata 4 9163776
mfu_ghost_size 4 104936448
mfu_ghost_evictable_data 4 96731136
mfu_ghost_evictable_metadata 4 8205312
l2_hits 4 0
l2_misses 4 0
hits 4 8772612
l2_abort_lowmem 4 0
l2_asize 4 0
l2_cdata_free_on_write 4 0
l2_cksum_bad 4 0
l2_compress_failures 4 0
l2_compress_successes 4 0
l2_compress_zeros 4 0
l2_evict_l1cached 4 0
l2_evict_lock_retry 4 0
l2_evict_reading 4 0
l2_feeds 4 0
l2_rw_clash 4 0
l2_free_on_write 4 0
l2_hdr_size 4 0
l2_hits 4 0
l2_io_error 4 0
l2_misses 4 0
l2_read_bytes 4 0
l2_rw_clash 4 0
l2_size 4 0
l2_write_bytes 4 0
l2_writes_sent 4 0
l2_writes_done 4 0
l2_writes_error 4 0
l2_writes_lock_retry 4 0
l2_evict_lock_retry 4 0
l2_evict_reading 4 0
l2_evict_l1cached 4 0
l2_free_on_write 4 0
l2_cdata_free_on_write 4 0
l2_abort_lowmem 4 0
l2_cksum_bad 4 0
l2_io_error 4 0
l2_size 4 0
l2_asize 4 0
l2_hdr_size 4 0
l2_compress_successes 4 0
l2_compress_zeros 4 0
l2_compress_failures 4 0
memory_throttle_count 4 0
duplicate_buffers 4 0
duplicate_buffers_size 4 0
duplicate_reads 4 0
l2_writes_sent 4 0
memory_available_bytes 3 -922337203685477580
memory_direct_count 4 542
memory_indirect_count 4 3006
arc_no_grow 4 0
arc_tempreserve 4 0
arc_loaned_bytes 4 0
arc_prune 4 0
arc_meta_used 4 308103632
arc_meta_limit 4 6275982336
arc_meta_max 4 449286096
arc_meta_min 4 16777216
arc_need_free 4 0
arc_sys_free 4 261496832
memory_throttle_count 4 0
metadata_size 4 175298560
mfu_evictable_data 4 1017613824
mfu_evictable_metadata 4 9163776
mfu_ghost_evictable_data 4 96731136
mfu_ghost_evictable_metadata 4 8205312
mfu_ghost_hits 4 821
mfu_ghost_size 4 104936448
mfu_hits 4 7829854
mfu_size 4 1066623488
misses 4 604635
mru_evictable_data 4 278091264
mru_evictable_metadata 4 18606592
mru_ghost_evictable_data 4 883765248
mru_ghost_evictable_metadata 4 115962880
mru_ghost_hits 4 21100
mru_ghost_size 4 999728128
mru_hits 4 855535
mru_size 4 402593792
mutex_miss 4 2
other_size 4 116443992
p 4 516395305
prefetch_data_hits 4 3615
prefetch_data_misses 4 17094
prefetch_metadata_hits 4 83612
prefetch_metadata_misses 4 16071
size 4 1603939792

View file

@ -0,0 +1,3 @@
12 3 0x00 1 80 79205351707403 395818011156865
nread nwritten reads writes wtime wlentime wupdate rtime rlentime rupdate wcnt rcnt
1884160 3206144 22 132 7155162 104112268 79210489694949 24168078 104112268 79210489849220 0 0

View file

@ -0,0 +1,9 @@
23 1 0x01 7 2160 221578688875 6665999035587
name type data
dataset_name 7 pool3
writes 4 0
nwritten 4 0
reads 4 0
nread 4 0
nunlinks 4 0
nunlinked 4 0

View file

@ -0,0 +1,9 @@
24 1 0x01 7 2160 221611904716 7145015038451
name type data
dataset_name 7 pool3/dataset with space
writes 4 4
nwritten 4 12302
reads 4 2
nread 4 28
nunlinks 4 3
nunlinked 4 3

View file

@ -0,0 +1 @@
ONLINE

File diff suppressed because it is too large Load diff

View file

@ -8,4 +8,4 @@ node_textfile_mtime_seconds{file="fixtures/textfile/metrics_merge_different_help
node_textfile_mtime_seconds{file="fixtures/textfile/metrics_merge_different_help/b.prom"} 1
# HELP node_textfile_scrape_error 1 if there was an error opening or reading a file, 0 otherwise
# TYPE node_textfile_scrape_error gauge
node_textfile_scrape_error 0
node_textfile_scrape_error 1

View file

@ -0,0 +1,6 @@
29 1 259:0 / /host rw,seclabel,relatime,data=ordered shared:1 - ext4 /dev/nvme1n0 rw
30 1 260:0 / /host/media/volume1 rw,seclabel,relatime,data=ordered shared:1 - ext4 /dev/nvme1n1 rw
31 1 261:0 / /host/media/volume2 rw,seclabel,relatime,data=ordered shared:1 - ext4 /dev/nvme1n2 rw
31 26 0:26 / /dev/shm rw,nosuid,nodev shared:4 - tmpfs tmpfs rw,inode64
32 28 0:27 / /run/lock rw,nosuid,nodev,noexec,relatime shared:6 - tmpfs tmpfs rw,size=5120k,inode64
33 24 0:28 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:9 - cgroup2 cgroup2 rw

View file

@ -1,6 +0,0 @@
/dev/nvme1n0 /host ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/nvme1n1 /host/media/volume1 ext4 rw,seclabel,relatime,data=ordered 0 0
/dev/nvme1n2 /host/media/volume2 ext4 rw,seclabel,relatime,data=ordered 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0

View file

@ -1 +0,0 @@
rootfs / rootfs rw 0 0

View file

@ -0,0 +1 @@
29 1 259:2 / / rw,relatime shared:1 - ext4 /dev/nvme0n1p2 rw,errors=remount-ro

View file

@ -18,19 +18,25 @@ package collector
import (
"errors"
"fmt"
"log/slog"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/alecthomas/kingpin/v2"
"github.com/prometheus/client_golang/prometheus"
"golang.org/x/sys/unix"
)
var (
collectorHWmonChipInclude = kingpin.Flag("collector.hwmon.chip-include", "Regexp of hwmon chip to include (mutually exclusive to device-exclude).").String()
collectorHWmonChipExclude = kingpin.Flag("collector.hwmon.chip-exclude", "Regexp of hwmon chip to exclude (mutually exclusive to device-include).").String()
collectorHWmonSensorInclude = kingpin.Flag("collector.hwmon.sensor-include", "Regexp of hwmon sensor to include (mutually exclusive to sensor-exclude).").String()
collectorHWmonSensorExclude = kingpin.Flag("collector.hwmon.sensor-exclude", "Regexp of hwmon sensor to exclude (mutually exclusive to sensor-include).").String()
hwmonInvalidMetricChars = regexp.MustCompile("[^a-z0-9:_]")
hwmonFilenameFormat = regexp.MustCompile(`^(?P<type>[^0-9]+)(?P<id>[0-9]*)?(_(?P<property>.+))?$`)
hwmonLabelDesc = []string{"chip", "sensor"}
@ -38,7 +44,7 @@ var (
hwmonSensorTypes = []string{
"vrm", "beep_enable", "update_interval", "in", "cpu", "fan",
"pwm", "temp", "curr", "power", "energy", "humidity",
"intrusion",
"intrusion", "freq",
}
)
@ -47,13 +53,20 @@ func init() {
}
type hwMonCollector struct {
logger log.Logger
deviceFilter deviceFilter
sensorFilter deviceFilter
logger *slog.Logger
}
// NewHwMonCollector returns a new Collector exposing /sys/class/hwmon stats
// (similar to lm-sensors).
func NewHwMonCollector(logger log.Logger) (Collector, error) {
return &hwMonCollector{logger}, nil
func NewHwMonCollector(logger *slog.Logger) (Collector, error) {
return &hwMonCollector{
logger: logger,
deviceFilter: newDeviceFilter(*collectorHWmonChipExclude, *collectorHWmonChipInclude),
sensorFilter: newDeviceFilter(*collectorHWmonSensorExclude, *collectorHWmonSensorInclude),
}, nil
}
func cleanMetricName(name string) string {
@ -95,6 +108,9 @@ func sysReadFile(file string) ([]byte, error) {
if err != nil {
return nil, err
}
if n < 0 {
return nil, fmt.Errorf("failed to read file: %q, read returned negative bytes value: %d", file, n)
}
return b[:n], nil
}
@ -154,6 +170,11 @@ func (c *hwMonCollector) updateHwmon(ch chan<- prometheus.Metric, dir string) er
return err
}
if c.deviceFilter.ignored(hwmonName) {
c.logger.Debug("ignoring hwmon chip", "chip", hwmonName)
return nil
}
data := make(map[string]map[string]string)
err = collectSensorData(dir, data)
if err != nil {
@ -188,6 +209,15 @@ func (c *hwMonCollector) updateHwmon(ch chan<- prometheus.Metric, dir string) er
// Format all sensors.
for sensor, sensorData := range data {
// Filtering for sensors is done on concatenated device name and sensor name
// separated by a semicolon. This allows for excluding or including of specific
// sensors on specific devices. For example, to exclude the sensor "temp3" on
// the device "platform_coretemp_0", use "platform_coretemp_0;temp3"
if c.sensorFilter.ignored(hwmonName + ";" + sensor) {
c.logger.Debug("ignoring sensor", "sensor", sensor)
continue
}
_, sensorType, _, _ := explodeSensorFilename(sensor)
labels := []string{hwmonName, sensor}
@ -327,6 +357,15 @@ func (c *hwMonCollector) updateHwmon(ch chan<- prometheus.Metric, dir string) er
continue
}
if sensorType == "freq" && element == "input" {
if label, ok := sensorData["label"]; ok {
sensorLabel := cleanMetricName(label)
desc := prometheus.NewDesc(name+"_freq_mhz", "Hardware monitor for GPU frequency in MHz", hwmonLabelDesc, nil)
ch <- prometheus.MustNewConstMetric(
desc, prometheus.GaugeValue, parsedValue/1000000.0, append(labels[:len(labels)-1], sensorLabel)...)
}
continue
}
// fallback, just dump the metric as is
desc := prometheus.NewDesc(name, "Hardware monitor "+sensorType+" element "+element, hwmonLabelDesc, nil)
@ -423,16 +462,20 @@ func (c *hwMonCollector) Update(ch chan<- prometheus.Metric) error {
hwmonFiles, err := os.ReadDir(hwmonPathName)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
level.Debug(c.logger).Log("msg", "hwmon collector metrics are not available for this system")
c.logger.Debug("hwmon collector metrics are not available for this system")
return ErrNoData
}
return err
}
var lastErr error
for _, hwDir := range hwmonFiles {
hwmonXPathName := filepath.Join(hwmonPathName, hwDir.Name())
fileInfo, _ := os.Lstat(hwmonXPathName)
fileInfo, err := os.Lstat(hwmonXPathName)
if err != nil {
continue
}
if fileInfo.Mode()&os.ModeSymlink > 0 {
fileInfo, err = os.Stat(hwmonXPathName)
@ -445,10 +488,10 @@ func (c *hwMonCollector) Update(ch chan<- prometheus.Metric) error {
continue
}
if lastErr := c.updateHwmon(ch, hwmonXPathName); lastErr != nil {
err = lastErr
if err = c.updateHwmon(ch, hwmonXPathName); err != nil {
lastErr = err
}
}
return err
return lastErr
}

View file

@ -11,19 +11,18 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build linux && !noinfiniband
// +build linux,!noinfiniband
//go:build !noinfiniband
// +build !noinfiniband
package collector
import (
"errors"
"fmt"
"log/slog"
"os"
"strconv"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/procfs/sysfs"
)
@ -31,7 +30,7 @@ import (
type infinibandCollector struct {
fs sysfs.FS
metricDescs map[string]*prometheus.Desc
logger log.Logger
logger *slog.Logger
subsystem string
}
@ -40,7 +39,7 @@ func init() {
}
// NewInfiniBandCollector returns a new Collector exposing InfiniBand stats.
func NewInfiniBandCollector(logger log.Logger) (Collector, error) {
func NewInfiniBandCollector(logger *slog.Logger) (Collector, error) {
var i infinibandCollector
var err error
@ -116,7 +115,7 @@ func (c *infinibandCollector) Update(ch chan<- prometheus.Metric) error {
devices, err := c.fs.InfiniBandClass()
if err != nil {
if errors.Is(err, os.ErrNotExist) {
level.Debug(c.logger).Log("msg", "infiniband statistics not found, skipping")
c.logger.Debug("infiniband statistics not found, skipping")
return ErrNoData
}
return fmt.Errorf("error obtaining InfiniBand class info: %w", err)

View file

@ -18,21 +18,31 @@
package collector
import (
"github.com/go-kit/log"
"log/slog"
"github.com/alecthomas/kingpin/v2"
"github.com/prometheus/client_golang/prometheus"
)
type interruptsCollector struct {
desc typedDesc
logger log.Logger
logger *slog.Logger
nameFilter deviceFilter
includeZeros bool
}
func init() {
registerCollector("interrupts", defaultDisabled, NewInterruptsCollector)
}
var (
interruptsInclude = kingpin.Flag("collector.interrupts.name-include", "Regexp of interrupts name to include (mutually exclusive to --collector.interrupts.name-exclude).").String()
interruptsExclude = kingpin.Flag("collector.interrupts.name-exclude", "Regexp of interrupts name to exclude (mutually exclusive to --collector.interrupts.name-include).").String()
interruptsIncludeZeros = kingpin.Flag("collector.interrupts.include-zeros", "Include interrupts that have a zero value").Default("true").Bool()
)
// NewInterruptsCollector returns a new Collector exposing interrupts stats.
func NewInterruptsCollector(logger log.Logger) (Collector, error) {
func NewInterruptsCollector(logger *slog.Logger) (Collector, error) {
return &interruptsCollector{
desc: typedDesc{prometheus.NewDesc(
namespace+"_interrupts_total",
@ -40,5 +50,7 @@ func NewInterruptsCollector(logger log.Logger) (Collector, error) {
interruptLabelNames, nil,
), prometheus.CounterValue},
logger: logger,
nameFilter: newDeviceFilter(*interruptsExclude, *interruptsInclude),
includeZeros: *interruptsIncludeZeros,
}, nil
}

View file

@ -39,10 +39,19 @@ func (c *interruptsCollector) Update(ch chan<- prometheus.Metric) (err error) {
}
for name, interrupt := range interrupts {
for cpuNo, value := range interrupt.values {
filterName := name + ";" + interrupt.info + ";" + interrupt.devices
if c.nameFilter.ignored(filterName) {
c.logger.Debug("ignoring interrupt name", "filter_name", filterName)
continue
}
fv, err := strconv.ParseFloat(value, 64)
if err != nil {
return fmt.Errorf("invalid value %s in interrupts: %w", value, err)
}
if !c.includeZeros && fv == 0.0 {
c.logger.Debug("ignoring interrupt with zero value", "filter_name", filterName, "cpu", cpuNo)
continue
}
ch <- c.desc.mustNewConstMetric(fv, strconv.Itoa(cpuNo), name, interrupt.info, interrupt.devices)
}
}

View file

@ -11,6 +11,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !nointerrupts
// +build !nointerrupts
package collector
import (

Some files were not shown because too many files have changed in this diff Show more