feat(dashboard): add Hostname template variable and update panel legend labels (fixes #630)#632
Open
cluster2600 wants to merge 1 commit intoNVIDIA:mainfrom
Open
Conversation
Closes NVIDIA#630 Add a Hostname template variable to the Grafana dashboard so operators can filter by node name in multi-node clusters. Update every panel's legendFormat from 'GPU {{gpu}}' to '{{Hostname}}-GPU {{gpu}}' so graph series are unambiguously identified by host and GPU index.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a
Hostnametemplate variable to the Grafana dashboard and update all panel legend formats to include the hostname alongside the GPU index.Changes in
grafana/dcgm-exporter-dashboard.json:hostnamesourced fromlabel_values(DCGM_FI_DEV_GPU_TEMP, Hostname), supporting multi-select and AllHostname=~"$hostname"as an additional filterGPU {{gpu}}→{{Hostname}}-GPU {{gpu}}for all time-series panelsWhy
Closes #630
In multi-node GPU clusters the existing dashboard labels series as GPU 0, GPU 1 … without any host information, making it impossible to tell which physical node a GPU belongs to. When multiple nodes each report a GPU 0, graphs become ambiguous and misleading.
The
Hostnamelabel is already exported by dcgm-exporter (controlled by the-nflag). Surfacing it in the dashboard label eliminates the confusion with zero configuration changes on the exporter side.How
query-type Grafana template variable that dynamically discovers all hostnames vialabel_values(DCGM_FI_DEV_GPU_TEMP, Hostname). SupportsincludeAllandmultiso operators can scope the view to a single node or compare across nodes.Hostname=~"$hostname"into every panel's PromQL selector so the hostname variable drives real-time filtering.legendFormatfor the six time-series panels that showed onlyGPU {{gpu}}to{{Hostname}}-GPU {{gpu}}. Aggregate/stat panels (Avg Temp, Power Total) that had no legend format are left unchanged.Testing
python3 -c "import json; json.load(open('grafana/dcgm-exporter-dashboard.json'))"Checklist
Hostname=~".*"default (All) matches all existing metrics unchangedHostnamelabel is already present in default metrics