https://github.com/prometheus/node_exporter/pull/3603 introduced a subtle regression for existing configs where device-exclude was intentionally set to `=''` to clear the Linux default. This breaks configs that are valid (exclude is intentionally cleared). Update the mutual exclusivity check to only fail when the value is non-empty.
Signed-off-by: winston <me@winstondurand.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>
* Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
* Fix lint issue
> S1009: should omit nil check; len() for nil slices is defined as zero
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>
When mounting nfs with nconnect, mountstats will show multiple transports.
Currently the mountstats exporter fails to create metrics from this information
due to repeated entries.
Fix this by adding transport metrics a "transport" label enumerating their
order in the mountstats output.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
* Update deps for selinux library, they don't keep things up-to-date.
* Update cpu collector to use standard library `maps`.
Signed-off-by: Ben Kochie <superq@gmail.com>
Fix the description of the kernel_hung metric to actually describe the
number of hung tasks, not the number of interrupts serviced.
Signed-off-by: Markus Boehme <markus.boehme@mailbox.org>
Virtio devices don't have ID_SERIAL_SHORT but do have ID_SERIAL.
This change adds a fallback to use ID_SERIAL when ID_SERIAL_SHORT
is not available, allowing serial numbers to be properly exposed
for virtio block devices.
Also updates test expectations to reflect that devices with only
ID_SERIAL (like mmcblk devices in fixtures) now report their serial
numbers instead of empty strings.
Signed-off-by: illustris <rharikrishnan95@gmail.com>
* * Rebase from upstream
* add sriov, power info support and pci id name resolution
Signed-off-by: Jain Johny <jj@asama.ai>
* fix/remove debug lines
Signed-off-by: Jain Johny <jj@asama.ai>
---------
Signed-off-by: Jain Johny <jj@asama.ai>
* add numa_node and missing test output file (#2)
* add numa_node and missing test output file
Signed-off-by: Jain Johny <jj@asama.ai>
* use c.logger for debug line
Signed-off-by: Jain Johny <jj@asama.ai>
* point to procfs master
Signed-off-by: Jain Johny <jj@asama.ai>
* include device_id in e2e-output pecidevice output
Signed-off-by: Jain Johny <jj@asama.ai>
* fix typo in e2e-output.txt
Signed-off-by: Jain Johny <jj@asama.ai>
* update test cases in e2e-64k-page-output.txt
Signed-off-by: Jain Johny <jj@asama.ai>
* fixing the rebase
Signed-off-by: Jain Johny <jj@asama.ai>
* move power_state to enum metric type, dont emit unavailable metrics
Signed-off-by: Jain Johny <jj@asama.ai>
* change test fixtures for power state change
Signed-off-by: Jain Johny <jj@asama.ai>
* change test fixtures for numa_node change
Signed-off-by: Jain Johny <jj@asama.ai>
---------
Signed-off-by: Jain Johny <jj@asama.ai>
* 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>
* chore: Upgrade golangci-lint to v2
- Migrate the configuration file
- Update the tooling version and CI
- Apply auto-fixes
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
* chore: Upgrade golangci-lint to v2
- Migrate the configuration file
- Update the tooling version and CI
- Apply auto-fixes
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
---------
Signed-off-by: Kemal Akkoyun <kemal.akkoyun@datadoghq.com>
* Bump Prometheus client_golang/common/exporter-toolkit libraries.
* Adapt textfile parser to the new validation scheme.
Signed-off-by: Ben Kochie <superq@gmail.com>
* filesystem: take super options into account for read-only
With the latest change implemented to use `mountinfo` instead of
`mounts` there was a regression in filesystem readonly detection
due to super options not taken into account: filesystems that would
previously be marked a "read-only" would not anymore because that
information had moved to super options instead of mount options on
certain occasions.
fixes#3157
Signed-off-by: nicbaz <932244+nicbaz@users.noreply.github.com>
* filesystem: use faster integer to string implementation
Signed-off-by: nicbaz <932244+nicbaz@users.noreply.github.com>
---------
Signed-off-by: nicbaz <932244+nicbaz@users.noreply.github.com>
Use standard lib binary.NativeEndian instead of third-party package.
Supported since Go 1.21.
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
* 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>
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>