From 7da1321761b3b8dfc9e496e1a60e6a476fec6018 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Mon, 26 Sep 2022 14:30:51 +0200 Subject: [PATCH] Release 1.4.0 (#2478) * [CHANGE] Merge metrics descriptions in textfile collector #2475 * [FEATURE] [node-mixin] Add darwin dashboard to mixin #2351 * [FEATURE] Add "isolated" metric on cpu collector on linux #2251 * [FEATURE] Add cgroup summary collector #2408 * [FEATURE] Add selinux collector #2205 * [FEATURE] Add slab info collector #2376 * [FEATURE] Add sysctl collector #2425 * [FEATURE] Also track the CPU Spin time for OpenBSD systems #1971 * [FEATURE] Add support for MacOS version #2471 * [ENHANCEMENT] [node-mixin] Add missing selectors #2426 * [ENHANCEMENT] [node-mixin] Change current datasource to grafana's default #2281 * [ENHANCEMENT] [node-mixin] Change disk graph to disk table #2364 * [ENHANCEMENT] [node-mixin] Change io time units to %util #2375 * [ENHANCEMENT] Ad user_wired_bytes and laundry_bytes on *bsd #2266 * [ENHANCEMENT] Add additional vm_stat memory metrics for darwin #2240 * [ENHANCEMENT] Add device filter flags to arp collector #2254 * [ENHANCEMENT] Add diskstats include and exclude device flags #2417 * [ENHANCEMENT] Add node_softirqs_total metric #2221 * [ENHANCEMENT] Add rapl zone name label option #2401 * [ENHANCEMENT] Add slabinfo collector #1799 * [ENHANCEMENT] Allow user to select port on NTP server to query #2270 * [ENHANCEMENT] collector/diskstats: Add labels and metrics from udev #2404 * [ENHANCEMENT] Enable builds against older macOS SDK #2327 * [ENHANCEMENT] qdisk-linux: Add exclude and include flags for interface name #2432 * [ENHANCEMENT] systemd: Expose systemd minor version #2282 * [ENHANCEMENT] Use netlink for tcpstat collector #2322 * [ENHANCEMENT] Use netlink to get netdev stats #2074 * [ENHANCEMENT] Add additional perf counters for stalled frontend/backend cycles #2191 * [ENHANCEMENT] Add btrfs device error stats #2193 * [BUGFIX] [node-mixin] Fix fsSpaceAvailableCriticalThreshold and fsSpaceAvailableWarning #2352 * [BUGFIX] Fix concurrency issue in ethtool collector #2289 * [BUGFIX] Fix concurrency issue in netdev collector #2267 * [BUGFIX] Fix diskstat reads and write metrics for disks with different sector sizes #2311 * [BUGFIX] Fix iostat on macos broken by deprecation warning #2292 * [BUGFIX] Fix NodeFileDescriptorLimit alerts #2340 * [BUGFIX] Sanitize rapl zone names #2299 * [BUGFIX] Add file descriptor close safely in test #2447 * [BUGFIX] Fix race condition in os_release.go #2454 * [BUGFIX] Skip ZFS IO metrics if their paths are missing #2451 Signed-off-by: Ben Kochie Signed-off-by: Ben Kochie --- .circleci/config.yml | 2 +- .promu-cgo.yml | 2 +- .promu.yml | 2 +- CHANGELOG.md | 69 ++++++++++++++++++++++------------------ VERSION | 2 +- collector/btrfs_linux.go | 14 ++++---- go.mod | 1 + 7 files changed, 50 insertions(+), 42 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 07821102..5c5893a0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ executors: # should also be updated. golang: docker: - - image: cimg/go:1.18 + - image: cimg/go:1.19 arm: machine: image: ubuntu-2004:current diff --git a/.promu-cgo.yml b/.promu-cgo.yml index 7179a566..2bde1bf1 100644 --- a/.promu-cgo.yml +++ b/.promu-cgo.yml @@ -1,7 +1,7 @@ go: # Whenever the Go version is updated here, .circle/config.yml and # .promu.yml should also be updated. - version: 1.17 + version: 1.19 cgo: true repository: path: github.com/prometheus/node_exporter diff --git a/.promu.yml b/.promu.yml index 9f97dec2..0c035102 100644 --- a/.promu.yml +++ b/.promu.yml @@ -1,7 +1,7 @@ go: # Whenever the Go version is updated here, .circle/config.yml and # .promu-cgo.yml should also be updated. - version: 1.18 + version: 1.19 repository: path: github.com/prometheus/node_exporter build: diff --git a/CHANGELOG.md b/CHANGELOG.md index 240026c5..060d5838 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,40 +5,47 @@ * [ENHANCEMENT] * [BUGFIX] -## 1.4.0-rc.0 / 2022-07-27 +## 1.4.0 / 2022-09-24 -* [BUGFIX] [node-mixin] Fix fsSpaceAvailableCriticalThreshold and fsSpaceAvailableWarning (#2352) -* [BUGFIX] Fix concurrency issue in ethtool collector (#2289) -* [BUGFIX] Fix concurrency issue in netdev collector (#2267) -* [BUGFIX] Fix diskstat reads and write metrics for disks with different sector sizes (#2311) -* [BUGFIX] Fix iostat on macos broken by deprecation warning (#2292) -* [BUGFIX] Fix NodeFileDescriptorLimit alerts (#2340) -* [BUGFIX] Sanitize rapl zone names (#2299) -* [ENHANCEMENT] [node-mixin] Add missing selectors (#2426) -* [ENHANCEMENT] [node-mixin] Change current datasource to grafana's default (#2281) +* [CHANGE] Merge metrics descriptions in textfile collector #2475 +* [FEATURE] [node-mixin] Add darwin dashboard to mixin #2351 +* [FEATURE] Add "isolated" metric on cpu collector on linux #2251 +* [FEATURE] Add cgroup summary collector #2408 +* [FEATURE] Add selinux collector #2205 +* [FEATURE] Add slab info collector #2376 +* [FEATURE] Add sysctl collector #2425 +* [FEATURE] Also track the CPU Spin time for OpenBSD systems #1971 +* [FEATURE] Add support for MacOS version #2471 +* [ENHANCEMENT] [node-mixin] Add missing selectors #2426 +* [ENHANCEMENT] [node-mixin] Change current datasource to grafana's default #2281 * [ENHANCEMENT] [node-mixin] Change disk graph to disk table #2364 -* [ENHANCEMENT] [node-mixin] Change io time units to %util (#2375)) -* [ENHANCEMENT] Ad user_wired_bytes and laundry_bytes on *bsd (#2266) -* [ENHANCEMENT] Add additional vm_stat memory metrics for darwin (#2240) -* [ENHANCEMENT] Add device filter flags to arp collector (#2254) -* [ENHANCEMENT] Add diskstats include and exclude device flags (#2417) -* [ENHANCEMENT] Add node_softirqs_total metric (#2221) -* [ENHANCEMENT] Add rapl zone name label option (#2401) -* [ENHANCEMENT] Add slabinfo collector (#1799) -* [ENHANCEMENT] Allow user to select port on NTP server to query (#2270) -* [ENHANCEMENT] collector/diskstats: Add labels and metrics from udev (#2404) -* [ENHANCEMENT] Enable builds against older macOS SDK (#2327) +* [ENHANCEMENT] [node-mixin] Change io time units to %util #2375 +* [ENHANCEMENT] Ad user_wired_bytes and laundry_bytes on *bsd #2266 +* [ENHANCEMENT] Add additional vm_stat memory metrics for darwin #2240 +* [ENHANCEMENT] Add device filter flags to arp collector #2254 +* [ENHANCEMENT] Add diskstats include and exclude device flags #2417 +* [ENHANCEMENT] Add node_softirqs_total metric #2221 +* [ENHANCEMENT] Add rapl zone name label option #2401 +* [ENHANCEMENT] Add slabinfo collector #1799 +* [ENHANCEMENT] Allow user to select port on NTP server to query #2270 +* [ENHANCEMENT] collector/diskstats: Add labels and metrics from udev #2404 +* [ENHANCEMENT] Enable builds against older macOS SDK #2327 * [ENHANCEMENT] qdisk-linux: Add exclude and include flags for interface name #2432 -* [ENHANCEMENT] systemd: Expose systemd minor version (#2282) -* [ENHANCEMENT] Use netlink for tcpstat collector (#2322) -* [ENHANCEMENT] Use netlink to get netdev stats (#2074) -* [FEATURE] [node-mixin] Add darwin dashboard to mixin (#2351) -* [FEATURE] Add "isolated" metric on cpu collector on linux (#2251) -* [FEATURE] Add cgroup summary collector (#2408) -* [FEATURE] Add selinux collector (#2205) -* [FEATURE] Add slab info collector (#2376) -* [FEATURE] Add sysctl collector (#2425) -* [FEATURE] Also track the CPU Spin time for OpenBSD systems (#1971) +* [ENHANCEMENT] systemd: Expose systemd minor version #2282 +* [ENHANCEMENT] Use netlink for tcpstat collector #2322 +* [ENHANCEMENT] Use netlink to get netdev stats #2074 +* [ENHANCEMENT] Add additional perf counters for stalled frontend/backend cycles #2191 +* [ENHANCEMENT] Add btrfs device error stats #2193 +* [BUGFIX] [node-mixin] Fix fsSpaceAvailableCriticalThreshold and fsSpaceAvailableWarning #2352 +* [BUGFIX] Fix concurrency issue in ethtool collector #2289 +* [BUGFIX] Fix concurrency issue in netdev collector #2267 +* [BUGFIX] Fix diskstat reads and write metrics for disks with different sector sizes #2311 +* [BUGFIX] Fix iostat on macos broken by deprecation warning #2292 +* [BUGFIX] Fix NodeFileDescriptorLimit alerts #2340 +* [BUGFIX] Sanitize rapl zone names #2299 +* [BUGFIX] Add file descriptor close safely in test #2447 +* [BUGFIX] Fix race condition in os_release.go #2454 +* [BUGFIX] Skip ZFS IO metrics if their paths are missing #2451 ## 1.3.1 / 2021-12-01 diff --git a/VERSION b/VERSION index 946fef9c..88c5fb89 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.0-rc.0 +1.4.0 diff --git a/collector/btrfs_linux.go b/collector/btrfs_linux.go index bb1820ff..94b27df8 100644 --- a/collector/btrfs_linux.go +++ b/collector/btrfs_linux.go @@ -102,15 +102,15 @@ type btrfsIoctlFsStats struct { func (c *btrfsCollector) getIoctlStats() (map[string]*btrfsIoctlFsStats, error) { // Instead of introducing more ioctl calls to scan for all btrfs - // filesytems re-use our mount point utils to find known mounts + // filesystems re-use our mount point utils to find known mounts mountsList, err := mountPointDetails(c.logger) if err != nil { return nil, err } - // track devices we have successfully scanned, by device path + // Track devices we have successfully scanned, by device path. devicesDone := make(map[string]struct{}) - // filesystems scann results by UUID + // Filesystems scann results by UUID. fsStats := make(map[string]*btrfsIoctlFsStats) for _, mount := range mountsList { @@ -119,14 +119,14 @@ func (c *btrfsCollector) getIoctlStats() (map[string]*btrfsIoctlFsStats, error) } if _, found := devicesDone[mount.device]; found { - // We already found this filesystem by another mount point + // We already found this filesystem by another mount point. continue } fs, err := dennwc.Open(mount.mountPoint, true) if err != nil { - // failed to open this mount point, maybe we didn't have permission - // maybe we'll find another mount point for this FS later + // Failed to open this mount point, maybe we didn't have permission + // maybe we'll find another mount point for this FS later. level.Debug(c.logger).Log( "msg", "Error inspecting btrfs mountpoint", "mountPoint", mount.mountPoint, @@ -178,7 +178,7 @@ func (c *btrfsCollector) getIoctlDeviceStats(fs *dennwc.FS, fsInfo *dennwc.Info) if err != nil { if errno, ok := err.(syscall.Errno); ok && errno == syscall.ENODEV { - // device IDs do not consistently start at 0, nor are ranges contiguous, so we expect this + // Device IDs do not consistently start at 0, nor are ranges contiguous, so we expect this. continue } return nil, err diff --git a/go.mod b/go.mod index b4e7a671..091c0079 100644 --- a/go.mod +++ b/go.mod @@ -35,6 +35,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dennwc/ioctl v1.0.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/go-cmp v0.5.8 // indirect