Skip to content
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

Add RDMA collector #3176

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add RDMA collector #3176

wants to merge 2 commits into from

Conversation

yeahdongcn
Copy link

@yeahdongcn yeahdongcn commented Nov 8, 2024

This PR collects RDMA stats using rdmamap.

Testing Done

  1. docker run --pull=always --cap-add=SYS_TIME --net=host -it node-exporter-linux-amd64:master --collector.rdma --web.listen-address=:8864 --collector.disable-defaults
  2. curl localhost:8864/metrics

The results can be viewed below:

metrics.log

Additionally, the above tests were performed on a node without RDMA devices. The node-exporter runs without issues, as shown in the following logs:

time=2024-11-08T11:18:18.441Z level=ERROR source=collector.go:168 msg="collector failed" name=rdma duration_seconds=4.3574e-05 err="no rdma devices found"

@fishingfly
Copy link

This looks super useful for GPU clusters.

Signed-off-by: Xiaodong Ye <[email protected]>
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.

I took a look at the new data reading library and I'm not very happy with it.

The main issue is this isn't setup to respect the sysPath and rootfsPath variables in paths.go. This means this collector will fail when running in a container when the host sysfs is remapped to a different path.

Signed-off-by: Xiaodong Ye <[email protected]>
@yeahdongcn
Copy link
Author

yeahdongcn commented Nov 10, 2024

I took a look at the new data reading library and I'm not very happy with it.

The main issue is this isn't setup to respect the sysPath and rootfsPath variables in paths.go. This means this collector will fail when running in a container when the host sysfs is remapped to a different path.

@SuperQ Thank you for the review! I've updated the code as per your comments.

I'll also open an issue in rdmamap to see if the Dir paths can be moved to package variables for easier configuration (currently replaced with my fork).

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.

3 participants