Commit graph

86 commits

Author SHA1 Message Date
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
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
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
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
mchtech ec5e4b50b8 add IRQ PSI test data
Signed-off-by: mchtech <michu_an@126.com>
2024-07-14 12:44:38 +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
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
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
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
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
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
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 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
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
Abbey Woodyear eaacb2e3c7
exposing softirq metrics (#2294)
Signed-off-by: abbeywoodyear <abbey.woodyear@thehutgroup.com>
2023-05-25 15:09:32 +02:00
Remi Jouannet df1b53bee2
softnet: additionals metrics from softnet_data, (#2592)
* softnet: additionals metrics from softnet_data, https://github.com/prometheus/procfs/pull/473
---------

Signed-off-by: remi <remijouannet@gmail.com>
Signed-off-by: Rémi Jouannet <remijouannet@gmail.com>
2023-05-24 17:23:13 +02:00
dongjiang 1bbb2a94c0
fix(zfs): add memory_available_bytes, fix dbufstats filename on Linux (#2687)
* Fix zfs memory_available_bytes collector
* Fix zfs dbufstats collector
---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
2023-05-23 11:13:48 +02:00
Ben Kochie d2dd793e39
Update e2e output fixtures (#2696)
Fix up correct e2e output for node_power_supply_info.

Signed-off-by: Ben Kochie <superq@gmail.com>
2023-05-22 17:28:45 +02:00
Sal Sal dcb10ff291
bcache: remove cache_readaheads_totals metrics #2103 (#2583)
* bcache: remove cache_readaheads_totals metrics #2103

Signed-off-by: Saleh Sal <0xack13@gmail.com>

* Append bcacheReadaheadMetrics when CacheReadaheads value exists

Signed-off-by: Saleh Sal <0xack13@gmail.com>

* Update test cases for cachereadahead greater than zero

Signed-off-by: Saleh Sal <0xack13@gmail.com>

---------

Signed-off-by: Saleh Sal <0xack13@gmail.com>
2023-05-20 14:13:07 +02:00
Maximilian Wilhelm c8129fadd6
Expose administrative state of network interfaces as 'adminstate'. (#2515)
Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
2023-05-02 15:25:05 +02:00
Pablo Caderno d31af1d1e5
feat: added suspended as a node_zfs_zpool_state (#2449)
Signed-off-by: Pablo Caderno <kaderno@gmail.com>
2023-04-26 18:12:54 +02:00
Lukas Coppens fe19fdd1e8 feat: add support for cpu freq governor metrics
Signed-off-by: Lukas Coppens <lukas.coppens@be-mobile.com>
2023-03-10 18:19:33 +01:00
Ben Kochie 2d77d8c562
Update e2e output for new common version.
Signed-off-by: Ben Kochie <superq@gmail.com>
2023-01-20 10:38:19 +01:00
Ben Kochie 13a5cc1f74
Refactor netclass_rtnl collector (#2528)
* Refactor netclass_rtnl collector

Merge the netclass_rtnl collector into the netclass collector.
* Disabled by default
* Followup to #2492

Signed-off-by: Ben Kochie <superq@gmail.com>
2022-11-29 11:22:25 +01:00
Ben Kochie 98a40bd712
Fix hwmon label sanitizer (#2504)
We don't need to fully sanitize the hwmon label values to metric/label
name strings.
* Just make sure they're valid UTF-8.
* Always included the label metric to avoid group_left failures.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2022-10-11 14:40:28 +02:00
Ben Kochie 88a031567f
Merge pull request #2074 from BenoitKnecht/netdev-linux-netlink
collector/netdev_linux.go: Use netlink to get stats
2022-07-27 13:47:01 +02:00
Benoît Knecht a71d0bddc8 end-to-end-test.sh: Fix netdev metrics
Since netdev metrics are now read from netlink instead of `/proc/net/dev`, we
can't easily spoof them for the end-to-end tests by reading a fixture file in
place of `/proc/net/dev`.

Therefore, we only get metrics for `lo` and ignore those that would return
unpredictable values (i.e. the byte and packet counters).

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2022-07-26 13:24:20 +02:00
DavidVentura 6477a197da adjust expected output for 64k file
Signed-off-by: DavidVentura <davidventura27@gmail.com>
2022-07-26 12:25:23 +02:00
Johannes 'fish' Ziemke d962e48ca2 Add sysctl collector
Signed-off-by: Johannes Ziemke <github@5pi.de>
2022-07-25 18:27:48 +02:00
Benoît Knecht 296aa35dd2 end-to-end-test.sh: Use udev fixture and update output
Set the `--path.udev.data` flag to point to the udev fixture, and update the
output fixture with

```console
$ ./end-to-end-test.sh -u
```

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2022-07-06 12:30:50 +02:00
Nobuhiro MIKI 3ed95908d6 collector: add slab info
Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2022-07-06 12:18:27 +02:00
Jonathan Davies 88f1811eb1
Add selinux collector (#2205)
Add selinux collector

Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2022-06-28 05:54:05 +02:00
dependabot[bot] b99f933713
Bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2 (#2411)
* Bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [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.12.1...v1.12.2)

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

* Update fixtures for client_golang 1.12.2.

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>
2022-06-26 11:33:15 +02:00
Ben Kochie 59c146e57d
Update end-to-end test for aarch64 (#2415)
Fix up handling of CPU info collector on non-x86_64 systems due to
fixtures containing `/proc/cpuinfo` from x86_64.
* Update e2e 64k page test fixture from an arm64 system.
* Enable ARM testing in CircleCI.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2022-06-26 09:41:21 +02:00
heyitao 7dbf358915 delete duplicate items
Signed-off-by: heyitao <linuxgcc@163.com>
2021-12-09 11:50:10 +01:00
Benjamin Drung 9def2f9222
Add DMI collector (#2131)
Add a DMI collector to expose the Desktop Management Interface (DMI)
info from `/sys/class/dmi/id/`. This will expose information about the
BIOS, mainboard, chassis, and product.

Closes: https://github.com/prometheus/node_exporter/issues/303
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-10-27 13:56:37 +02:00
Benjamin Drung b6215e649c Add os release collector
Currently Node Exporter has a metric called `node_uname_info` which of
course exposes uname info. While this is nice, it does not help if you
are running different OSes which could have similar uname info.

Therefore parse `/etc/os-release` or `/usr/lib/os-release` and expose a
`node_os_info` metric which provide information regarding the OS
release/version of the node. Also expose the major.minor part of the OS
release version as `node_os_version`.

Since the os-release files will not change often, cache the parsed
content and only refresh the cache if the modification time changes.

This `os` collector will read files outside of `/proc` and `/sys`, but
the os-release file is widely used and the format is standardized:
https://www.freedesktop.org/software/systemd/man/os-release.html

Bug: https://github.com/prometheus/node_exporter/issues/1574
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-08-19 14:04:21 +02:00
Benjamin Drung b23146db3f Add nvme collector
Add a collector for NVMes to expose the firmware versions. This requires
procfs >= 0.7.0.

Fixes #1891
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-07-06 13:38:15 +02:00
Ondrej Baudys ed10485073
Expose XFS inode statistics (#1869) (#1870)
* Expose XFS inode statistics (#1869)

Also fixes #1177

@SuperQ @discordianfish

Signed-off-by: Ondrej Baudys <obaudys@gmail.com>
Co-authored-by: obaudys@gmail.com <ondrej.baudys@nextgen.net>
2020-10-22 18:14:33 +02:00
Julius Volz d05aac43e4 Fix capitalization of CPU acronym throughout
Signed-off-by: Julius Volz <julius.volz@gmail.com>
2020-09-03 23:34:33 +02:00
domchan 503e4fc848
Expose cpu bugs and flags as info metrics. (#1788)
* Expose cpu bugs and flags as info metrics with a regexp filter.
* Automatically enable CPU info metrics when using flags or bugs feature.

Signed-off-by: domgoer <domdoumc@gmail.com>
2020-07-17 18:32:23 +02:00
Ben Kochie 5d42d4d99f
Merge pull request #1732 from fach/master
Adding backlog/current queue length to qdisc collector
2020-06-22 20:15:04 +02:00
fach 79ef305a19 Updating e2e test output
Signed-off-by: fach <shaw38@gmail.com>
2020-06-04 13:01:34 -04:00
Ben Kochie 204164e4e4
Include TCP OutRsts in netstat metrics
TCP "OutRsts" is the number of TCP Resets sent by the node. This can be
useful for monitoring connection failures and flooding.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-06-04 08:51:39 +02:00
Sudhar287 6807e5319b
read contents of objset file (#1632)
* added objread functionality

Signed-off-by: Sudharshann D <sudhar287@gmail.com>
2020-05-13 21:06:00 +02:00
Benjamin Drung 34d50e15d5 Add model_name and stepping to node_cpu_info metric
The `node_cpu_info` metric contains some information like the `model`
(which is an integer), but not the human readable model name. Also the
stepping of the processor might be interesting, since different stepping
of a processor might behave differently.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2020-03-20 17:27:11 +01:00
Benjamin Drung ca1ac435ea
Collect non-numeric data from /sys/class/infiniband (#1563)
Let the node exporter collect the non-numeric data from
/sys/class/infiniband: board ID, firmware version, and HCA type.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>

Co-authored-by: Ben Kochie <superq@gmail.com>
2020-02-19 15:18:44 +01:00
Phil Porada 14eafab016
Adds metrics and tests for UDP receive and send buffer errors (#1534)
* Adds metrics for UDP receive and send buffer errors

Signed-off-by: Phil Porada <philporada@gmail.com>
2020-02-19 14:41:40 +01:00
Ben Kochie 1567cefdae
Bump all vendoring (#1612)
Update all vendoring to current releases.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-02-18 13:27:11 +01:00