Skip to content

Add device filtering to the infiniband collector#3694

Open
yugstar wants to merge 1 commit into
prometheus:masterfrom
yugstar:feat-3583-infiniband-device-filter
Open

Add device filtering to the infiniband collector#3694
yugstar wants to merge 1 commit into
prometheus:masterfrom
yugstar:feat-3583-infiniband-device-filter

Conversation

@yugstar

@yugstar yugstar commented Jun 19, 2026

Copy link
Copy Markdown

Closes #3583

Adds --collector.infiniband.device-include and --collector.infiniband.device-exclude flags to the infiniband collector, so operators can scrape a subset of infiniband devices.

This follows the established deviceFilter pattern already used by the arp, ethtool, diskstats and netdev collectors: two mutually-exclusive include/exclude regexp flags, a deviceFilter field on the collector, and a c.deviceFilter.ignored(device.Name) skip at the top of the Update device loop. The filter logic itself is covered by collector/device_filter_test.go.

Defaults are unchanged — with neither flag set, all devices are scraped as before.

Verified: GOOS=linux go build/vet ./collector/ and the collector test binary compile cleanly; gofmt clean; DCO signed.

Add --collector.infiniband.device-include and
--collector.infiniband.device-exclude flags to the infiniband collector,
following the existing pattern used by the arp, ethtool, diskstats and
netdev collectors. Devices not matching the filter are skipped in Update.

Signed-off-by: Aman Raj <aman.yug@gmail.com>
@yugstar yugstar force-pushed the feat-3583-infiniband-device-filter branch from bb52684 to 2d00d08 Compare June 19, 2026 15:01
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.

Feature request: add --collector.infiniband.device-exclude option

1 participant