* 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>
* 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>
* docs: document the EPEL package install path in the README
The README's "Installation and Usage" section only covered Ansible and
Docker. On Enterprise Linux and Fedora, node_exporter is packaged in
EPEL as golang-github-prometheus-node-exporter (EPEL 7, 8 and 9), which
several users find easier than a manual install. Add a short "Linux
distribution packages" subsection documenting it, including the EL9
systemd service name.
Closes#2160
Signed-off-by: Aman Raj <aman.yug@gmail.com>
* Apply suggestions from code review
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
* Apply suggestions from code review
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
---------
Signed-off-by: Aman Raj <aman.yug@gmail.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
Add --collector.infiniband.device-include and
--collector.infiniband.device-exclude flags to the infiniband collector,
following the existing pattern used by the arp, ethtool, diskstats and
netdev collectors. Devices not matching the filter are skipped in Update.
Signed-off-by: Aman Raj <aman.yug@gmail.com>
Add a new opt-in collector that exposes NVMe-oF
subsystem path health via sysfs:
- node_nvmesubsystem_info (subsystem metadata)
- node_nvmesubsystem_namespace_info
- node_nvmesubsystem_path_state (per-state gauge)
- node_nvmesubsystem_paths (total controller count)
- node_nvmesubsystem_paths_live (live controllers)
Controller states are normalised through a single
map so adding a new kernel state requires one edit.
Signed-off-by: Shirly Radco <sradco@redhat.com>
Co-authored-by: AI Assistant <noreply@cursor.com>
Add a new collector that reads /sys/block/dm-* to
discover Device Mapper multipath devices and expose
path health metrics. Enabled by default; the
collector is a no-op on systems without multipath.
Multipath devices are identified by checking that
dm/uuid starts with "mpath-". The path state is
reported as-is from /sys/block/<dev>/device/state,
supporting both SCSI and NVMe devices without
hardcoding a fixed set of states.
Exposed metrics:
- node_dmmultipath_device_info
- node_dmmultipath_device_active
- node_dmmultipath_device_size_bytes
- node_dmmultipath_device_paths
- node_dmmultipath_device_paths_active
- node_dmmultipath_device_paths_failed
- node_dmmultipath_path_state
Signed-off-by: Shirly Radco <sradco@redhat.com>
Co-authored-by: AI Assistant <noreply@cursor.com>
Fix the kernel_hung collector metric naming to follow counter naming
conventions.
* Enable the colletor by default, this feature has existed since 2.6.30.
* Enable end-to-end test.
Signed-off-by: Ben Kochie <superq@gmail.com>
* Add /proc/swaps collector
Building on prometheus/procfs#246 this PR is introducing metrics around swap devices.
Today metrics around swap are already available, but they are on the node level.
With this PR, metrics are now available per device.
Relates to: #1890
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
Co-authored-by: claude.ai
---------
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
* 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>
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>
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>
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>
* 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>
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>
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>
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>
Mark the `supervisord` as deprecated. This process
supevisor, like `runit`, is of scope for the node_exporter.
Signed-off-by: Ben Kochie <superq@gmail.com>
The ntp collector has always been a source of confusion and problems.
The data it produces is more of a blackbox probe against an NTP server.
The time sync / offset data produced is not what users expect.
Mark this collector as deprecated to be removed in v2.0.0
Signed-off-by: Ben Kochie <superq@gmail.com>
The --web.config flag changed to --web.config.file in
440a132c38 and was realised in the recent
v1.5.0 release.
Signed-off-by: Joe Groocock <me@frebib.net>
Copr community prometheus-exporters repository is obsoleted.
Signed-off-by: Otto Sabart <seberm@seberm.com>
Signed-off-by: Otto Sabart <seberm@seberm.com>
* Correctly name collector file.
* Fix cgroup summary type as gauge.
* Use a boolean metric rather than a label for enabled.
Signed-off-by: Ben Kochie <superq@gmail.com>
* Update build to Go 1.18.
* Update minimum version to 1.17.
* Update machine image to latest.
* Enable dependabot.
* Simplify build in readme.
Signed-off-by: Ben Kochie <superq@gmail.com>