Skip to content

Conversation

@fabiand
Copy link
Contributor

@fabiand fabiand commented Sep 24, 2025

Building on prometheus/procfs#246 this PR is introducing metrics around swap devices.

Today metrics around swap are already available, but they are on the node level. With this PR, metrics are now available per device.

The use-case is to differentiate between different swap devices exhibiting different performance characteristics.

Relates to: #1890

@fabiand
Copy link
Contributor Author

fabiand commented Sep 24, 2025

Any chance to get a quick review from you @discordianfish ?

Possibly @tiraboschi from you?

@fabiand
Copy link
Contributor Author

fabiand commented Sep 24, 2025

@rexagod maybe from you?

Building on prometheus/procfs#246 this PR is introducing metrics around swap devices.

Today metrics around swap are already available, but they are on the node level.
With this PR, metrics are now available per device.

Relates to: prometheus#1890

Signed-off-by: Fabian Deutsch <[email protected]>
Co-authored-by: claude.ai
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
@fabiand
Copy link
Contributor Author

fabiand commented Sep 30, 2025

Morning. Is there something else that is missing?

@tiraboschi
Copy link

Morning. Is there something else that is missing?

I think we have also to announce it on README.md

Signed-off-by: Fabian Deutsch <[email protected]>
@fabiand
Copy link
Contributor Author

fabiand commented Sep 30, 2025

Good point, thanks. Added to README and CHANGELOG

Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
Signed-off-by: Fabian Deutsch <[email protected]>
@fabiand
Copy link
Contributor Author

fabiand commented Oct 6, 2025

Argh. making lint happy.

Signed-off-by: Fabian Deutsch <[email protected]>
Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Minor nit, otherwise LGTM.

Signed-off-by: Fabian Deutsch <[email protected]>
@fabiand
Copy link
Contributor Author

fabiand commented Oct 6, 2025

Thanks a lot for the reviews!

@SuperQ
Copy link
Member

SuperQ commented Oct 6, 2025

Going to ignore the broken FreeBSD build, seems unrelated.

@SuperQ SuperQ merged commit 771c3d4 into prometheus:master Oct 6, 2025
16 of 19 checks passed
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]>
@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 <[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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants