utkuozdemir / nvidia_gpu_exporter

Nvidia GPU exporter for prometheus using nvidia-smi binary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add instance filter in Grafana dashboard

dennys opened this issue · comments

Is your feature request related to a problem? Please describe.
When I have several machines, it's not easy to find the correct GPU by UUID.
Therefore, I try to add an instance filter in dashboard.

Describe the solution you'd like
The following is my procedures, plesae consider to add it, thanks.

First, add a new Grafana dashboard variable

  1. Settings -> variables
  2. Click + New variable
  3. Assign the name (I use 'instance') and label (I use 'Instance')
  4. Change 'query types' to 'label values'
  5. Select 'instance' in 'Label' field
  6. Input '\d+.\d+.\d+.\d+:9835' in Regex (I use default port 9835)
  7. Press Apply and you have a new variable in your dashboard now.

Second, modify the GPU variable

  1. Settings -> variables
  2. Click 'gpu'
  3. Modify 'label filters', I use 'instance' = '$instance'
  4. Press Apply

And you can switch the order of the 2 variables to be more intuitive.

After saving the settings, you have 2 variables in dashboard.
And when you change 'instance', the 'gpu' list should be changed.

I think the Regex is not a good idea, but if I don't add it, it shows all other instances like Node exporter, ...
Please let me know if there is a better solution, thanks.

Hi Dennys
I've a similar requirement and I see this as a great solution to have two variables so that only when a particular host is selected, only the corresponding GPUs can be selected from the second variable.

Unfortunately, I do not see the option to modify the filter to add 'instance' = '$instance'.
Please check the screenshot below and suggest. Would be really helpful.

@vennelakanti2511 Sorry for late reply, this is the screen shot of Grafana 10.4. As I remember, Grafana 9.x should have the same layout. Because I don't ugprade to Grafana 11 yet, I'm not sure is it changed in Grafana 11.
image