1
0
mirror of https://github.com/prometheus/node_exporter.git synced 2026-10-23 08:09:06 +03:00

2571 Commits

Author SHA1 Message Date
Ben Kochie
b9e296a911 chore: Document ErrNoData policy (#3864)
Add some notes in the README and CONTRIBUTING docs about collectors
that are unable to find _any_ data.

This policy was decided in https://github.com/prometheus/node_exporter/issues/1323.

Signed-off-by: Ben Kochie <superq@gmail.com>
2026-10-22 09:16:35 +02:00
Sai Pisey
2354590e19 fix(collector): keep collecting temperatures without CPU power status (#3767)
* fix(collector): keep collecting temperatures without CPU power status

Apple Silicon does not implement IOPMCopyCPUPowerStatus, so
fetchCPUPowerStatus returns kIOReturnNotFound there. Update returned that
error straight away, which aborted the collector before updateTemperatures
ran, so no temperature metrics were collected at all. The error was also
not ErrNoData, so it was logged at error level on every scrape.

On an M5 Pro, Update emitted 0 metrics and failed, while updateTemperatures
on its own returned 52 temperature metrics.

Treat kIOReturnNotFound as a system that does not report CPU power status:
skip the three CPU power metrics, log at debug level and carry on to the
temperature sensors. Any other non-success return code is still returned as
an error. Systems that do report CPU power status are unaffected.

This does not make the CPU power metrics available on Apple Silicon, since
the underlying API provides no data. It only stops their absence from
suppressing the temperature metrics.

Adds a regression test covering the case.

Signed-off-by: SaiPisey2 <piseysai0202@gmail.com>

* fix(collector): disambiguate colliding thermal sensor names

Collecting temperatures on Apple Silicon surfaced a second problem that
was previously unreachable, because Update returned before
updateTemperatures ever ran.

A sensor is labelled with its IOHID "Product" property, which is not
unique. On an M5 Pro, 52 temperature-reporting services carry only 17
distinct product names, so the registry rejects the colliding samples and
logs an error on every scrape.

The collisions are of two kinds. Six "gas gauge battery" services are
distinct sensors that merely share a name; they have distinct
LocationIDs. The "PMU tdie*" services come in threes that share both the
name and the LocationID, and report readings that differ by a few tenths
of a degree, so they are separate sensing elements rather than the same
one listed repeatedly. Dropping either kind loses readings.

Following the approach taken for hwmon in #3646, read all sensors first,
then qualify a name shared by several services with its location, falling
back to the service registry ID when the location does not separate them
either. Registry IDs are unique per service, which the OS guarantees and
which held for every service observed here. Names that do not collide are
left untouched.

The endpoint now reports all 52 readings with unique label sets and no
gather errors, where before the change 35 of them were rejected.

Also update collector/fixtures/e2e-output-darwin.txt for
node_scrape_collector_success{collector="thermal"}, which is now 1
because the collector no longer fails.

resolveSensorNames is kept free of cgo so that the labelling rules are
covered by table-driven tests, which matters because the CI runner
reports no thermal sensors at all.

Signed-off-by: SaiPisey2 <piseysai0202@gmail.com>

* test(collector): satisfy the stricter linters in the thermal test

Drop a no-op drain of an already closed channel and build the metric key
with a strings.Builder.

Signed-off-by: SaiPisey2 <piseysai0202@gmail.com>

---------

Signed-off-by: SaiPisey2 <piseysai0202@gmail.com>
2026-10-21 21:32:57 +02:00
Rene Treffer
153881bdae Add resctrl collector (#3797)
* Add resctrl collector

Expose the Linux resctrl monitoring counters (Intel RDT, AMD PQoS,
ARM MPAM): per L3 domain memory bandwidth (mbm_total_bytes,
mbm_local_bytes) and last level cache occupancy (llc_occupancy).
Parsing is done by the procfs resctrlfs package (procfs v0.22.0).

The collector is disabled by default because the resctrl filesystem
must be mounted first (mount -t resctrl resctrl /sys/fs/resctrl). The
mountpoint is configurable via --collector.resctrl.path.

Counters a CPU does not support (for example mbm_local_bytes on Arm
MPAM) or that read "Unavailable" are skipped per sample. The hardware
counters wrap; Prometheus treats the wrap as a counter reset, so no
correction is applied.

Signed-off-by: René Treffer <treffer@measite.de>

* Describe steps needed to use the resctrl exporter

Signed-off-by: René Treffer <treffer@measite.de>

* Shorten resctrl documentation

Signed-off-by: René Treffer <treffer@measite.de>

---------

Signed-off-by: René Treffer <treffer@measite.de>
2026-10-20 10:39:09 +02:00
Arun Srinivasan
37ec35f698 collector: add tainted collector for /proc/sys/kernel/tainted (#3745)
* collector: add tainted collector for /proc/sys/kernel/tainted

Signed-off-by: Arun S <arun.srinivasan@flipkart.com>

* go.mod: bump procfs to pick up KernelTainted() (#844)

Signed-off-by: Arun S <arun.srinivasan@flipkart.com>

* go.mod: bump procfs to pick up linux build tag fix (#847)

Signed-off-by: Arun S <arun.srinivasan@flipkart.com>

* collector/tainted: use year-less copyright header

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Arun S <arun.srinivasan@flipkart.com>

* collector/tainted: address review feedback and document collector
Store procfs.FS on the collector instead of opening it each scrape.
Add matching !notainted build tag on the implementation file.
Document the tainted collector and node_kernel_tainted metrics in README.

Signed-off-by: Arun S <arun.srinivasan@flipkart.com>

* README: drop tainted collector section, keep table entry only

Signed-off-by: Arun S <arun.srinivasan@flipkart.com>

* go.mod: align with master after merge (procfs v0.22.0, toolkit v0.19.0)

Fixes build and BSD e2e failures caused by stale dependency versions
left over from a bad merge.

Signed-off-by: Arun S <arun.srinivasan@flipkart.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Signed-off-by: Arun S <arun.srinivasan@flipkart.com>
Signed-off-by: Arun Srinivasan <arunpiter@gmail.com>
Co-authored-by: Arun S <arun.srinivasan@flipkart.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-15 14:46:19 -03:00
dependabot[bot]
ec12b97885 build(deps): bump github.com/prometheus/common (#3856)
Bumps the prometheus group with 1 update: [github.com/prometheus/common](https://github.com/prometheus/common).


Updates `github.com/prometheus/common` from 0.72.0 to 0.72.1
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/common/compare/v0.72.0...v0.72.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 14:49:05 +02:00
dependabot[bot]
1a5616a599 build(deps): bump github.com/prometheus/client_golang from 1.24.1 to 1.25.0 in the prometheus group (#3854)
Bumps the prometheus group with 1 update: [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang).


Updates `github.com/prometheus/client_golang` from 1.24.1 to 1.25.0
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.25.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.24.1...v1.25.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-14 10:05:54 +02:00
PrometheusBot
638ec72c3a Update common Prometheus files (#3809)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2026-10-10 08:49:03 +02:00
dependabot[bot]
1271bc2442 build(deps): bump github.com/beevik/ntp from 1.5.0 to 1.6.0 (#3836)
Bumps [github.com/beevik/ntp](https://github.com/beevik/ntp) from 1.5.0 to 1.6.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/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/beevik/ntp
  dependency-version: 1.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>
2026-10-07 15:19:56 +02:00
dependabot[bot]
15f45ee82a build(deps): bump the prometheus group across 1 directory with 3 updates (#3835)
Bumps the prometheus group with 3 updates in the / directory: [github.com/prometheus/client_model](https://github.com/prometheus/client_model), [github.com/prometheus/common](https://github.com/prometheus/common) and [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit).


Updates `github.com/prometheus/client_model` from 0.6.2 to 0.6.3
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](https://github.com/prometheus/client_model/compare/v0.6.2...v0.6.3)

Updates `github.com/prometheus/common` from 0.70.1 to 0.72.0
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/common/compare/v0.70.1...v0.72.0)

Updates `github.com/prometheus/exporter-toolkit` from 0.19.0 to 0.20.0
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  dependency-version: 0.6.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prometheus
- dependency-name: github.com/prometheus/common
  dependency-version: 0.72.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-version: 0.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-07 12:03:41 +02:00
Ben Kochie
25fbb7c67e Bump minimum Go version (#3846)
* Bump minimum Go version

Update to Go 1.26 and fix linting issues.

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

* Bump promtool version.

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

---------

Signed-off-by: Ben Kochie <superq@gmail.com>
2026-10-07 11:53:50 +02:00
Ben Kochie
baf644aaa8 Bump vmactions/netbsd-vm (#3847)
Update vmactions/netbsd-vm and update fixtures.

Signed-off-by: Ben Kochie <superq@gmail.com>
2026-10-07 11:35:50 +02:00
Ben Kochie
0af7b7abba Update Go (#3843)
* Update Go build to 1.27.x.
* Enable `gofumpt` formatter.
* Sync golangci-lint from Prometheus.
* Apply lint/format fixes.

Signed-off-by: Ben Kochie <superq@gmail.com>
2026-10-07 10:29:59 +02:00
Ben Kochie
0217656604 Use upstream default DOCKER_ARCHS (#3845)
Use the default DOCKER_ARCHS from Makefile.common.

Signed-off-by: Ben Kochie <superq@gmail.com>
2026-10-07 10:29:22 +02:00
Ben Kochie
f31a5589b6 Update FreeBSD release (#3844)
* Update FreeBSD release

Use lastest major version for FreeBSD.

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

* Fix FreeBSD end-to-end test

Add `node_zfs_arcstats_c_min_bytes` to non-deterministic list.

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

---------

Signed-off-by: Ben Kochie <superq@gmail.com>
2026-10-07 10:19:53 +02:00
dependabot[bot]
36c267f5af build(deps): bump the promci group with 2 updates (#3837)
Bumps the promci group with 2 updates: [prometheus/promci/publish_main](https://github.com/prometheus/promci) and [prometheus/promci/publish_release](https://github.com/prometheus/promci).


Updates `prometheus/promci/publish_main` from 0.9.0 to 0.10.0
- [Release notes](https://github.com/prometheus/promci/releases)
- [Commits](370e8c15dc...872d318d09)

Updates `prometheus/promci/publish_release` from 0.9.0 to 0.10.0
- [Release notes](https://github.com/prometheus/promci/releases)
- [Commits](370e8c15dc...872d318d09)

---
updated-dependencies:
- dependency-name: prometheus/promci/publish_main
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: promci
- dependency-name: prometheus/promci/publish_release
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: promci
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-06 10:22:08 +02:00
dependabot[bot]
5a57d244ab build(deps): bump vmactions/dragonflybsd-vm from 1.3.3 to 1.3.4 (#3841)
Bumps [vmactions/dragonflybsd-vm](https://github.com/vmactions/dragonflybsd-vm) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/vmactions/dragonflybsd-vm/releases)
- [Commits](7cd7c9b7f2...4ab776fa9f)

---
updated-dependencies:
- dependency-name: vmactions/dragonflybsd-vm
  dependency-version: 1.3.4
  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>
2026-10-06 10:21:24 +02:00
dependabot[bot]
193b107595 build(deps): bump vmactions/solaris-vm from 1.3.9 to 1.4.1 (#3840)
Bumps [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm) from 1.3.9 to 1.4.1.
- [Release notes](https://github.com/vmactions/solaris-vm/releases)
- [Commits](96d8d976f9...87d3c43651)

---
updated-dependencies:
- dependency-name: vmactions/solaris-vm
  dependency-version: 1.4.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>
2026-10-06 10:20:16 +02:00
dependabot[bot]
db91fc5619 build(deps): bump vmactions/freebsd-vm from 1.5.5 to 1.5.8 (#3839)
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 1.5.5 to 1.5.8.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](f0552d3b69...a2f9a41fa9)

---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
  dependency-version: 1.5.8
  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>
2026-10-06 10:19:55 +02:00
Frederic
60ce437b9c bcache: Fix btree_read_average_duration_seconds unit (#3828)
The kernel reports btree_read_average_duration_us in microseconds, but the
value was scaled as nanoseconds, making the metric 1000x too small.

Signed-off-by: Finomosec <1665799+Finomosec@users.noreply.github.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2026-09-25 15:15:09 +02:00
Rene Treffer
46c4a3c670 e2e: only test disk0 in the Darwin end-to-end test (#3825)
The Darwin end-to-end test scrapes the real macos-latest runner and diffs
the result against collector/fixtures/e2e-output-darwin.txt. We no longer
see disk4 on the nodes and that breaks the e2e tests.

This PR removes the usage of disk4 and the related fixtures:

  -node_disk_read_errors_total{device="disk4"} 0
  -node_disk_read_retries_total{device="disk4"} 0
  -node_disk_write_errors_total{device="disk4"} 0
  -node_disk_write_retries_total{device="disk4"} 0

This PR also adds a dump of the attached interfaces and disks
so we can more easily discover issues in the future.

Signed-off-by: René Treffer <treffer@measite.de>
2026-09-25 14:54:04 +02:00
Maharacha
125a02099c collector/diskstats: add device-mapper backing device info metric (#3676)
* collector/diskstats: add device-mapper backing device info metric

---------

Signed-off-by: Joakim Nyman <joakim.nyman86@gmail.com>
2026-09-21 15:12:05 +02:00
dependabot[bot]
17ddd77c59 build(deps): bump vmactions/solaris-vm from 1.3.8 to 1.3.9 (#3804)
Bumps [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm) from 1.3.8 to 1.3.9.
- [Release notes](https://github.com/vmactions/solaris-vm/releases)
- [Commits](315163f088...96d8d976f9)

---
updated-dependencies:
- dependency-name: vmactions/solaris-vm
  dependency-version: 1.3.9
  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>
2026-09-02 04:11:50 +02:00
dependabot[bot]
28215ec9b5 build(deps): bump vmactions/freebsd-vm from 1.5.0 to 1.5.5 (#3803)
Bumps [vmactions/freebsd-vm](https://github.com/vmactions/freebsd-vm) from 1.5.0 to 1.5.5.
- [Release notes](https://github.com/vmactions/freebsd-vm/releases)
- [Commits](5a72679103...f0552d3b69)

---
updated-dependencies:
- dependency-name: vmactions/freebsd-vm
  dependency-version: 1.5.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>
2026-09-02 04:11:37 +02:00
dependabot[bot]
7a1db0aef8 build(deps): bump vmactions/dragonflybsd-vm from 1.3.1 to 1.3.3 (#3802)
Bumps [vmactions/dragonflybsd-vm](https://github.com/vmactions/dragonflybsd-vm) from 1.3.1 to 1.3.3.
- [Release notes](https://github.com/vmactions/dragonflybsd-vm/releases)
- [Commits](bc8ccbaa09...7cd7c9b7f2)

---
updated-dependencies:
- dependency-name: vmactions/dragonflybsd-vm
  dependency-version: 1.3.3
  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>
2026-09-02 04:11:15 +02:00
dependabot[bot]
4397d50b24 build(deps): bump the promci group with 3 updates (#3801)
Bumps the promci group with 3 updates: [prometheus/promci-setup](https://github.com/prometheus/promci-setup), [prometheus/promci-artifacts/save](https://github.com/prometheus/promci-artifacts) and [prometheus/promci-artifacts/restore](https://github.com/prometheus/promci-artifacts).


Updates `prometheus/promci-setup` from 0.2.1 to 0.2.2
- [Release notes](https://github.com/prometheus/promci-setup/releases)
- [Commits](3e5cd31b34...55bd31fe92)

Updates `prometheus/promci-artifacts/save` from 0.1.0 to 0.1.1
- [Release notes](https://github.com/prometheus/promci-artifacts/releases)
- [Commits](f9a587dbc0...9ca3252d07)

Updates `prometheus/promci-artifacts/restore` from 0.1.0 to 0.1.1
- [Release notes](https://github.com/prometheus/promci-artifacts/releases)
- [Commits](f9a587dbc0...9ca3252d07)

---
updated-dependencies:
- dependency-name: prometheus/promci-setup
  dependency-version: 0.2.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: promci
- dependency-name: prometheus/promci-artifacts/save
  dependency-version: 0.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: promci
- dependency-name: prometheus/promci-artifacts/restore
  dependency-version: 0.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: promci
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-02 04:10:55 +02:00
Sai Pisey
a4e08d1d9a fix(e2e): resolve the Darwin fixture path on bash 3.2 (#3798)
* fix(e2e): resolve the Darwin fixture path on bash 3.2

The per-OS fixture path was built with "${fixture_metrics::-4}". A
negative substring length needs bash 4.2, and macOS still ships bash 3.2,
where the expansion fails, fixture_metrics keeps pointing at the Linux
fixture, and ./end-to-end-test.sh -u run on a Mac overwrites
collector/fixtures/e2e-output.txt with Darwin output.

"${fixture_metrics%.txt}" is equivalent and works on both.

Also strip node_thermal_temperature_celsius along with the other
non-deterministic metrics. Its sensor names and values are per-machine,
so a developer running the suite on real hardware sees the whole sensor
list as a diff. The CI runner reports no thermal sensors, so this makes
no difference there.

Signed-off-by: SaiPisey2 <piseysai0202@gmail.com>

* Apply suggestion from @SuperQ

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

---------

Signed-off-by: SaiPisey2 <piseysai0202@gmail.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2026-08-31 17:26:54 +02:00
dongjiang
23f11778eb ump prometheus/procfs to v0.22.0 (#3799)
Signed-off-by: dongjiang <dongjiang1989@126.com>
2026-08-31 16:27:47 +02:00
neoLsH
794e058b51 netstat: Use procfs parsers for netstat, snmp and snmp6 (#3796)
* netstat: Use procfs parsers for netstat, snmp and snmp6

Replace the hand-written parsers for /proc/net/netstat, /proc/net/snmp
and /proc/net/snmp6 with the parsers from prometheus/procfs
(Proc.Netstat, Proc.Snmp and Proc.Snmp6). The statistics are read via
/proc/self/net, which is equivalent to /proc/net (both are
network-namespace local views of the current process), so the collected
data is unchanged.

Metrics are exposed by iterating the procfs statistics structs, the
same approach the NFS collector uses: fields are *float64 and only the
ones present on the system are exported, matching the previous
behavior. The --collector.netstat.fields flag and the exported metric
names are unchanged; the e2e golden output is identical.

Signed-off-by: neoLsH <43921685+neoLsH@users.noreply.github.com>

* netstat: use explicit package-level metric descriptors

Replace the per-scrape prometheus.NewDesc calls with a pre-built map of
explicit descriptors (netstat_descs_linux.go, generated from the procfs
statistics structs), as requested in review. Collection still reflects over
the procfs structs but looks up the descriptor by "<protocol>_<field>", so
descriptors are allocated once and are source-visible literals for the
AST-based doc generation. Metric names, help strings and types are unchanged.

Signed-off-by: 霏承 <huangleshu.hls@alibaba-inc.com>

* Bump procfs to v0.22.0 to populate legacy TcpExt descriptors

procfs v0.22.0 includes prometheus/procfs#863, which models the 10 legacy
TcpExt counters. With this bump, the explicit descriptors already present in
netstat_descs_linux.go start populating for users whose field regex selects
them, restoring parity with older kernels.

Part of #3796.

Signed-off-by: 霏承 <huangleshu.hls@alibaba-inc.com>

* Add generator and drift test for the netstat descriptor table

netstat_descs_linux.go was previously committed without its generator. Add an
in-repo generator (netstat_descs_gen.go, a build-ignored program run via
GOOS=linux go generate ./collector) that regenerates the explicit descriptor
table from the procfs structs, mirroring the go:generate pattern used elsewhere
in the Prometheus ecosystem.

Add TestNetStatDescsInSync, a drift test that fails if the committed table
diverges from the procfs structs (e.g. after a procfs upgrade) until the table
is regenerated.

Part of #3796.

Signed-off-by: 霏承 <huangleshu.hls@alibaba-inc.com>

---------

Signed-off-by: neoLsH <43921685+neoLsH@users.noreply.github.com>
Signed-off-by: 霏承 <huangleshu.hls@alibaba-inc.com>
2026-08-31 15:29:08 +02:00
Jason Jiang
9a077374d7 docs: clarify Docker rootfs wording (#3653)
Signed-off-by: jcj46548-ux <jcj46548@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2026-08-29 09:54:41 -03:00
Rene Treffer
963cc14f99 Revert dup cpu frequency, add node_cpufreq flag (#3795)
Both cpu_linux and cpufreq export cpu frequencies under the same name.
This makes the metric mutually exclusive.

A previous PR made it possible to enable both which can cause flapping
help texts.

This PR re-introduces mutual-exclusive behavior for the frequencies.
A new flag `collector.cpufreq.enable-cpufreq-prefix` can be used to
migrate all cpufreq metrics to node_cpufreq to avoid the collision.

Signed-off-by: René Treffer <treffer@measite.de>
2026-08-28 18:44:41 +02:00
Nicolas Takashi
baa938bdb5 main: use exporter-toolkit bootstrap runner (#3660)
Refactor node_exporter's entrypoint to build its configuration and
run via the exporter-toolkit bootstrap runner, as groundwork for
making node_exporter easier to embed outside the standalone binary.

Signed-off-by: Nicolas Takashi <nicolas.tcs@hotmail.com>
2026-08-27 04:33:04 -03:00
at-blacknight
6de91dab87 edac: Fix printf-style formatting in slog call (#3759)
The Debug call added in #3734 passes printf verbs and positional arguments to
slog, which does not format them. The format string is logged verbatim and the
arguments are consumed as key/value pairs, so controller and channel numbers
become attribute keys: a duplicate key when the two are equal, and otherwise a
key whose name changes on every iteration. Under --log.format=json that is an
object with a repeated key, and parsers silently drop one of the values. The
csrow number and the error, the two things worth reading, are the only parts
that survive, and they appear as values of meaningless keys.

%w compounds it: that is an fmt.Errorf directive and not a valid Printf verb,
left behind when the error return this replaced was converted to a log line.

Pass the values as named attributes instead. Metric output is unchanged.

Signed-off-by: Adam Butler <github@at-blacknight.com>
2026-08-21 14:33:30 +00:00
USJUN
048741c011 textfile: support UTF-8 metric and label names (#3729)
Signed-off-by: USJUN <u.s.junn@gmail.com>
2026-08-21 11:25:26 -03:00
dependabot[bot]
254a86c033 build(deps): bump vmactions/solaris-vm from 1.3.7 to 1.3.8 (#3774)
Bumps [vmactions/solaris-vm](https://github.com/vmactions/solaris-vm) from 1.3.7 to 1.3.8.
- [Release notes](https://github.com/vmactions/solaris-vm/releases)
- [Commits](d30dd6c228...315163f088)

---
updated-dependencies:
- dependency-name: vmactions/solaris-vm
  dependency-version: 1.3.8
  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>
2026-08-21 09:45:30 -03:00
dependabot[bot]
5b9f9b2719 build(deps): bump vmactions/openbsd-vm from 1.4.4 to 1.4.5 (#3776)
Bumps [vmactions/openbsd-vm](https://github.com/vmactions/openbsd-vm) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/vmactions/openbsd-vm/releases)
- [Commits](18edb32f4e...c941015845)

---
updated-dependencies:
- dependency-name: vmactions/openbsd-vm
  dependency-version: 1.4.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>
2026-08-21 09:45:09 -03:00
PrometheusBot
365df48b47 Update common Prometheus files (#3789)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2026-08-21 09:41:29 -03:00
Nicolas Takashi
c7126a10d5 [CHORE] adding agents.md (#3699)
* [CHORE] adding agents.md

Signed-off-by: Nicolas Takashi <nicolas.tcs@hotmail.com>

* Address review feedback: link naming conventions, note procfs usage

Signed-off-by: Nicolas Takashi <nicolas.takashi@dash0.com>

* Trim AGENTS.md per review: drop directory-listing sections, keep non-inferable rules

Signed-off-by: Nicolas Takashi <nicolas.takashi@dash0.com>

---------

Signed-off-by: Nicolas Takashi <nicolas.tcs@hotmail.com>
Signed-off-by: Nicolas Takashi <nicolas.takashi@dash0.com>
2026-08-21 09:38:08 -03:00
Yurii Kondrakov
0fc9422299 Add chip label to DRM metrics (#3572)
* Extend DRM labels

Signed-off-by: Deezzir <deezzir@gmail.com>

* chore: move `cleanMetricName` to a shared helper file

Signed-off-by: Deezzir <deezzir@gmail.com>

---------

Signed-off-by: Deezzir <deezzir@gmail.com>
2026-08-21 09:36:01 -03:00
Mark Hamzy
24c6dce279 Fix fibrechannel_linux for ppc64le (#3769)
Seen on a master node:

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x106cefa4]
goroutine 81 [running]:
github.com/prometheus/node_exporter/collector.(*fibrechannelCollector).Update(0x7e28c1ae20f0, 0x7e28c1826770)
  /go/src/github.com/prometheus/node_exporter/collector/fibrechannel_linux.go:133 +0x604

sh-5.1# ls -l /host/sys/class/fc_host/
total 0
lrwxrwxrwx. 1 root root 0 Jul 30 20:42 host1 -> ../../devices/vio/30000003/host1/fc_host/host1
lrwxrwxrwx. 1 root root 0 Jul 30 20:42 host2 -> ../../devices/vio/30000005/host2/fc_host/host2
sh-5.1# ls -l /host/sys/class/fc_host/host1/
total 0
-rw-r--r--. 1 root root 65536 Jul 30 20:09 dev_loss_tmo
lrwxrwxrwx. 1 root root     0 Jul 30 20:42 device -> ../../../host1
-r--r--r--. 1 root root 65536 Jul 30 20:09 fabric_name
--w-------. 1 root root 65536 Jul 30 20:42 issue_lip
-r--r--r--. 1 root root 65536 Jul 30 20:42 maxframe_size
-r--r--r--. 1 root root 65536 Jul 30 20:09 node_name
-r--r--r--. 1 root root 65536 Jul 30 20:09 port_id
-r--r--r--. 1 root root 65536 Jul 30 20:42 port_name
-r--r--r--. 1 root root 65536 Jul 30 20:09 port_state
-r--r--r--. 1 root root 65536 Jul 30 20:09 port_type
drwxr-xr-x. 2 root root     0 Jul 30 20:42 power
-r--r--r--. 1 root root 65536 Jul 30 20:09 speed
lrwxrwxrwx. 1 root root     0 Jul 30 20:42 subsystem -> ../../../../../../class/fc_host
-r--r--r--. 1 root root 65536 Jul 30 20:09 supported_classes
-rw-r--r--. 1 root root 65536 Jul 30 20:42 tgtid_bind_type
-rw-r--r--. 1 root root 65536 Jul 30 20:42 uevent
```

Since many filenames for counters are not guaranteed to exist in VMs,
allocate if not present.

Signed-off-by: Mark Hamzy <hamzy@us.ibm.com>
2026-08-19 10:25:20 +02:00
PrometheusBot
a7dcc3a015 Update common Prometheus files (#3786)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2026-08-08 09:43:50 +02:00
dependabot[bot]
ac83e377f0 build(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#3775)
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](9c091bb21b...3d3c42e5aa)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  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>
2026-08-05 21:16:29 +02:00
dependabot[bot]
b0f359bd7c build(deps): bump actions/setup-go from 6.5.0 to 7.0.0 (#3773)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.5.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](924ae3a1cd...b7ad1dad31)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 21:16:12 +02:00
dependabot[bot]
02df428f54 build(deps): bump vmactions/netbsd-vm from 1.4.2 to 1.4.5 (#3772)
Bumps [vmactions/netbsd-vm](https://github.com/vmactions/netbsd-vm) from 1.4.2 to 1.4.5.
- [Release notes](https://github.com/vmactions/netbsd-vm/releases)
- [Commits](0c26a4c4a5...e7ac71b97a)

---
updated-dependencies:
- dependency-name: vmactions/netbsd-vm
  dependency-version: 1.4.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>
2026-08-05 21:15:51 +02:00
dependabot[bot]
0ece0c4a49 build(deps): bump github.com/mdlayher/wifi from 0.8.0 to 0.9.0 (#3781)
Bumps [github.com/mdlayher/wifi](https://github.com/mdlayher/wifi) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/mdlayher/wifi/releases)
- [Commits](https://github.com/mdlayher/wifi/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/mdlayher/wifi
  dependency-version: 0.9.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>
2026-08-05 21:15:16 +02:00
dependabot[bot]
624f8ede44 build(deps): bump the prometheus group with 2 updates (#3780)
Bumps the prometheus group with 2 updates: [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) and [github.com/prometheus/common](https://github.com/prometheus/common).


Updates `github.com/prometheus/client_golang` from 1.23.2 to 1.24.1
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.24.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.23.2...v1.24.1)

Updates `github.com/prometheus/common` from 0.70.0 to 0.70.1
- [Release notes](https://github.com/prometheus/common/releases)
- [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/common/compare/v0.70.0...v0.70.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-version: 1.24.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: prometheus
- dependency-name: github.com/prometheus/common
  dependency-version: 0.70.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prometheus
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-05 21:14:55 +02:00
Ben Kochie
415fb0c3b8 ksmd: Improve help text (#3782)
Update the ksmd collector to use pre-defined metrics descriptions
instead of auto-generated. This allows for improved help text
taken from the kernel documentation. This also avoids memory allocations
each time `NewKsmdCollector()` is called.

Signed-off-by: Ben Kochie <superq@gmail.com>
2026-08-05 13:10:30 +02:00
michalskrivanek
1771767c62 ksmd: add general_profit metric (#3778)
Expose /sys/kernel/mm/ksm/general_profit as node_ksmd_general_profit_bytes.
This file (available since Linux 6.4, EL9) reports the net memory saved by KSM
after subtracting the overhead of rmap_item tracking structures.
Also gracefully skip any missing sysfs files instead of failing the entire
collector, since general_profit and potentially other files may not exist
on older kernels.


Assisted-by: claude-4.6-opus

Signed-off-by: Michal Skrivanek <michal.skrivanek@redhat.com>
2026-08-05 08:08:44 +02:00
PrometheusBot
128f5bf9c9 Update common Prometheus files (#3779)
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2026-08-04 21:23:53 +02:00
dependabot[bot]
b401dcfc66 build(deps): bump vmactions/dragonflybsd-vm from 1.2.9 to 1.3.1 (#3743)
Bumps [vmactions/dragonflybsd-vm](https://github.com/vmactions/dragonflybsd-vm) from 1.2.9 to 1.3.1.
- [Release notes](https://github.com/vmactions/dragonflybsd-vm/releases)
- [Commits](b4468429bb...bc8ccbaa09)

---
updated-dependencies:
- dependency-name: vmactions/dragonflybsd-vm
  dependency-version: 1.3.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>
2026-07-21 08:21:57 +02:00
dependabot[bot]
856f366b7a build(deps): bump actions/checkout from 6.0.3 to 7.0.0 (#3742)
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](df4cb1c069...9c091bb21b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-21 06:56:13 +02:00