Skip to content

Comments

sysfs/net_class: filter devices by name#378

Closed
jan--f wants to merge 1 commit intoprometheus:masterfrom
jan--f:filter-net-dev-before-parse
Closed

sysfs/net_class: filter devices by name#378
jan--f wants to merge 1 commit intoprometheus:masterfrom
jan--f:filter-net-dev-before-parse

Conversation

@jan--f
Copy link

@jan--f jan--f commented Apr 19, 2021

This adds regexp-based device filtering to the NetClass function in order to avoid
parsing devices files that are uninteresting.

Signed-off-by: Jan Fajerski jfajersk@redhat.com

Fixes: prometheus/node_exporter#1915

This will have an accompanying PR in the node_exporter, but I wanted to check first if the API change should be made more backwards compatible by introducing a new function that takes the regex as an argument, instead of changing the signature of NetClassDevices().

This adds regexp-based device filtering to the NetClass function in order to avoid
parsing devices files that are uninteresting.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
@jan--f jan--f mentioned this pull request Apr 19, 2021
@jan--f
Copy link
Author

jan--f commented Apr 19, 2021

@jan--f
Copy link
Author

jan--f commented Apr 29, 2021

Keeping the filtering in the consumer is preferred, see #376.

@jan--f jan--f closed this Apr 29, 2021
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.

netclass collector fails while trying to get metrics from ignored devices

1 participant