Skip to content

fix: darwin netdev i/o bytes metric#3336

Merged
SuperQ merged 1 commit intoprometheus:masterfrom
siavashs:netdev-darwin-io-bytes-fix
May 18, 2025
Merged

fix: darwin netdev i/o bytes metric#3336
SuperQ merged 1 commit intoprometheus:masterfrom
siavashs:netdev-darwin-io-bytes-fix

Conversation

@siavashs
Copy link
Contributor

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

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 prometheus#3333

Signed-off-by: Siavash Safi <git@hosted.run>
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

@SuperQ SuperQ merged commit 979a349 into prometheus:master May 18, 2025
13 checks passed
@siavashs siavashs deleted the netdev-darwin-io-bytes-fix branch May 19, 2025 08:20
SuperQ added a commit that referenced this pull request Oct 22, 2025
* [CHANGE] mdadm: Use sysfs for RAID metrics #3031
* [CHANGE] filesystem: Add erofs in default excluded fs #3313
* [CHANGE] tcpstat: Use std lib binary.NativeEndian #3386
* [FEATURE] pcidevice: Add new collector for PCIe devices #3339
* [FEATURE] AIX: Add more metrics #3338
* [FEATURE] systemd: Add Virtualization metrics #3254
* [FEATURE] swaps: Add new collector #3428
* [ENHANCEMENT] filesystem: Take super options into account for read-only #3387
* [ENHANCEMENT] perf: Add tlb_data metrics #3436
* [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing #3288
* [BUGFIX] diskstats: Simplify condition #3290
* [BUGFIX] thermal: Sanitize darwin thermal strings #3294
* [BUGFIX] filesystem: Fix Darwin collector cgo memory leak #3315
* [BUGFIX] ethtool: Fix returning 0 for sanitized metrics #3335
* [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric #3336
* [BUGFIX] systemd: Fix logging race #3364
* [BUGFIX] filesystem: Fix duplicate Darwin CGO import #3391

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Oct 22, 2025
SuperQ added a commit that referenced this pull request Oct 23, 2025
* [CHANGE] mdadm: Use sysfs for RAID metrics #3031
* [CHANGE] filesystem: Add erofs in default excluded fs #3313
* [CHANGE] tcpstat: Use std lib binary.NativeEndian #3386
* [FEATURE] pcidevice: Add new collector for PCIe devices #3339
* [FEATURE] AIX: Add more metrics #3338
* [FEATURE] systemd: Add Virtualization metrics #3254
* [FEATURE] swaps: Add new collector #3428
* [ENHANCEMENT] filesystem: Take super options into account for read-only #3387
* [ENHANCEMENT] perf: Add tlb_data metrics #3436
* [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing #3288
* [BUGFIX] diskstats: Simplify condition #3290
* [BUGFIX] thermal: Sanitize darwin thermal strings #3294
* [BUGFIX] filesystem: Fix Darwin collector cgo memory leak #3315
* [BUGFIX] ethtool: Fix returning 0 for sanitized metrics #3335
* [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric #3336
* [BUGFIX] systemd: Fix logging race #3364
* [BUGFIX] filesystem: Fix duplicate Darwin CGO import #3391

Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ added a commit that referenced this pull request Oct 24, 2025
* [CHANGE] mdadm: Use sysfs for RAID metrics #3031
* [CHANGE] filesystem: Add erofs in default excluded fs #3313
* [CHANGE] tcpstat: Use std lib binary.NativeEndian #3386
* [FEATURE] pcidevice: Add new collector for PCIe devices #3339
* [FEATURE] AIX: Add more metrics #3338
* [FEATURE] systemd: Add Virtualization metrics #3254
* [FEATURE] swaps: Add new collector #3428
* [ENHANCEMENT] filesystem: Take super options into account for read-only #3387
* [ENHANCEMENT] perf: Add tlb_data metrics #3436
* [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing #3288
* [BUGFIX] diskstats: Simplify condition #3290
* [BUGFIX] thermal: Sanitize darwin thermal strings #3294
* [BUGFIX] filesystem: Fix Darwin collector cgo memory leak #3315
* [BUGFIX] ethtool: Fix returning 0 for sanitized metrics #3335
* [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric #3336
* [BUGFIX] systemd: Fix logging race #3364
* [BUGFIX] filesystem: Fix duplicate Darwin CGO import #3391

Signed-off-by: Ben Kochie <superq@gmail.com>
ShashwatHiregoudar pushed a commit to ShashwatHiregoudar/node_exporter that referenced this pull request Mar 3, 2026
* [CHANGE] mdadm: Use sysfs for RAID metrics prometheus#3031
* [CHANGE] filesystem: Add erofs in default excluded fs prometheus#3313
* [CHANGE] tcpstat: Use std lib binary.NativeEndian prometheus#3386
* [FEATURE] pcidevice: Add new collector for PCIe devices prometheus#3339
* [FEATURE] AIX: Add more metrics prometheus#3338
* [FEATURE] systemd: Add Virtualization metrics prometheus#3254
* [FEATURE] swaps: Add new collector prometheus#3428
* [ENHANCEMENT] filesystem: Take super options into account for read-only prometheus#3387
* [ENHANCEMENT] perf: Add tlb_data metrics prometheus#3436
* [BUGFIX] interrupts: Fix OpenBSD interrupt device parsing prometheus#3288
* [BUGFIX] diskstats: Simplify condition prometheus#3290
* [BUGFIX] thermal: Sanitize darwin thermal strings prometheus#3294
* [BUGFIX] filesystem: Fix Darwin collector cgo memory leak prometheus#3315
* [BUGFIX] ethtool: Fix returning 0 for sanitized metrics prometheus#3335
* [BUGFIX] netdev: Fix Darwin netdev i/o bytes metric prometheus#3336
* [BUGFIX] systemd: Fix logging race prometheus#3364
* [BUGFIX] filesystem: Fix duplicate Darwin CGO import prometheus#3391

Signed-off-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Shashwat Hiregoudar <shashwathiregoudar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Darwin network metrics reset at 4GB

2 participants