From 74ff1c69370a9914ac87e682e6e4f767d184a1f2 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Mon, 13 Nov 2023 00:30:06 +0100 Subject: [PATCH 1/5] Release 1.7.0 (#2845) * [FEATURE] Add ZFS freebsd per dataset stats #2753 * [FEATURE] Add cpu vulnerabilities reporting from sysfs #2721 * [ENHANCEMENT] Parallelize stat calls in Linux filesystem collector #1772 * [ENHANCEMENT] Add missing linkspeeds to ethtool collector 2711 * [ENHANCEMENT] Add CPU MHz as the value for `node_cpu_info` metric #2778 * [ENHANCEMENT] Improve qdisc collector performance #2779 * [ENHANCEMENT] Add include and exclude filter for hwmon collector #2699 * [ENHANCEMENT] Optionally fetch ARP stats via rtnetlink instead of procfs #2777 * [BUFFIX] Fix ZFS arcstats on FreeBSD 14.0+ 2754 * [BUGFIX] Fallback to 32-bit stats in netdev #2757 * [BUGFIX] Close btrfs.FS handle after use #2780 * [BUGFIX] Move RO status before error return #2807 * [BUFFIX] Fix `promhttp_metric_handler_errors_total` being always active #2808 * [BUGFIX] Fix nfsd v4 index miss #2824 Signed-off-by: Ben Kochie --- .circleci/config.yml | 2 +- CHANGELOG.md | 17 +++++++++++++++++ VERSION | 2 +- go.mod | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab00b232..e40a0667 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,7 +46,7 @@ jobs: parallelism: 3 steps: - prometheus/setup_environment - - run: docker run --privileged linuxkit/binfmt:v0.8 + - run: docker run --privileged linuxkit/binfmt:af88a591f9cc896a52ce596b9cf7ca26a061ef97 - run: promu crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX - run: promu --config .promu-cgo.yml crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX - persist_to_workspace: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ff9b6a5..096c0b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ * [ENHANCEMENT] * [BUGFIX] +## 1.7.0 / 2023-11-11 + +* [FEATURE] Add ZFS freebsd per dataset stats #2753 +* [FEATURE] Add cpu vulnerabilities reporting from sysfs #2721 +* [ENHANCEMENT] Parallelize stat calls in Linux filesystem collector #1772 +* [ENHANCEMENT] Add missing linkspeeds to ethtool collector 2711 +* [ENHANCEMENT] Add CPU MHz as the value for `node_cpu_info` metric #2778 +* [ENHANCEMENT] Improve qdisc collector performance #2779 +* [ENHANCEMENT] Add include and exclude filter for hwmon collector #2699 +* [ENHANCEMENT] Optionally fetch ARP stats via rtnetlink instead of procfs #2777 +* [BUFFIX] Fix ZFS arcstats on FreeBSD 14.0+ 2754 +* [BUGFIX] Fallback to 32-bit stats in netdev #2757 +* [BUGFIX] Close btrfs.FS handle after use #2780 +* [BUGFIX] Move RO status before error return #2807 +* [BUFFIX] Fix `promhttp_metric_handler_errors_total` being always active #2808 +* [BUGFIX] Fix nfsd v4 index miss #2824 + ## 1.6.1 / 2023-06-17 Rebuild with latest Go compiler bugfix release. diff --git a/VERSION b/VERSION index 9c6d6293..bd8bf882 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.1 +1.7.0 diff --git a/go.mod b/go.mod index d02463b8..b89cfbb4 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/prometheus/node_exporter -go 1.19 +go 1.20 require ( github.com/alecthomas/kingpin/v2 v2.3.2 From 7333465abf9efba81876303bb57e6fadb946041b Mon Sep 17 00:00:00 2001 From: Ayoub NASR Date: Mon, 13 Nov 2023 00:36:30 +0100 Subject: [PATCH 2/5] Add NodeBondingDegraded alert (#2843) Signed-off-by: Ayoub Nasr --- docs/node-mixin/alerts/alerts.libsonnet | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/node-mixin/alerts/alerts.libsonnet b/docs/node-mixin/alerts/alerts.libsonnet index 1eaedd3d..b99c9200 100644 --- a/docs/node-mixin/alerts/alerts.libsonnet +++ b/docs/node-mixin/alerts/alerts.libsonnet @@ -407,6 +407,20 @@ description: 'Systemd service {{ $labels.name }} has entered failed state at {{ $labels.instance }}', }, }, + { + alert: 'NodeBondingDegraded', + expr: ||| + (node_bonding_slaves - node_bonding_active) != 0 + ||| % $._config, + 'for': '5m', + labels: { + severity: 'warning', + }, + annotations: { + summary: 'Bonding interface is degraded', + description: 'Bonding interface {{ $labels.master }} on {{ $labels.instance }} is in degraded state due to one or more slave failures.', + }, + }, ], }, ], From 81fc05c45f4e63d4fb8cb1acda016493b003b9f3 Mon Sep 17 00:00:00 2001 From: Anton Lugovoi Date: Sun, 12 Nov 2023 22:10:56 -0300 Subject: [PATCH 3/5] Make filesystem space prediction window configurable (#2844) Signed-off-by: fitz123 --- docs/node-mixin/alerts/alerts.libsonnet | 2 +- docs/node-mixin/config.libsonnet | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/node-mixin/alerts/alerts.libsonnet b/docs/node-mixin/alerts/alerts.libsonnet index b99c9200..34d5314c 100644 --- a/docs/node-mixin/alerts/alerts.libsonnet +++ b/docs/node-mixin/alerts/alerts.libsonnet @@ -10,7 +10,7 @@ ( node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} / node_filesystem_size_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} * 100 < %(fsSpaceFillingUpWarningThreshold)d and - predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s}[6h], 24*60*60) < 0 + predict_linear(node_filesystem_avail_bytes{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s}[%(fsSpaceFillingUpPredictionWindow)s], 24*60*60) < 0 and node_filesystem_readonly{%(nodeExporterSelector)s,%(fsSelector)s,%(fsMountpointSelector)s} == 0 ) diff --git a/docs/node-mixin/config.libsonnet b/docs/node-mixin/config.libsonnet index 4427b59d..bf6c83ed 100644 --- a/docs/node-mixin/config.libsonnet +++ b/docs/node-mixin/config.libsonnet @@ -54,13 +54,19 @@ // 'NodeFilesystemSpaceFillingUp' alerts. These alerts fire if the disk // usage grows in a way that it is predicted to run out in 4h or 1d // and if the provided thresholds have been reached right now. - // In some cases you'll want to adjust these, e.g. by default Kubernetes + // In some cases you'll want to adjust these, e.g., by default, Kubernetes // runs the image garbage collection when the disk usage reaches 85% // of its available space. In that case, you'll want to reduce the // critical threshold below to something like 14 or 15, otherwise // the alert could fire under normal node usage. + // Additionally, the prediction window for the alert can be configured + // to account for environments where disk usage can fluctuate within + // a short time frame. By extending the prediction window, you can + // reduce false positives caused by temporary spikes, providing a + // more accurate prediction of disk space issues. fsSpaceFillingUpWarningThreshold: 40, fsSpaceFillingUpCriticalThreshold: 20, + fsSpaceFillingUpPredictionWindow: '6h', // Available disk space (%) thresholds on which to trigger the // 'NodeFilesystemAlmostOutOfSpace' alerts. From 78af952e638b5e0d00640fbdeefd096df4a51dc2 Mon Sep 17 00:00:00 2001 From: Tobias Klausmann Date: Tue, 14 Nov 2023 03:54:11 +0100 Subject: [PATCH 4/5] 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 --- collector/fixtures/e2e-64k-page-output.txt | 1 + collector/fixtures/e2e-output.txt | 1 + collector/fixtures/proc/net/rpc/nfsd | 1 + collector/nfsd_linux.go | 2 ++ 4 files changed, 5 insertions(+) diff --git a/collector/fixtures/e2e-64k-page-output.txt b/collector/fixtures/e2e-64k-page-output.txt index 34e3a2cc..866db45f 100644 --- a/collector/fixtures/e2e-64k-page-output.txt +++ b/collector/fixtures/e2e-64k-page-output.txt @@ -2743,6 +2743,7 @@ node_nfsd_requests_total{method="SetClientIDConfirm",proto="4"} 3 node_nfsd_requests_total{method="SymLink",proto="2"} 0 node_nfsd_requests_total{method="SymLink",proto="3"} 0 node_nfsd_requests_total{method="Verify",proto="4"} 0 +node_nfsd_requests_total{method="WdelegGetattr",proto="4"} 15 node_nfsd_requests_total{method="WrCache",proto="2"} 0 node_nfsd_requests_total{method="Write",proto="2"} 0 node_nfsd_requests_total{method="Write",proto="3"} 0 diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index dbafe2a3..0c5356d4 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt @@ -2765,6 +2765,7 @@ node_nfsd_requests_total{method="SetClientIDConfirm",proto="4"} 3 node_nfsd_requests_total{method="SymLink",proto="2"} 0 node_nfsd_requests_total{method="SymLink",proto="3"} 0 node_nfsd_requests_total{method="Verify",proto="4"} 0 +node_nfsd_requests_total{method="WdelegGetattr",proto="4"} 15 node_nfsd_requests_total{method="WrCache",proto="2"} 0 node_nfsd_requests_total{method="Write",proto="2"} 0 node_nfsd_requests_total{method="Write",proto="3"} 0 diff --git a/collector/fixtures/proc/net/rpc/nfsd b/collector/fixtures/proc/net/rpc/nfsd index 754f19d9..6a092bfd 100644 --- a/collector/fixtures/proc/net/rpc/nfsd +++ b/collector/fixtures/proc/net/rpc/nfsd @@ -9,3 +9,4 @@ proc2 18 2 69 0 0 4410 0 0 0 0 0 0 0 0 0 0 0 99 2 proc3 22 2 112 0 2719 111 0 0 0 0 0 0 0 0 0 0 0 27 216 0 2 1 0 proc4 2 2 10853 proc4ops 72 0 0 0 1098 2 0 0 0 0 8179 5896 0 0 0 0 5900 0 0 2 0 2 0 9609 0 2 150 1272 0 0 0 1236 0 0 0 0 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +wdeleg_getattr 15 diff --git a/collector/nfsd_linux.go b/collector/nfsd_linux.go index c79353b2..8b310ea2 100644 --- a/collector/nfsd_linux.go +++ b/collector/nfsd_linux.go @@ -82,6 +82,8 @@ func (c *nfsdCollector) Update(ch chan<- prometheus.Metric) error { c.updateNFSdRequestsv2Stats(ch, &stats.V2Stats) c.updateNFSdRequestsv3Stats(ch, &stats.V3Stats) c.updateNFSdRequestsv4Stats(ch, &stats.V4Ops) + ch <- prometheus.MustNewConstMetric(c.requestsDesc, prometheus.CounterValue, + float64(stats.WdelegGetattr), "4", "WdelegGetattr") return nil } From 97029a20a80609dd528eef4d5d39dd54e07a9ffa Mon Sep 17 00:00:00 2001 From: PrometheusBot Date: Sun, 19 Nov 2023 01:20:49 +0100 Subject: [PATCH 5/5] Update common Prometheus files (#2851) Signed-off-by: prombot --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index babd8a0c..ffa6b309 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,7 +22,7 @@ jobs: - name: install Go uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 with: - go-version: 1.20.x + go-version: 1.21.x - name: Install snmp_exporter/generator dependencies run: sudo apt-get update && sudo apt-get -y install libsnmp-dev if: github.repository == 'prometheus/snmp_exporter'