* 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>
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>
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>
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>
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>
* 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>
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>
* 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>
* 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>
* 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>
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>
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>