-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix ethtool returning 0 for sanitized metrics #3335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
Contributor
Author
|
Hey! It's not really clear to me why this is not passing. Any idea? Anyway, I'll revisit on Monday! |
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 <[email protected]>
SuperQ
approved these changes
May 19, 2025
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 <[email protected]>
Merged
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 <[email protected]>
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 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 their sanitized name.