Skip to content

[Nvidia/GPU] Introduce Nvidia GPU Integration #12768

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 8 commits into from
Apr 15, 2025

Conversation

strawgate
Copy link
Contributor

Proposed commit message

Introduce NVIDIA GPU Monitoring Integration

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

How to test this PR locally

Deploy NVIDIA DGCM on a device with an NVIDIA GPU to get a prometheus metrics endpoint that you can provide to the integration.

If you have docker this just requires:

docker run -d --gpus all --rm -p 9400:9400 nvcr.io/nvidia/k8s/dcgm-exporter:3.3.9-3.6.1-ubuntu22.04
curl localhost:9400/metrics

Configure the integration to point at the host running the container and GPU http://nvidiahost:9400/metrics

Some metrics are not enabled by default with the container, enabling all metrics requires some extra steps.

Related issues

Fixes #11930

Screenshots

WIP:

bill-easton-test kb us-central1 gcp cloud es io_9243_app_dashboards (1)
bill-easton-test kb us-central1 gcp cloud es io_9243_app_dashboards

@strawgate
Copy link
Contributor Author

Todo: Add k8s container, pod, and namespace info from labels

Should also include labels / mapping for kubernetes container, pod, and namespace

container="dcgmproftester11",namespace="default",pod="dcgmproftester"

container => kubernetes.container.name
namespace => kubernetes.namespace
pod => kubernetes.pod.name

- name: kubernetes
  type: group
  fields:
    - name: pod.name
      type: keyword
      description: >
        Kubernetes pod name
    - name: container.name
      type: keyword
      description: >
        Kubernetes container name
    - name: namespace
      type: keyword
      description: >
        Kubernetes namespace
- rename:
    field: prometheus.labels.container
    target_field: kubernetes.container.name
    ignore_missing: true
- rename:
    field: prometheus.labels.namespace
    target_field: kubernetes.namespace
    ignore_missing: true
- rename:
    field: prometheus.labels.pod
    target_field: kubernetes.pod.name
    ignore_missing: true

Perhaps with corresponding dashboard elements

Copy link
Contributor

@ishleenk17 ishleenk17 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.
Shared inital set of comments from the 1st review.

target_field: gpu.nvlink.bandwidth.total
ignore_missing: true
- rename:
field: prometheus.DCGM_FI_DEV_GPU_UTIL.value
Copy link
Contributor

Choose a reason for hiding this comment

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

While going through this issue, there is a mention about

  • high resource utilisation
  • deprecation of a few metrics including DCGM_FI_DEV_GPU_UTIL.

Is this scenario observed while integration testing? If there are metrics that are deprecated or result in high resource intensive, it would be best to not consider this metric for creating dashboard visualisation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will remove this metric and consider replacing with the referenced ones

@agithomas
Copy link
Contributor

Added @daniela-elastic as the reviewer for the dashboard.

Copy link

@daniela-elastic daniela-elastic left a comment

Choose a reason for hiding this comment

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

Looks good and great to see starting to provide support for GPUs. Minor comments (important if we want to move this integration to GA) - it would be great to have some totals at the top of the dashboard - eg total energy consumption, total number of errors, etc. Also, it would be great to have the dashboard follow best practices for integration dashboards described here.

@andrewkroh andrewkroh added New Integration Issue or pull request for creating a new integration package. dashboard Relates to a Kibana dashboard bug, enhancement, or modification. labels Mar 13, 2025
Copy link
Contributor

@agithomas agithomas left a comment

Choose a reason for hiding this comment

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

From the comments, I understand that there is certain improvements we must make on the dashboard.

The PR has been in the hold state for some time.

We can take up the dashboard improvements as part of the new release of the package.

PR Apporved.

@agithomas
Copy link
Contributor

@strawgate , you have all the approvals for this PR. Do you want to consider merging? Do let us know if you need any help.

@agithomas agithomas added the Integration:nvidia_gpu NVIDIA GPU Monitoring label Apr 3, 2025
@strawgate
Copy link
Contributor Author

strawgate commented Apr 3, 2025

Enabling the expensive metrics is a client side change and so us showing them isn't a problem afaik.

I'm good with merging and opening an issue with the current feedback

will bump min kibana ver to try to fix build

@strawgate strawgate enabled auto-merge (squash) April 3, 2025 09:29
@agithomas
Copy link
Contributor

It appears that the build.yml, reference, is missing from this package causing the error.

Also, a few fields mappings are also missing, leading to the following errors

test case failed: one or more errors found in document: [0] field "service.address" is undefined
[1] field "service.type" is undefined
[2] field "ecs.version" is undefined
[3] field "prometheus.node.name" is undefined
[4] field "prometheus.up.value" is undefined

@andrewkroh andrewkroh removed the Integration:nvidia_gpu NVIDIA GPU Monitoring label Apr 3, 2025
@strawgate strawgate requested a review from a team as a code owner April 15, 2025 15:34
@strawgate strawgate force-pushed the nvidia_graphics_card_update_final branch from b37d119 to 24ebd64 Compare April 15, 2025 17:42
@strawgate strawgate force-pushed the nvidia_graphics_card_update_final branch from 24ebd64 to 54f2b09 Compare April 15, 2025 18:24
Copy link

@elasticmachine
Copy link

💚 Build Succeeded

History

@strawgate strawgate merged commit a5139fe into elastic:main Apr 15, 2025
7 checks passed
@elastic-vault-github-plugin-prod

Package nvidia_gpu - 0.1.0 containing this change is available at https://epr.elastic.co/package/nvidia_gpu/0.1.0/

@andrewkroh andrewkroh added the Integration:nvidia_gpu NVIDIA GPU Monitoring label Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Relates to a Kibana dashboard bug, enhancement, or modification. Integration:nvidia_gpu NVIDIA GPU Monitoring New Integration Issue or pull request for creating a new integration package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Nvidia GPU] New Integration for Nvidia GPU Monitoring
7 participants